This tutorial is part of Series tutorials on Building an Enterprise VOIP System.This guide was tested using:
Before we dive deep into installation process,lets get some heads up on basics about Kamailio SIP Server.
Kamailio is a distribution of SER and provides a scalable SIP server suitable for small through to carrier grade installations.Kamailio is developed in C and runs on Linux/Unix systems. Kamailio's main advantages for use alongside Media server like Asterisk are:
● Registrar server
● Location server
● Proxy server
● SIP Application server
● Redirect server
Other Feaures of Kamailio are:
Prerequisites
Disable SELinux
Do system update
Installing Kamailio
Edit the file /etc/kamailio/kamctlrcand make sure the DBENGINE variable is set to MySQL. Remove the pound symbol to uncomment it.
Create database for Mysql. Command below will create users and tables need by Kamailio( Schema)
MySQL password for root is the password you set when you ran mysql secure_installation. Answer Yes to all the questions that follow. Mysql users and password added by above command are.
kamailio: with password kamailiorw. It has read/write access permissions to the Kamailio database.
kamailioro: The passwrd for this user is kamailioro. It has read only access permissions to the Kamailio database.
Edit /etc/kamailio/kamailio.cfg to configure Kamailio. Use the following configuration parameters.
Start Kamailio
On our next tutorial we'll talk about integrating Kamailio with Asterisk Server and Installing its GUI configuration manager called SIREMIS. Meanwhile, you can read on
- Kamailio 4.2.3
- CentOS 7.2
Before we dive deep into installation process,lets get some heads up on basics about Kamailio SIP Server.
Kamailio is a distribution of SER and provides a scalable SIP server suitable for small through to carrier grade installations.Kamailio is developed in C and runs on Linux/Unix systems. Kamailio's main advantages for use alongside Media server like Asterisk are:
- Kamailio can handle over 5000 call setups per second.
- Can serve upto 300,000 active subscribers with just a 4GB Ram System.
- Clustering can easily be realized by adding more Kamailio servers
● Registrar server
● Location server
● Proxy server
● SIP Application server
● Redirect server
Other Feaures of Kamailio are:
- NAT traversal support for SIP and RTP traffic
- Load balancing with many distribution algorithms and
failover support - Provides flexible least cost routing
- Easy to realize routing failover
- Support both IPv4 and IPv6
- SCTP multi-homing and multi-streaming
- Communication can be over UDP, TCP, TLS and SCTP
- Digest SIP User authentication
- Provides event based accounting
- Data storage can be to database, Radius or Diameter
- Extensible Java, Python,Lua and Perl Programming interface
- TLS support for SIP signaling and transparent handling of SRTP for secure audio
Prerequisites
yum -y install epel-releaseStart MariaDB and configure it
yum install mariadb-server mariadb php php-mysql php-gd php-curl
systemctl start mariadbConfirm that mariadb is running
systemctl enable mariadb
systemctl status mariadbConfigure Mariadb database
mysql_secure_installationPress enter when asked for root password and Set root password.
Disable SELinux
sed -i 's/\(^SELINUX=\).*/\SELINUX=disabled/'/etc/selinux/configConfirm that SELinux has been disabled.
sestatusAdd CentOS 7's Kamailio repos
vi /etc/yum.repos.d/kamailio.repoPaste the following content and save the file.
[kamailio]
name=RPMs for Kamailio on CentOS 7
type=rpm-md
baseurl=http://rpm.kamailio.org/stable/CentOS_7/
gpgcheck=1
gpgkey=http://rpm.kamailio.org/stable/CentOS_7/repodata/repomd.xml.key
enabled=1
yum update
Installing Kamailio
yum install -y kamailio kamailio-ldap kamailio-mysql kamailio-postgres kamailio-debuginfo kamailio-xmpp kamailio-unixodbc kamailio-utils kamailio-tls kamailio-outbound kamailio-gzcompress
Edit the file /etc/kamailio/kamctlrcand make sure the DBENGINE variable is set to MySQL. Remove the pound symbol to uncomment it.
vi /etc/kamailio/kamctlrc
DBENGINE=MYSQL
Create database for Mysql. Command below will create users and tables need by Kamailio( Schema)
kamdbctl create
MySQL password for root is the password you set when you ran mysql secure_installation. Answer Yes to all the questions that follow. Mysql users and password added by above command are.
kamailio: with password kamailiorw. It has read/write access permissions to the Kamailio database.
kamailioro: The passwrd for this user is kamailioro. It has read only access permissions to the Kamailio database.
Edit /etc/kamailio/kamailio.cfg to configure Kamailio. Use the following configuration parameters.
vi /etc/kamailio/kamailio.cfgAdd the following lines just below #!KAMAILIO.
#!define WITH_MYSQL
#!define WITH_TLS
#!define WITH_AUTH
#!define WITH_USRLOCDB
#!define WITH_NAT
#!define WITH_PRESENCE
#!define WITH_ACCDB
Start Kamailio
service kamailio startThat's the end. You should now have a running Kamailio SIP server on your CentOS 7.
On our next tutorial we'll talk about integrating Kamailio with Asterisk Server and Installing its GUI configuration manager called SIREMIS. Meanwhile, you can read on




