Project

General

Profile

BeeSIP Callmon

Callmon Server Installation

Prerequisites: Zabbix 3.0 with web frontend and MySQL database – https://www.zabbix.com/documentation/3.0/manual/installation/install_from_packages

Installation of the dependencies and Callmon server scripts:

# cd /opt/
# apt-get install git
# git clone https://bitbucket.org/liptel/callmon_server.git
# apt-get install python-pip python-mysqldb python-networkx python-paramiko zabbix-sender
# pip install zabbix-api pygeoip

Compilation of the PESQ algorithm
Not necessary if running on Debian or Ubuntu x64 distribution:

# git clone https://github.com/dennisguse/ITU-T_pesq.git
# cd /ITU-T_pesq/source
# gcc –o PESQ *.c

Making a template and item for probes in Zabbix 3.0:

Go to Zabbix section Configure -> Templates -> Create template. Create a template with the name Probe and add it into Zabbix servers group. All other parameters should remain default. You can see a new created template:

Then click on the Item link and Create item with the following parameters:

Running the init script:

# cd /opt/callmon_server/shell
# bash init-helper.sh

Callmon Server configuration:

# nano /opt/callmon_server/python/config/config.py

Set the correct parameters into zabbix_password and mysql_pass.

Generating a key pair for Callmon server (temporary):

# cd /home/callmon-probe/.ssh/
# ssh-keygen -t rsa -b 4096
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa): /home/callmon-probe/.ssh/id_rsa

id_rsa.pub public key from the server must be inserted on each probe to be able to connect on it. Send the content of the id_rsa.pub to each probe.

Inserting the public keys from probes (temporary):

id_rsa.pub public keys from the probes have to be inserted on the server to be able to connect on it. Copy the content of the id_rsa.pub from the probes and insert it into:

# vi /callmon-probe/.ssh/authorized_keys

Callmon Probe Installation

Prerequisites: Running BeeSIP probe as VM in the network topology – http://mirror.opf.slu.cz/beesip/1.3.2/callmon/owrt_chaos_calmer/x86/

Callmon probe configuration:

login: root

After first start, please set up password for root:

# passwd root

Network config:

# vi /etc/config/network 

Network configuration example:

config interface lan
    option ifname ‘eth0’
    option proto ‘static’
    option ipaddr ‘10.0.0.90’
    option netmask ‘255.255.254.0’
    option gateway ‘10.0.0.1’
    option dns ‘10.2.1.253’

Callmon probe config:

# vi /etc/config/callmon 

Callmon probe configuration example for testing Callmon server on 195.113.113.141:

config callmon global
option host '195.113.113.141'                         # ip address of the zabbix server.
option https 'False'                                   # should https be used for json rpc calls (True|False, default False)
#option port '10051'                                  # port of the listening zabbix server instance, default = 10051.
option zabbix_login 'Admin'                           # username for zabbix web interface, used for rpc calls.
option zabbix_password '<zabbixwebpassword>'       # password for zabbix web interface, used for rpc calls. Ask the Callmon server admin.
option server_ssh_login_username 'callmon-probe'      # ssh username probe uses for logging into to the zabbix server, used for scp to send the captured wav files.
option tree_base '/usr/share/callmon'                 # base directory containing the callmon files.
option recorded_dir '/var/spool/asterisk/monitor/'    # asterisk monitor directory, this is where the recordings are stored.
option asterisk_ami_user 'python'                     # asterisk ami interface username, used to generate calls.
option asterisk_ami_secret 'python'                   # asterisk ami interface password, used to generate calls.
option probe_com_interface_name 'eth0'                # interface of the probe, which is used for outgoing communications.
option rsa_key_path '/root/.ssh/id_rsa'               # OpenSSH probe private key used by paramiko to connect to the zabbix server.
option wav_archive '/usr/share/callmon/archive'       # directory, where the probe stores the recorded files.
option server_wav_dir '/opt/callmon_server/data_wavs' # directory on the zabbix server to where the recorded files are transferred for pesq analysis.
option probe_template_name 'Probe'                    # the name of the host template on the zabbix server, which should be used for a new probe.
option cron_call_times '0,10,20,30,40,50 * * * *'     # cron time string to specify, when the calls should be created
option cron_analyze_times '5,15,25,35,45,55 * * * *'  # cron time string to specify, when the analysis should be called

Starting the probe:

# callmonp -i

In case of NAT:

If your probe is placed behind the NAT or has the private IP address, it is neccessary to add the SSH tunnel:

ssh -R localhost:22000:localhost:22 -fnN callmon-probe@195.113.113.141

In case of installing your own Zabbix server

Generating a key pair for Callmon probe (temporary):

# ssh-keygen -t rsa -b 4096

id_rsa.pub public key from the probe must be sent to the Callmon server administrator. Copy the content of the id_rsa.pub and send it to him/her. Please, generate the private key without passphrase.

Inserting the public keys from server (temporary):

Public key from the server must be inserted on the probe to be able to connect on it. Ask Callmon server administrator for the content of the RSA public key and insert it into:

# mkdir ~/.ssh/
# touch ~/.ssh/authorized_keys
# vi /root/.ssh/authorized_keys

You can connect your probe to the testing server, which is available on the IP 195.113.113.141. Please send a probe public key (id_rsa.pub) to and use the server public key:

ssh−rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDrODITtAK+Y2gp6wp/6ef8PYLrfVzdLgyoQMb8aqJsjbAKL0HSLBV2KdMwmWgc/YG0OKLMPuEdXOdu3HY0t+arkufHtgsCcDLDpTPkdMgBeOxpFIvb+r3dqxrfz0DTTQ0X3hh3SIp1E3R9cudkfKfi5gtLgC7RiiRdZngFLO0JBvPofd9316oEmsSCH9s9tzSBPDCrHUpitANDdeHpJjCUPYjL0CYFxyS6/ZRfdZIv9oE7pEDp5itsPqOjBMDqSpIyGnTb2kW29yLWgVwCyUMTKF0iPHhBHVreAwIBD9S45e++YtpjCAM4kG4BjCf0qz/kuaFSXHy51oxv6XACwCY2GED4IJurLZgbfVd/egtL/R8ZazS7UYCtsZXJw7xtQ+qImfws8kKZPGhMBBNgM/I5acRXwY5Fa+2JeIWumpGmop/WONsAuUJkeJ4/Twm2oeEFniYeQXd0ZOL/DIbdFCvL5nMQCRLic1/1/MUVvYHMX3CUVI9jSITXZ3LAhlqUW5dD8BozXHd8HklCpI1Z66V3VC7nqPppPQvxWjEYTKwLatYJ8EfN2Cmrk9UJhKeGh1cwxTjSr9yr9fwZ089wUpLd8oR9KecWsLTBbyBUCmeHXrN0iNkh+RhoK+y/WoCIyXya9FyNBBD6usobjVYGVgvjnDwG8fOvdSgc9hO8lDaJGw==