Install Kamailio in Debian/Ubuntu

Actually, I am not a guy works in telecommunication  technology. But I know about SIP when I was a student in University. Recently,  I had a task install Kamailio for Mobile Team can make a test call via SIP.  I would like to record the steps here.


The first step, we add apt-key with command:

Add the package to source.list file (I am using Debian Jessie)

For the other version:




After finishing the installation, you have to edit  /etc/default/kamailio file:

Restart Kamailio:

Kamailio and Mysql

In my case, I used Mysql DB with Kamailio. So I install mysql:

And you have change /etc/kamailio/kamctl to setup Kamailo connect with Mysql

And you should initiate database for Kamailio on Mysql now:

Add the first SIP account with command:

Show the list of the subscribers:

Now,  you can install a SIP client to test your SIP server. I suggest you use Jitsi

To troubleshoot your calls, you can use tcpdump, lsof command. And show Kamailio logs (tail -f /var/log/syslogs)


At the first, we should change /etc/kamailio/kamailio.cfg by adding a line:

And restart Kamailio.

To verify, we can use lsof command:

Thanks for your reading!!!