IRAPI processes should irDisconnect(3IRAPI) and irDeinit(3IRAPI) or irReturn(3IRAPI) any channels they are using. If the process should terminate ungracefully, however, the system returns the channel and any system resources being used by it to their initial state.
The chantest application is designed to be a permanent process. It starts when the voice system is started and does not terminate until the voice system is stopped. A transient process, designed to terminate when the application terminates, would only need to use the exit(2) system call.