Restart cause asterisk to terminate


after executing any restart command(when convenient, now, gracefully) on the CLI, I got disconnected and the asterisk service was terminated. The “/var/log/asterisk/messages” file had a line “asterisk.c: Accept returned -1: Bad file descriptor” when the process ended. Appreciate any advice on this problem.

Also, like to know the difference between “gracefully” and “when convenient” for this and other similiar commands. Thanks.


Gracefully I do not know below is from the wiki

restart gracefully: Restart Asterisk gracefully
restart now: Restart Asterisk immediately
restart when convenient: Restart Asterisk at empty call volume

Note for Asterisk 1.2: Restart now is like a reload, not a real restart it just run the reload routines (thus open ports are not closed). Often you don’t need really need to restart asterisk, instead just need to issue e.g. ‘unload’ and ‘load’.

Appreciate your reply.

Unload and load works. But it does not support something like “when convenient” or “gracefully”. Guess running the command would terminate the active channels?

My objective is to monitor Asterisk and trigger a graceful restart when problem is detected.