Stopping and Restarting Asterisk From The CLI
There are three common commands related to stopping the Asterisk service. They are:
- core stop now - This command stops the Asterisk service immediately, ending any calls in progress.
- core stop gracefully - This command prevents new calls from starting up in Asterisk, but allows calls in progress to continue. When all the calls have finished, Asterisk stops.
- core stop when convenient - This command waits until Asterisk has no calls in progress, and then it stops the service. It does not prevent new calls from entering the system.
There are three related commands for restarting Asterisk as well.
- core restart now - This command restarts the Asterisk service immediately, ending any calls in progress.
- core restart gracefully - This command prevents new calls from starting up in Asterisk, but allows calls in progress to continue. When all the calls have finished, Asterisk restarts.
- core restart when convenient - This command waits until Asterisk has no calls in progress, and then it restarts the service. It does not prevent new calls from entering the system.
There is also a command if you change your mind.
- core abort shutdown - This command aborts a shutdown or restart which was previously initiated with the gracefully or when convenient options.
See the Asterisk Command Line Interface section for more on that topic.