[asterisk-users] Email alerts for trunks (peers)

Daniel Tryba daniel at tryba.nl
Fri Feb 4 05:32:13 CST 2011


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



More information about the asterisk-users mailing list