Difference between revisions of "How to restart Asterisk server"
From Kolmisoft Wiki
Jump to navigationJump to search
Line 22: | Line 22: | ||
You should see: | You should see: | ||
Unable to connect to remote asterisk (does /var/run/asterisk.ctl exist?) | |||
That means Asterisk is turned off. That is what you want. | |||
If you see other values here - that means you have some active calls going | If you see other values here - that means you have some active calls going: | ||
Wait some time and then execute same command again. Repeat it till you get | 6 active channels | ||
3 active calls | |||
Wait some time and then execute same command again. Repeat it till you get correct message. | |||
Then you can restart/shutdown your server. | Then you can restart/shutdown your server. |
Revision as of 13:11, 25 January 2008
You should never restart it. That would be perfect.
But there are situations when you need to do it no matter what.
If you restart/shutdown your Asterisk server when there are active calls going:
- Users will be disconnected and will not feel very happy about your service;
- You will loose money on the active calls, because provider will charge you for these calls but you will not be able to charge your users because calls will not be in database.
How to do it in right way?
First execute this command:
asterisk -vvvvvvrx 'stop gracefully'
This command will not let any new calls to begin.
Then execute this:
asterisk -vvvvvvrx 'show channels'
You should see:
Unable to connect to remote asterisk (does /var/run/asterisk.ctl exist?)
That means Asterisk is turned off. That is what you want.
If you see other values here - that means you have some active calls going:
6 active channels 3 active calls
Wait some time and then execute same command again. Repeat it till you get correct message.
Then you can restart/shutdown your server.