While Asterisk’s SNMP table is quite limited, it is still very useful.
Yesterday we committed a complete Asterisk MIB implementation to OSS_SNMP.
Before you can use it however, you’ll have to enable SNMP on your Asterisk host. There are instructions that work for me on Digium’s site here.
Once you have that working, you can query Asterisk over SNMP really easily as follows:
$host = new \OSS_SNMP\SNMP( $asteriskIP, $community );echo "Asterisk version: " . $host->useAsterisk()->version();echo "Active calls: " . $host->useAsterisk()->callsActive();echo "Calls processed: " . $host->useAsterisk()->callsProcessed();
To add this this, we added a proof of concept Asterisk wallboard to NOCtools which includes active channels, uptime, version information and more. Here’s a screenshot:
![NOCtools Asterisk Wallboard [NOCtools Asterisk Wallboard]](https://github.com/opensolutions/NOCtools/wiki/images/asterisk-wallboard.png)
Pingback: BarryODonovan.com