Configuring SIP over TLS with Kamailio 5.1.6

Download the script from asterisk source ast_tls_cert
$ chmod +x ast_tls_cert
$ ./ast_tls_cert -C pbx.mycompany.com -O "My Super Company" -d /usr/local/etc/kamailio/certificates
$ ./ast_tls_cert -m client -c /usr/local/etc/kamailio/certificates/ca.crt -k /usr/local/etc/kamailio/certificates/ca.key -C phone1.mycompany.com -O "My Super Company" -d /usr/local/etc/kamailio/certificates -o client
$ cp /usr/local/etc/kamailio/certificates/asterisk.pem /usr/local/etc/asterisk/cert.pem
$ cp /usr/local/src/kamailio-5.1.6/src/modules/tls/tls.cfg /usr/local/etc/asterisk/
$ vim /usr/local/etc/asterisk/tls.cfg
 EDIT folowing lines
 private_key = /usr/local/etc/kamailio/certificates/asterisk.key
 certificate = /usr/local/etc/kamailio/certificates/asterisk.crt
 
$ vim /usr/local/etc/asterisk/kamailio.cfg
 ADD Following lines
 
 #!define WITH_TLS
 
 #!ifdef WITH_TLS
 loadmodule "tls.so"
 #!endif
  
 #!ifdef WITH_TLS
 listen=tls:192.168.3.21:5061
 #!endif
 
 #!ifdef WITH_TLS
 enable_tls=yes
 #!endif

 #!ifdef WITH_TLS
 # ----- tls params -----
 modparam("tls", "config", "/usr/local/etc/kamailio/tls.cfg")
 #!endif
$ systemctl start kamailio.service
Enjoy ;)

Kamailio 5.1.6 installation Steps on CentOS 7

For DB Integration, please find the installation step on this link
For Radius Integration, Please find the installation step on this link
Download latest LTS SRC from www.kamailio.org
$ cd /usr/local/src/
$ make cfg include_modules="db_mysql dialplan acc_radius auth_radius misc_radius lcr jsonrpcs xmlrpc rls ctl tls" skip_modules=app_sqlang PREFIX="/usr/local/SIPSer"
$ make all
$ make install
$ cd /usr/local/SIPSer/etc/kamailio
$ vim kamctlrc
 uncommennt DBENGINE, DBHOST, DBPORT, DBNAME, DBRWUSER and DBRWPW
$ /usr/local/SIPSer/sbin/kamdbctl create
$ cp /usr/local/src/kamailio-5.1.6/pkg/kamailio/centos/7/kamailio.sysconfig /etc/sysconfig/kamailio
$ vim /etc/sysconfig/kamailio
 EDIT USER and GROUP
$ cp /usr/local/src/kamailio-5.1.6/pkg/kamailio/centos/7/kamailio.service /etc/systemd/system/kamailio.service
$ vim /etc/systemd/system/kamailio.service
 EDIT CFGFILE, SBINFILE, SHM_MEMORY, PKG_MEMEORY
$ systemctl start kamailio.service
$ systemctl status kamailio.service
$ export LD_LIBRARY_PATH=/usr/local/lib/
If any module needed to recompile after installation, use the following commands.
$ make install-modules modules=modules/xmlrpc

How to compile and run a next application ?

Install nodejs Use  this  link for further reading curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash nvm inst...