Kamailio Supernode & Siremis GUI Install guide.

Kamailio sip router
A Kamailio supernode is a SIP router capable of user authentication and status tracking among other things.  It can be used to create a private secure peer-to-peer SIP service similar to Skype™ for example.  It can also be used to connect to other nodes, gateways, PBX's etc.  Siremis is currently be the best GUI for use with Kamailio.

This guide was tested using:

CentOS 7
Kamailio v4.4
Siremis v4.4


*secure peer-to-peer communication
*person to person or group voice calls
*person to person video calls
*screen sharing
*instant messaging
*presence status
*call detail records


yum -y update && yum -y groupinstall core && yum -y groupinstall base && yum -y install epel-release
yum install httpd mariadb-server php php-mysql php-gd php-curl rtpproxy

Confirm that selinux is disabled



nano /etc/yum.repos.d/kamailio44.repo
name=RPM Packages for Kamailio v4.4.x (CentOS_7)
yum install kamailio kamailio-presence kamailio-mysql kamailio-tls 

Set mysql and apache servers to start on boot.

systemctl enable mariadb
systemctl enable httpd

Rtproxy is optional if not using NAT

systemctl enable rtpproxy

nano /etc/kamailio/kamctlrc and uncomment the DBENGINE line as follows


Create MySQL database.  Answer "y" to all options.

systemctl restart mariadb
kamdbctl create

Configure Kamailio


Edit /etc/kamailio/kamailio.cfg so the top of the file looks like the following:

#!define WITH_MYSQL
#!define WITH_AUTH
##!define WITH_NAT
##!define WITH_TLS
#!define WITH_ACCDB
Add this part around line #240 in with the other loadmodule statements
# -- for siremis CDRs --------------
loadmodule "rtimer.so"
loadmodule "sqlops.so"
Add the following around line #460 at the end of the modparam section before the routing logic section.
# -- for siremis CDRs --------------
modparam("rtimer", "timer", "name=cdr;interval=300;mode=1;")
modparam("rtimer", "exec", "timer=cdr;route=CDRS")
modparam("sqlops", "sqlcon", "cb=>mysql://kamailio:kamailiorw@localhost/kamailio")
Finally add this at the end of the routing section around line #910
# ======================================================
# Populate CDRs Table of Siremis
# ======================================================
route[CDRS] {
    sql_query("cb","call kamailio_cdrs()","rb");
    sql_query("cb","call kamailio_rating('default')","rb");
Alternatively, replace the entire file with this pre-configured kamailio.cfg file.
If pointing users to a FQDN you need to specify that as a local alias.  The commented out example is located around line #170 in /etc/kamailio/kamailio.cfg.  This is required if pointing SIP clients to the FQDN instead of the IP address.
/* add local domain aliases */
systemctl restart kamailio

Create kamailio systemd file

nano /etc/systemd/system/kamailio.service
Description=Kamailio - the Open Source SIP Server
After=mariadb.service httpd.service

ExecStartPre=/usr/bin/mkdir -m=2770 -p /var/run/kamailio
ExecStartPre=/usr/bin/chown kamailio:kamailio /var/run/kamailio
ExecStart=/usr/sbin/kamailio -P /var/run/kamailio.pid -f $CFGFILE -m $SHM_MEMORY -M $PKG_MEMORY -u $USER -g $GROUP
ExecStopPost=/usr/bin/rm -f /var/run/kamailio.pid

systemctl daemon-reload
chkconfig kamailio off
systemctl enable kamailio
systemctl restart kamailio


cd /usr/src
wget http://siremis.asipto.com/pub/downloads/siremis/siremis-4.4.0.tgz
tar zxvf siremis*
cp -a siremis*/. /var/www/html
cd /var/www/html
make prepare24
rm -rf /var/www/html/Makefile
rm -rf /var/www/html/Changelog
rm -rf /var/www/html/README
chown -R apache. /var/www/html

Create apache config file

nano /etc/httpd/conf.d/siremis.conf
<Directory "/var/www/html/siremis">
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        Allow from all
        <FilesMatch "\.xml$">
            Order deny,allow
            Deny from all
        <FilesMatch "\.inc$">
            Order deny,allow
            Deny from all

<Directory "/var/www/html/openbiz">
    AllowOverride All
    Order deny,allow
    Deny from all

<Directory "/var/www/html/misc">
    AllowOverride All
    Order deny,allow
    Deny from all
systemctl restart httpd

Create MySQL user

mysql -e "GRANT ALL PRIVILEGES ON siremis.* TO siremis@localhost IDENTIFIED BY 'siremisrw';"

Lock down the database and set root password


Answer Y to everything.

Set PHP timezone.

nano +878 /etc/php.ini
#For example
date.timezone = America/Vancouver
systemctl restart httpd

Run the web install wizard from a web browser at http://your_server_ip_or_fqdn/siremis

Siremis web wizard page 1

Siremis web wizard page 2

Siremis web wizard page 4

*Note in the above image that you should have all 4 boxes checked at the bottom for a first time install.

Siremis web wizard page 4

Siremis web wizard page 5

If you want to run the install wizard again
rm -rf /var/www/html/siremis/install.lock


Change admin password and email

Kamailio administration change username and password1

Siremis administration change password and username 2

Add SIP users

Siremis administration add SIP users 1

Siremis Administration add SIP users 2

Install and configure client

On your desktop or mobile device install your favorite SIP software such as Jitsi.  

The SIP ID is username@your_server_ip_or_fqdn where username is the name added in the above image.

To set up the client to use TLS remember that it uses port 5061.  It is not obvious how to set that up in Jitsi so an image of the relevant section in Jitsi v2.8.x is shown below.

Siremis jitis TLS config



Run your own Skype-like service in less than one hour
Siremis v4.4.x - Installation