Difference between revisions of "How to restart Asterisk server"

From Kolmisoft Wiki
Jump to navigationJump to search
(New page: 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 cal...)
 
 
(9 intermediate revisions by 2 users not shown)
Line 5: Line 5:
If you restart/shutdown your Asterisk server when there are active calls going:
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 server.
# 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.
# You will lose 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?==
<br><br>
=How to do it the right way?=


First execute this command:
Just run:


  asterisk -vvvvvvrx 'stop gracefully'
  /usr/src/mor/sh_scripts/asterisk_nice_restart.sh


This command will not let any new calls to begin.
to restart service.
 
Then execute this:
 
asterisk -vvvvvvrx 'show channels'
 
You should see:
 
0 active channels
0 active calls
 
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 0 calls.
 
Then you can restart/shutdown your server.

Latest revision as of 20:33, 2 September 2013

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:

  1. Users will be disconnected and will not feel very happy about your service;
  2. You will lose 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 the right way?

Just run:

/usr/src/mor/sh_scripts/asterisk_nice_restart.sh

to restart service.