Setup Kamailio SIP Server and Siremis for Voice call

SIP is Session Initial Protocol for starting an interactive user session that involves multimedia elements. It usually use for VoIP (Voice over Internet Protocol) communication which let user to make voice and video calls. SIP is a popular protocol that let mobile application much more easy to setup incoming and outgoing voice call. In this tutorial, I will teach you how to setup kamailio sip server in your computer and also install siremis web management to manage the kamailio server with GUI interface so it can be easy to maintain.

 

Setup Kamailio SIP Server

 

Note : Required Ubuntu Operating System

Pre-install package

Open a terminal to install the following package to proceed to the next steps.

Note: You should gain root access to install packages.

$ apt-get install git (Git client)

$ apt-get install gcc (gcc compiler)

$ apt-get install flex (flex)

$ apt-get install bison (bison)

$ apt-get install libmysqlclient-dev (libmysqlclient)

$ apt-get install make (make)

$ apt-get install libssl-dev

$ apt-get install libcurl4-openssl-dev

$ apt-get install libxml2-dev

$ apt-get install libpcre3-dev

$ apt-get install mysql-server (mysql server)

$ apt-get install rtpproxy (To travel NAT)

 

Get the source by using Git

$ mkdir -p /usr/local/src/kamailio-4.4

$ cd /usr/local/src/kamailio-4.4

$ git clone –depth 1 –no-single-branch git://git.kamailio.org/kamailio kamailio

$ cd kamailio

$ git checkout -b 4.4 origin/4.4

 

MakeFiles

$ make cfg

$ make include_modules=”db_mysql dialplan” cfg

 

Compile the source

$ make all

$ make install

 

Create a MYSQL database

$ nano -w /usr/local/etc/kamailio/kamctlrc

DBENGINE=MYSQL

SIP_DOMAIN=(DOMAIN)

$ /usr/local/sbin/kamdbctl create

 

Edit configuration file

$ nano –w /usr/local/etc/kamailio/kamailio.cfg

#!define WITH_MYSQL

#!define WITH_AUTH

#!define WITH_USRLOCDB

#!define WITH_NAT

***(No need to edit listen if you are configure only private network, because it will automatic point to your private network)

listen=udp: private_ip :5060 advertise public_ip :5060

 

Add user

$ kamctl add 1001 1001

$ kamctl add 1002 1002

(password: kamailiorw)

password can be modify in this path /usr/local/etc/kamailio/kamctlrc

 

Start rtpproxy 1st after that start server

***(If you are configure only private network can skip this)

$ rtpproxy –l (public ip) –s udp:localhost:7722 –F

$ kamctl start

 

 

Kamailio commands

Start Server – $ kamctl start

Restart server -$ kamctl restart

Stop server – $ kamctl stop

Print log – $ tail -f /var/log/syslog

Track port – $ ngrep -d any -qt -W byline . port 5060

Monitor – $ kamctl moni

Check listen- $ kamailio -c kamailio.cfg

Registered users – $ kamctl db show subscriber

 

Official Tutorial : http://www.kamailio.org/wiki/install/4.4.x/git

 

Install Siremis Web Management For Kamailio (Optional)

 

Requirements

$ apt-get install apache2

$ a2enmod rewrite

$ apt-get install php5 php5-mysql php5-gd php5-curl

 

Download Siremis

$ cd /var/www

$ wget http://siremis.asipto.com/pub/downloads/siremis/siremis-4.2.0.tgz

$ tar xvfz siremis-4.2.0.tgz

$ cd siremis-4.2.0

 

Setup Web Server

$ make apache-conf (and copy the source code)

Below is example

# siremis apache conf snippet …

Alias /siremis “/var/www/siremis-4.2.0/siremis”

<Directory “/var/www/siremis-4.2.0/siremis”>

Options Indexes FollowSymLinks MultiViews

AllowOverride All

Order allow,deny

Allow from all

<FilesMatch “\.xml$”>

Order deny,allow

Deny from all

</FilesMatch>

<FilesMatch “\.inc$”>

Order deny,allow

Deny from all

</FilesMatch>

</Directory>

$ nano –w /etc/apache2/sites-available/000-default.conf

Paste into VirtualHost

 

Local Configuration

$ make prepare

$ make chrown

 

Database Configuration

$ mysql –u(user) –p

mysql > GRANT ALL PRIVILEGES ON siremis.* TO siremis@localhost IDENTIFIED BY ‘siremisrw’;

 

Web Installation Wizard

-Refer to official website

Note :  Tick “Create Siremis DB” in Step 3, Otherwise you will not able to login.

 

Official Tutorial : http://kb.asipto.com/siremis:install42x:main

Official Website : http://siremis.asipto.com/

(Visited 2,376 times, 1 visits today)
Advertisements

Kristofer Ng

A crazy android and web developer. Passion on developing android application and exploring new technology as a hobby.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

GET YOUR EBOOK FOR FREE

Unlock free ebook "Beginning Programming ALL-IN-ONE Desk Reference for DUMMIES" now!

We will send a copy to your email