We have recently used Digium gateway as alternative to other existing PRI interfaces and it’s been working like a charm. However, we had a client who needed to monitor the PRI connections and send an email alert whenever the PRI go down. Back then we had no issue with PRI PCI cards as we had access to DAHDI and could simply write a daemon to monitor “pri show spans”. With this gateway however, we cannot do it as simple as that as we have no access to the PRI and there is no SNMP tool whatsoever. The way I could think of was to push the syslog to Asterisk server and parse the syslog looking for anything suspicious. Now here is how I worked that out:
Gateway IP: 192.168.210.13
Asterisk IP: 192.168.210.12
Settings on the gateway:
Go to Reporting > Remote Logging
As can be seen you may enable or disable several log features as you require.
Linux configuration on asterisk
In this scenario I used the Debian rsyslog. All we need to do is to enable remote logging in rsyslog.
# mcedit /etc/rsyslog.conf
# provides UDP syslog reception $ModLoad imudp $UDPServerRun 514
# This one is the template to generate the log filename dynamically. $template FILENAME,"/var/log/%fromhost-ip%/syslog.log" # Log all messages to the dynamically formed file. *.* ?FILENAME
now restart rsyslog and check /var/log/ and you will see a new folder with the IP of gateway.