Is there a way to get VitalPBX to send me an email whenever the SIP trunk is no longer registered or registration fails ?
We have encountered several incidences where the Trunk is no longer registered (for don’t know how many days) and only found out when people ring our mobiles to say they can’t ring our SIP phone number.
In the section “User-defined variables and arrays” you need to specify the email address to which messages will be sent, and the “username” of each SIP account (usually a numeric value), plus a “friendly” string for each SIP account so your email is more informative. You then set up a cron job on the asterisk box to check the trunks, say every 10 minutes.
If a trunk is down when the cron job runs, you get an email message:
Trunk 1234567 is now down
DIDLOGIC 0787878787 failed to register with a sip server
and if it has changed back to being up when the next cron jobs runs then you get another email to tell you that:
Trunk 1234567 is now up
DIDLOGIC 0787878787 has registered with server sip.au.didlogic.net
I make no guarantees for this script, but it works well for me.