Quantcast
Channel: Computing For Geeks
Viewing all articles
Browse latest Browse all 78

How to Install Latest Kamailio SIP Server on CentOS 7

$
0
0
This tutorial is part of Series tutorials on Building an Enterprise VOIP System.This guide was tested using:
There are many ways you can go about to get Kamailio up and running.But for simplicity and automatic solving of dependencies, we'll use CentOS repos provided by Kamailio.
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
Kamailio can function as:
● 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 
 Without further ado, lets start the installation.
Prerequisites
  yum -y install epel-release
  yum install  mariadb-server mariadb php php-mysql php-gd php-curl
Start MariaDB and configure it
systemctl start mariadb
systemctl enable mariadb
Confirm that mariadb is running
systemctl status mariadb
Configure Mariadb database
mysql_secure_installation
Press enter when asked for root password and Set root password.
Disable SELinux
sed -i 's/\(^SELINUX=\).*/\SELINUX=disabled/'/etc/selinux/config
Confirm that SELinux has been disabled.
sestatus
Add CentOS 7's Kamailio repos
  vi /etc/yum.repos.d/kamailio.repo
Paste 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

Do system update 
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.cfg
Add 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 start
That'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

How to install Asterisk PBX 13.x on CentOS 7 step by step guide

 








Viewing all articles
Browse latest Browse all 78

Trending Articles