Menu Close

Kamailio 4.x IMS – Installing ICSCF

MySQL Database installation

ICSCF need mysql database. During installation you will be asked for mysql root password, which will be needed in some next steps:

apt-get install mysql-server

Set up mysql:

# login to database with admin credentials (you will be asked for mysql root password)
mysql -uroot -p
# create database used by icscf kamailio module
mysql> create database icscf;
# create database user with restricted privileges
mysql> CREATE USER 'icscf'@'localhost' IDENTIFIED BY 'secret';
# grant privileges for that user only to icscf database
mysql> GRANT ALL PRIVILEGES ON icscf.* TO 'icscf'@'localhost';

Find the according configs in the examples folder of Kamailio (Trunk) and copy them to configuration folder.

cd /usr/share/doc/kamailio/examples/icscf
gunzip kamailio.gz
gunzip icscf.mysql.sql.gz
cp kamailio.cfg /etc/kamailio/
cp icscf.cfg /etc/kamailio/
cp icscf.xml /etc/kamailio/
cp  icscf.mysql.sql /etc/kamailio/

After configuration of mysql database, we need to build its DB structure:

Go to your configruation folder

cd /etc/kamailio

Add path to library folder in kamailio.cfg

mpath="/.... .../:/usr/lib/i386-linux-gnu/kamailio/modules/"

Edit icscf.mysql.sql

  • modify that file for adaptation with your topology configuration and domain name definitions!

    • in this file is located information for I-CSCF about available S-CSCF servers. Only S-CSCF servers defined in this SQL database table (table s_cscfs) will be contacted by I-CSCF when processing SIP requests messages from P-CSCF! So change the default S-CSCF domain name value and port to someting that you've used in your topology! Default is: 
sip:scscf.intern.ng-voice.com:5060
  • change domain name intern.ng-voice.com  (two occurences in that file) to something that you are using (in our case: ims1.sip.uniza.sk)
  •  Modify DB access rights according your set up at the end of e icscf.mysql.sql file. Default is:
grant delete,insert,select,update on icscf.* to icscf@192.168.178.210 identified by 'heslo';
  • Import that file to mysql with following command:
mysql -uroot -p icscf < icscf.mysql.sql

Edit /etc/kamailio/icscf.cfg configuration file according to your topology:

# IP-Adress for incoming SIP-Traffic, in the following format:
#!define NETWORK_INTERFACE "158.193.139.41"
# Port, where we listen to Traffic
#!define PORT 5060
#!define NETWORKNAME "ims1.sip.uniza.sk"
#!define HOSTNAME "icscf.ims1.sip.uniza.sk"
# Connection URL for the database:
#!define DB_MODULE "db_mysql"
#!define DB_URL "mysql://icscf:secret@158.193.139.41/icscf"
# Set a forced CX/DX-Peer, do not try to find one
#!define CXDX_FORCED_PEER "hss.ims1.sip.uniza.sk"
#!define FALLBACK_AUTH

Edit the kamailio diameter module configuration file /etc/kamailio/icscf.xml:

  • change the IMS domain name in whole conf. file (i.e. from kamailio-ims.org to ims1.sip.uniza.sk)
  • edit IP address in bind parameter of Acceptor tag. This step is essential in case of using HSS on separate server. Acceptor port is port that will listen for incoming connections from HSS server. This Acceptor tag must be paired with Peer tag from /etc/fhoss/DiameterPeerHSS.xml file on HSS server:

Acceptor and peer tag from /etc/kamailio/icscf.xml:

<DiameterPeer 
FQDN="icscf.ims1.sip.uniza.sk"
Realm="ims1.sip.uniza.sk"
...
>

<Peer FQDN="hss.ims1.sip.uniza.sk" Realm="ims1.sip.uniza.sk" port="3868" />
<Acceptor port="3869" bind="158.193.139.41"/>

<DefaultRoute FQDN="hss.ims1.sip.uniza.sk" metric="10"/>

Peer tag from /etc/fhoss/DiameterPeerHSS.xml (on HSS server):

<Peer FQDN="icscf.ims1.sip.uniza.sk" Realm="ims1.sip.uniza.sk" port="3869" />

In this example, the IP address 158.193.139.41 is IP address of icscf.ims1.sip.uniza.sk. And both port parameters must have the same value (3869 in our case).

 

Rate this post

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.