Pri/trunk alarm notification?

Is it possible to be able to get an email notification when a PRI goes into RED or other alarm mode? Or when a SIP/IAX trunk is unreachable?

Yes, you can run a script that could do that. Take a look at the trunk settings and our wiki.

I would also consider a script that runs every 5 minutes and runs the "asterisk -rx ‘pri show spans’ parses the output and then text, IM or email you.

I use (in /etc/rc.local)

exec $(tail --follow=name /var/log/asterisk/full |while read LINE;do if [[ “$LINE” =~ “D-channel is down!” ]];then echo $LINE|mail -s “Cap’n we have a PRI problem!!” [email protected];fi;done ) &

It will pick up a failed PRI within a second.

(modify “D-channel is down!” to suit)