Install Kamailio in Debian 11 (bullseye) with Siremis
Install Kamailio in Debian 11 (Recommeded OS)
Installing Dependencies
apt install dbus nano sudo curl git lsb-release apache2 wget make ## Recomended PHP version 7.4 apt install php php-mysql php-gd php-curl php-xml php-xmlrpc php-pear
Updating php-pear
cd /usr/src wget http://pear.php.net/get/XML_RPC-1.5.5.tgz pear upgrade XML_RPC-1.5.5.tgz systemctl restart apache2 /usr/sbin/a2enmod rewrite systemctl restart apache2
Installing mysql-8 (you can use mariadb too)
## Optional if mariadb is the default mysql client server and you require to install mysql ## download latest mysql 8.0 repo from https://dev.mysql.com/downloads/repo/apt/ wget https://dev.mysql.com/get/mysql-apt-config_0.8.24-1_all.deb apt install ./mysql-apt-config_0.8.24-1_all.deb apt-get update ## if above commands failed to update and produce gpg key error then you may try insecure update apt-get update -oAcquire::AllowInsecureRepositories=true apt-get install mysql-server
Installing kamailio
Add the following lines in nano /etc/apt/sources.list.d/kamailio.list
deb http://deb.kamailio.org/kamailio57 bullseye main deb-src http://deb.kamailio.org/kamailio57 bullseye main
Updating the repo and installing kamailio
apt-get update ## if above commands failed to update and produce gpg key error then you may try insecure update apt-get update -oAcquire::AllowInsecureRepositories=true apt-get install kamailio ## installing modules apt-get install kamailio-mysql-modules kamailio-websocket-modules kamailio-tls-modules
Setting up kamailio database
Edit nano /etc/kamailio/kamctlrc
and uncomment following
DBENGINE=MYSQL DBHOST=localhost DBPORT=3306 DBNAME=kamailio DBRWUSER="kamailio" DBRWPW="kamailiorw"
Run the following command to create kamailio default tables
kamdbctl create ## this will ask series of questions, just reply in y -e Enter character set name: utf32 -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 successfully created. Create the presence related tables? (y/n): y -e \E[37;33mINFO: creating presence tables into kamailio ... -e \E[37;33mINFO: Presence tables successfully created. Create the tables for imc cpl siptrace domainpolicy carrierroute drouting userblocklist 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 successfully created. Create the 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 successfully created.
Installing Siremis
Cloning latest siremis
cd /var/www git clone https://github.com/asipto/siremis cd /var/www/siremis make prepare24 make chown
edit nano /etc/apache2/sites-available/000-default.conf
<VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /var/www/siremis ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined Alias /siremis "/var/www/siremis/siremis" <Directory "/var/www/siremis/siremis"> Options Indexes FollowSymLinks MultiViews AllowOverride All Require all granted <FilesMatch "\.xml$"> Require all denied </FilesMatch> <FilesMatch "\.inc$"> Require all denied </FilesMatch> </Directory> </VirtualHost>
Reloading Apache
systemctl reload apache2
Creating Siremis user in database
Enter into mysql command line and execute following commands to grant privileges
CREATE USER 'siremis'@'localhost' IDENTIFIED WITH mysql_native_password BY 'siremisrw'; GRANT ALL PRIVILEGES ON siremis.* TO 'siremis'@'localhost'; GRANT ALL PRIVILEGES ON kamailio.* TO 'siremis'@'localhost'; GRANT ALL PRIVILEGES ON siremis.* TO 'kamailio'@'localhost'; GRANT ALL PRIVILEGES ON kamailio.* TO 'kamailio'@'localhost'; FLUSH PRIVILEGES;
Finally we are all set to install siremis. Open the following link in your server and proceed with the instructions
0
Comments
-
Handling kamailio logs seperately
Edit
nano /etc/rsyslog.conf
and make the following changesauth,authpriv.* /var/log/auth.log *.*;auth,authpriv.none,local0.none -/var/log/syslog #cron.* /var/log/cron.log daemon.* -/var/log/daemon.log kern.* -/var/log/kern.log lpr.* -/var/log/lpr.log mail.* -/var/log/mail.log user.* -/var/log/user.log local0.* -/var/log/kamailio.log
Restart the syslog service
systemctl restart syslog systemctl restart kamailio
0
Howdy, Stranger!
Categories
- 94 All Categories
- 20 VoIP
- 7 SIP
- 16 asterisk
- 44 Programming
- 1 Nodejs
- 4 javascript
- 19 PHP
- 8 Codeigniter
- 14 database
- 1 UI/UX
- 2 Flutter
- 28 OS
- 26 Linux
- 1 Virtualization
- 1 Android
- 1 Windows
- 2 legal