Kamailio is an open-source SIP server written in C that runs on a Linux/Unix based operating system. It can handle thousands of call setups per second and serve up to 300,000 active subscribers on system with just 4GB RAM. Kamailio is used by a large ISPs to provide public telephone service, and was designed to be used for large real-time communication services. You can use Kamailio as a registrar server, location server, proxy server, redirect server, and SIP application server.
In this tutorial, we will learn how to install and configure the Kamailio SIP server on Ubuntu 24.04.
Step 1 – Install Required Dependencies
First, you will need to install some required packages on your server. You can install all of them with the following command:
apt-get install gnupg2 mariadb-server curl unzip -y
Once all the packages are installed, you can proceed to the next step.
Step 2 – Install Kamailio Server
By default, Kamailio package is not available in the Ubuntu 24.04 default repository, so you will need to add Kamailio repository in your system.
First, import the Kamailio GPG key with the following command:
wget -O- http://deb.kamailio.org/kamailiodebkey.gpg | apt-key add -
Next, add the Kamailio repository with the following command:
nano /etc/apt/sources.list.d/kamailio.list
Add the following lines:
deb http://deb.kamailio.org/kamailio60 noble main deb-src http://deb.kamailio.org/kamailio60 noble main
Save and close the file when you are finished.
Next, update the repository and install the Kamailio server with other packages using the following command:
apt-get update -y apt install kamailio kamailio-mysql-modules kamailio-websocket-modules kamailio-tls-modules
Once all the packages are installed, verify the installed version of Kamailio with the following command:
kamailio -V
You should get the following output:
version: kamailio 6.0.1 (x86_64/linux)
Step 3 – Configure Kamailio
Next, you will need to edit /etc/kamailio/kamctlrc file and define the database engine, database host, and SIP domain.
nano /etc/kamailio/kamctlrc
Change the following lines:
## your SIP domain SIP_DOMAIN=your-server-ip DBENGINE=MYSQL ## database host DBHOST=localhost
Save and close the file.
Next, create a database, user, and tables needed for Kamailio using the following command:
kamdbctl create
You will be asked to enter a MySQL root password as shown below:
MySQL password for root:
Leave it blank and just press Enter to continue. You will be asked to provide a character set as shown below:
-e Enter character set name: utf32
Type utf32 and hit Enter to continue. You should see the following output:
-e \E[37;33mINFO: creating database kamailio ... -e \E[37;33mINFO: granting privileges to database kamailio ... -e \E[37;33mINFO: creating standard tables into kamailio ... -e \E[37;33mINFO: Core Kamailio tables succesfully created. Install presence related tables? (y/n): y -e \E[37;33mINFO: creating presence tables into kamailio ... -e \E[37;33mINFO: Presence tables succesfully created. Install tables for imc cpl siptrace domainpolicy carrierroute drouting userblacklist htable purple uac pipelimit mtree sca mohqueue rtpproxy rtpengine secfilter? (y/n): y -e \E[37;33mINFO: creating extra tables into kamailio ... -e \E[37;33mINFO: Extra tables succesfully created. Install tables for uid_auth_db uid_avp_db uid_domain uid_gflags uid_uri_db? (y/n): y -e \E[37;33mINFO: creating uid tables into kamailio ... -e \E[37;33mINFO: UID tables succesfully created.
Next, edit the Kamailio main configuration file and enable some features:
nano /etc/kamailio/kamailio.cfg
Add the following lines below #!KAMAILIO.
#!define WITH_MYSQL #!define WITH_AUTH #!define WITH_USRLOCDB #!define WITH_ACCDB
Save and close the file, then restart the Kamailio service to apply the changes:
systemctl restart kamailio
You can also verify the Kamailio service with the following command:
systemctl status kamailio
You should get the following output:
● kamailio.service - Kamailio - the Open Source SIP Server Loaded: loaded (/usr/lib/systemd/system/kamailio.service; enabled; preset: enabled) Active: active (running) since Fri 2025-05-23 05:30:51 UTC; 3s ago Process: 6864 ExecStart=/usr/sbin/kamailio -P /run/kamailio/kamailio.pid -f $CFGFILE -m $SHM_MEMORY -M $PKG_MEMORY --atexit=no (code=exited, status=0/SUCCESS) Main PID: 6868 (kamailio) Tasks: 41 (limit: 2272) Memory: 27.7M (peak: 28.7M) CPU: 86ms CGroup: /system.slice/kamailio.service
Step 4 – Install Siremis Dashboard
Siremis is a web-based interface used for managing a Kamailio SIP server. You can view accounting, registered phones, provision user profiles, routing rules, and communicate with the SIP server via xmlrpc using the Siremisis.
Install Go
First, you will need to install Golang in your system. You can install it with the following command:
apt-get install golang-go -y
Download Siremis
First, change the directory to Apache web root and download the latest version of Siremis from the Git repository:
git clone https://github.com/asipto/siremis
Next, change the directory to Siremis:
cd siremis
Next, install Siremis using the following command:
go build .
Next, rename all sample configuration files.
cp etc/siremis-config-sample.json etc/siremis-config.json cp etc/siremis-charts-sample.json etc/siremis-charts.json cp etc/siremis-menu-sample.json etc/siremis-menu.json
Next, log in to the MariaDB shell with the following command:
mysql
Once logged in, create a new Siremis user and grant all the privileges to the Siremis database:
GRANT ALL PRIVILEGES ON siremis.* TO siremis@localhost IDENTIFIED BY 'password';
Next, flush the privileges and exit from MariaDB with the following command:
flush privileges; exit;
Next, edit the Siremis configuration file and define your admin and database credentials:
nano etc/siremis-config.json
Change the following lines:
"AuthUsers": [ { "Username": "admin", "Password": "admin123", "Role": "admin" } ], "DBData": { "Database": "siremis", "Driver": "mysql", "Host": "localhost", "Port": "3306", "Protocol": "tcp", "Username": "siremis", "Password": "password" },
Finally, start the Siremis with the following command:
./siremis -http-srv your-server-ip:8284
Step 5 – Access Siremis Dashboard
Now, open your web browser and access the Siremis dashboard using the URL http://your-server-ip:8284/siremis. You will be redirected to the Siremis login page:
Provide your admin username and password, which you have defined in your Siremis configuration file, then click on Login. You will see the Siremis dashboard.
Conclusion
Congratulations! You have successfully installed a Kamailio SIP server and Siremis dashboard on Ubuntu 24.04. You can now easily create your SIP server and manage it using Siremis dashboard. Try Kamailio on VPS Hosting from Atlantic.Net using the tutorial above!