Hello, Is there a way to detect, via cli or any other way, that Asterisk is in "graceful shutdown" mode, not accepting any new calls? Or to put the question a different way, how can I know that Asterisk has restarted again after the command "core restart graceful" in an automated way? Best regards, Jan Blom -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20120818/e12e8636/attachment.htm>
You can see if asterisk has been restarted by checking the number of calls processed. If almost zero, it has been restarted. "core show calls" Leandro 2012/8/19 Jan Blom <jan.blom at peopleinteractive.se>> Hello,**** > > ** ** > > Is there a way to detect, via cli or any other way, that Asterisk is in > ?graceful shutdown? mode, not accepting any new calls? Or to put the > question a different way, how can I know that Asterisk has restarted again > after the command ?core restart graceful? in an automated way?**** > > ** ** > > ** ** > > Best regards,**** > > Jan Blom**** > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > New to Asterisk? Join us for a live introductory webinar every Thurs: > http://www.asterisk.org/hello > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20120819/b6d256f1/attachment.htm>
Absolutely, but that requires statefull processing. Another way is to look at uptime. However, I was looking for a stateless way to automatically monitor a restart. Best regards, Jan From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Leandro Dardini Sent: den 19 augusti 2012 08:35 To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] graceful restart You can see if asterisk has been restarted by checking the number of calls processed. If almost zero, it has been restarted. "core show calls" Leandro 2012/8/19 Jan Blom <jan.blom at peopleinteractive.se<mailto:jan.blom at peopleinteractive.se>> Hello, Is there a way to detect, via cli or any other way, that Asterisk is in "graceful shutdown" mode, not accepting any new calls? Or to put the question a different way, how can I know that Asterisk has restarted again after the command "core restart graceful" in an automated way? Best regards, Jan Blom -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20120819/1d2b1962/attachment.htm>
On 12-08-18 06:39 PM, Jan Blom wrote:> Hello, > > Is there a way to detect, via cli or any other way, that Asterisk is in "graceful shutdown" mode, not accepting any new calls? Or to put the question a different way, how can I know that Asterisk has restarted again after the command "core restart graceful" in an automated way? >Monitor the events on the AMI, you should see the following: Event: Shutdown Privilege: system,all SequenceNumber: 0 File: asterisk.c Line: 1773 Func: really_quit Shutdown: Cleanly Restart: True Then you can build out your monitoring tools from it. -- Paul Belanger | PolyBeacon, Inc. Jabber: paul.belanger at polybeacon.com | IRC: pabelanger (Freenode) Github: https://github.com/pabelanger | Twitter: https://twitter.com/pabelanger