On Fri, Feb 04, 2011 at 03:43:00PM +1000, Ryan Tucker wrote: > I'm after a way to monitor our sip trunks (peers) and send an email if > they go down. I know I could use 'asterisk -rx "sip show peers"' in a > shell script but that seems messy, especially since I'd like to > monitor it fairly closely (so I'd like to run it every 20 or 30 > seconds or so). Is there a better way to do it?
What is messy about it? An alternative would be to get the same info by using AMI (using a persistent connection if you'd like), but if you go for the AMI way you could implement an event listener for PeerStatus changes: http://www.voip-info.org/wiki/view/Asterisk+Manager+API+Action+Events -- Daniel Tryba -- _____________________________________________________________________ -- 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
