Aller au contenu principal

Asterisk VoIP Server


Centreon Plugin

Install this plugin on each needed poller:

yum install centreon-plugin-Applications-Voip-Asterisk

Asterisk server configuration

After connecting with root account to your Asterisk server, you must do the following configurations.

SNMP mode

  • Install snmpd daemon.

  • Modify the file /etc/asterisk/modules.conf by commenting out the line containing

    vi /etc/asterisk/modules.conf


[modules] autoload=yes
... noload => noload => #noload => noload => noload => ...
  • Modify or create the file /etc/asterisk/res_snmp.conf to add the following parameters:

    vi /etc/asterisk/res_snmp.conf

    [general] subagent = yes enabled = yes

  • Modify the file /etc/snmp/snmpd.conf to add some parameters:



# Acces to Asterisk snmp
# Asterisk user
createUser asteriskUser SHA "password" AES
rwuser asteriskUser priv
# Enable AgentX support
master agentx
agentXSocket /var/agentx/master
# Set permissions on AgentX socket and containing
# directory such that process in group 'asterisk'
# will be able to connect
agentXPerms 0660 0550 nobody asterisk

Here is an exemple of a command to check the snmp functionality:

snmpwalk -v 3 -u asteriskUser -l authPriv -a SHA -A "password" -x AES -X "password" <xivo serveur IP> .

Remote mode

  1. Commun

For any remote acces, you must create an Asterisk user:

vi /etc/aserisk/manager.conf

example of user:

secret = centreon
read = system,call,log,verbose,command,agent,user,dtmf
write = system,call,log,verbose,command,agent,user,dtmf
  1. AMI

In te newly created user, add a permit line to allow the centreon server to conect to the AMI:

vi /etc/aserisk/manager.conf


  1. SSH
  • Create a system user, centreon for exemple:

    useradd centreon passwd centreon

  • Echange ssh keys from the centreon server to the asterisk server (user centreon in our exemple):

    ssh-copy-id centreon@<asterisk server>

  • Push the script /usr/lib/nagios/plugins/apps/voip/asterisk/remote/remote-script/ to /home/centreon/bin:

    scp /usr/lib/nagios/plugins/apps/voip/asterisk/remote/remote-script/ /home/centreon/bin/.

  • Push from the centreon server /usr/lib/nagios/plugins/apps/voip/asterisk/remote/remote-script/asterisk_sendcommand.confor create it at /home/centreon/bin/asterisk_centreon.conf directly on the asterisk server

  • Copy the user name and the secret of the centreon user contained into /etc/asterisk/manager.conf to /home/centreon/bin/asterisk_centreon.conf:

    vi /home/centreon/bin/asterisk_centreon.conf

add the line:

xivo_centreon_user centreon

Warning: this file must contain only one line

Warning: the files /home/centreon/bin/asterisk_centreon.conf and /home/centreon/bin/asterisk_centreon.conf must be executable and readable by the centreon user