[asterisk-users] Restart status

Philipp Kempgen philipp.kempgen at amooma.de
Sat Aug 25 20:03:15 CDT 2007


Ron Joffe wrote:

> The issue is that I am attempting to restart asterisk from external scripts 
> due to certain pbx conditions. 
> 
> I need to have a two step approach:
> 
> 1. Issue a "restart gracefully"
> 2. If x minutes go by and and all channels have not cleared then issue a 
> "restart now"
> 
> Each of these items might not know of the other so it would be helpful for 
> item two to know that asterisk is in a "restart gracefully" mode.

Maybe something like this:
asterisk -rx 'restart gracefully'

Then constantly monitor
asterisk -rx 'core show uptime seconds'

And if that does not drop to let's say less than 30 seconds:
asterisk -rx 'stop now'
sleep 1
killall -9 asterisk
asterisk


Regards,
  Philipp Kempgen

-- 
amooma GmbH - Bachstr. 126 - 56566 Neuwied - http://www.amooma.de
    Let's use IT to solve problems and not to create new ones.
          Asterisk? -> http://www.das-asterisk-buch.de
              My pick of the month: rfc 2822 3.6.5

Geschäftsführer: Stefan Wintermeyer
Handelsregister: Neuwied B 14998



More information about the asterisk-users mailing list