Open Source - Installing the SNMP Module for Asterisk

Open Source - Installing the SNMP Module for Asterisk

By default, Asterisk will not compile the SNMP development module, since a dependency needs to be satisfied first.

CentOS dependency
In CentOS, you simply need to install the net-snmp-devel package:

$ sudo yum install net-snmp-devel

Ubuntu dependency
Under Ubuntu, the following package needs to be installed:

$ sudo apt-get install snmp libsnmp-dev snmpd

Once you've satisfied the dependencies for SNMP, you can recompile Asterisk with SNMP support:

$ cd /usr/src/asterisk-complete/asterisk/*your Asterisk version here*/
$ ./configure
$ make menuselect
$ sudo make install

You then need to copy the sample config file over to the /etc/asterisk folder:

$ sudo cp /usr/src/asterisk-complete/asterisk/*your Asterisk verison here*/configs/res_snmp.conf.sample /etc/asterisk/res_snmp.conf