{"id":607,"date":"2014-03-30T00:58:46","date_gmt":"2014-03-29T23:58:46","guid":{"rendered":""},"modified":"2018-11-01T00:02:38","modified_gmt":"2018-10-31T23:02:38","slug":"kamailio-4x-ims-installing-icscf","status":"publish","type":"post","link":"https:\/\/nil.uniza.sk\/en\/kamailio-4x-ims-installing-icscf\/","title":{"rendered":"Kamailio 4.x IMS &#8211; Installing ICSCF"},"content":{"rendered":"<p style=\"margin-left:7.5pt;\">\n\t<strong>MySQL&nbsp;Database installation<\/strong><\/p>\n<p style=\"margin-left:7.5pt;\">\n\tICSCF need mysql database. During installation you will be asked for mysql root password, which will be needed in some next steps:<\/p>\n<div>\n<pre>\r\napt-get install mysql-server<\/pre>\n<\/div>\n<p style=\"margin-left:7.5pt;\">\n\tSet up mysql:<\/p>\n<div>\n<pre>\r\n# login to database with admin credentials (you will be asked for mysql root password)\r\nmysql -uroot -p\r\n# create database used by icscf kamailio module\r\nmysql&gt; create database icscf;\r\n# create database user with restricted privileges\r\nmysql&gt; CREATE USER &#39;icscf&#39;@&#39;localhost&#39; IDENTIFIED BY &#39;secret&#39;;\r\n# grant privileges for that user only to icscf database\r\nmysql&gt; GRANT ALL PRIVILEGES ON icscf.* TO &#39;icscf&#39;@&#39;localhost&#39;;<\/pre>\n<\/div>\n<p style=\"margin-left:7.5pt;\">\n\t<span style=\"font-size: 11px;\">Find the according configs in the examples folder of Kamailio (Trunk) and copy them to configuration folder.<\/span><\/p>\n<pre>\r\ncd \/usr\/share\/doc\/kamailio\/examples\/icscf\r\ngunzip kamailio.gz\r\ngunzip icscf.mysql.sql.gz\r\ncp kamailio.cfg \/etc\/kamailio\/\r\ncp icscf.cfg \/etc\/kamailio\/\r\ncp icscf.xml \/etc\/kamailio\/\r\ncp  icscf.mysql.sql \/etc\/kamailio\/<\/pre>\n<h3>\n\t<span style=\"font-size: 11px;\">After configuration of mysql database, we need to build its DB&nbsp;structure:<\/span><\/h3>\n<p style=\"margin-left:7.5pt;\">\n\tGo to your configruation folder<\/p>\n<pre style=\"margin-left: 7.5pt;\">\r\ncd \/etc\/kamailio<\/pre>\n<p>\n\tAdd path to library folder in kamailio.cfg<\/p>\n<pre>\r\nmpath=&quot;\/.... ...\/:\/usr\/lib\/i386-linux-gnu\/kamailio\/modules\/&quot;<\/pre>\n<p style=\"margin-left:7.5pt;\">\n\tEdit icscf.mysql.sql<\/p>\n<ul>\n<li>\n\t\tmodify that file for adaptation with your topology configuration and domain name definitions!<\/p>\n<ul>\n<li>\n\t\t\t\tin this file is located information for I-CSCF&nbsp;about available S-CSCF servers.&nbsp;<strong>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!<\/strong>&nbsp;So&nbsp;<strong>change<\/strong>&nbsp;the default&nbsp;<strong>S-CSCF domain name<\/strong>&nbsp;value and&nbsp;<strong>port<\/strong>&nbsp;to someting that you&#39;ve used in your topology! Default is:&nbsp;<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<div style=\"margin-left:72.0pt;\">\n<pre>\r\nsip:scscf.intern.ng-voice.com:5060<\/pre>\n<\/div>\n<ul>\n<li>\n\t\tchange domain name&nbsp;intern.ng-voice.com&nbsp; (two occurences in that file) to something that you are using (in our case:&nbsp;<strong><em>ims1.sip.uniza.sk<\/em><\/strong>)<\/li>\n<li>\n\t\t&nbsp;Modify DB access rights according your set up at the end of e icscf.mysql.sql file. Default is:<\/li>\n<\/ul>\n<div style=\"margin-left:36.0pt;\">\n<pre>\r\ngrant delete,insert,select,update on icscf.* to icscf@192.168.178.210 identified by &#39;heslo&#39;;<\/pre>\n<\/div>\n<ul>\n<li>\n\t\tImport that file to mysql with following command:<\/li>\n<\/ul>\n<div>\n<pre class=\"rteindent1\">\r\nmysql -uroot -p icscf &lt; icscf.mysql.sql<\/pre>\n<\/div>\n<p>\n\t<strong>Edit <em>\/etc\/kamailio\/<span style=\"background-color:#ffff00;\">icscf<\/span>.cfg<\/em> configuration file according to your topology:<\/strong><\/p>\n<pre>\r\n# IP-Adress for incoming SIP-Traffic, in the following format:\r\n#!define NETWORK_INTERFACE &quot;158.193.139.41&quot;\r\n# Port, where we listen to Traffic\r\n#!define PORT 5060\r\n#!define NETWORKNAME &quot;ims1.sip.uniza.sk&quot;\r\n#!define HOSTNAME &quot;icscf.ims1.sip.uniza.sk&quot;\r\n# Connection URL for the database:\r\n#!define DB_MODULE &quot;db_mysql&quot;\r\n#!define DB_URL &quot;mysql:\/\/icscf:secret@158.193.139.41\/icscf&quot;\r\n# Set a forced CX\/DX-Peer, do not try to find one\r\n#!define CXDX_FORCED_PEER &quot;hss.ims1.sip.uniza.sk&quot;\r\n#!define FALLBACK_AUTH<\/pre>\n<p style=\"margin-left:7.5pt;\">\n\t<strong>Edit the kamailio diameter module configuration file<\/strong>&nbsp;<strong>\/etc\/kamailio\/icscf.xml<\/strong>:<\/p>\n<ul>\n<li>\n\t\tchange the IMS&nbsp;domain name in whole conf. file (i.e. from&nbsp;<strong>kamailio-ims.org<\/strong>&nbsp;to&nbsp;<strong>ims1.sip.uniza.sk<\/strong>)<\/li>\n<li>\n\t\tedit IP&nbsp;address in bind parameter of&nbsp;<em>Acceptor<\/em>&nbsp;tag. This step is essential in case of using HSS&nbsp;on separate server. Acceptor port is port that will listen for incoming connections from HSS&nbsp;server. This Acceptor tag&nbsp;<strong>must<\/strong>&nbsp;be paired with&nbsp;<em>Peer<\/em>&nbsp;tag from&nbsp;<em>\/etc\/fhoss\/DiameterPeerHSS.xml<\/em>&nbsp;file on HSS&nbsp;server:<\/li>\n<\/ul>\n<p style=\"margin-left:7.5pt;\">\n\tAcceptor and peer tag from&nbsp;<em>\/etc\/kamailio\/icscf.xml<\/em>:<\/p>\n<pre>\r\n&lt;DiameterPeer \r\nFQDN=&quot;icscf.ims1.sip.uniza.sk&quot;\r\nRealm=&quot;ims1.sip.uniza.sk&quot;\r\n...\r\n&gt;\r\n\r\n&lt;Peer FQDN=&quot;hss.ims1.sip.uniza.sk&quot; Realm=&quot;ims1.sip.uniza.sk&quot; port=&quot;3868&quot; \/&gt;\r\n&lt;Acceptor port=&quot;3869&quot; bind=&quot;158.193.139.41&quot;\/&gt;\r\n\r\n&lt;DefaultRoute FQDN=&quot;hss.ims1.sip.uniza.sk&quot; metric=&quot;10&quot;\/&gt;<\/pre>\n<p style=\"margin-left:7.5pt;\">\n\t<span style=\"font-size: 11px;\">Peer tag from&nbsp;<\/span><em style=\"font-size: 11px;\">\/etc\/fhoss\/DiameterPeerHSS.xml (on HSS&nbsp;server)<\/em><span style=\"font-size: 11px;\">:<\/span><\/p>\n<div>\n<pre>\r\n&lt;Peer FQDN=&quot;icscf.ims1.sip.uniza.sk&quot; Realm=&quot;ims1.sip.uniza.sk&quot; port=&quot;3869&quot; \/&gt;<\/pre>\n<\/div>\n<p style=\"margin-left:7.5pt;\">\n\tIn this example, the IP address 158.193.139.41 is IP&nbsp;address of icscf.ims1.sip.uniza.sk. And both&nbsp;<strong>port<\/strong>&nbsp;parameters must have the same value (3869 in our case).<\/p>\n<p style=\"margin-left:7.5pt;\">\n\t&nbsp;<\/p>","protected":false},"excerpt":{"rendered":"<p style=\"margin-left:7.5pt;\">\n\t<strong>MySQL&nbsp;Database installation<\/strong><\/p>\n<p style=\"margin-left:7.5pt;\">\n\tICSCF need mysql database. During installation you will be asked for mysql root password, which will be needed in some next steps:<\/p>\n<div>\n<pre>\r\napt-get install mysql-server<\/pre>\n<\/div>\n<p style=\"margin-left:7.5pt;\">\n\tSet up mysql:<\/p>","protected":false},"author":1519,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_seopress_robots_primary_cat":"","_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"footnotes":""},"categories":[731],"tags":[],"class_list":["post-607","post","type-post","status-publish","format-standard","hentry","category-ngn-ims-kamailio"],"taxonomy_info":{"category":[{"value":731,"label":"Kamailio IMS"}]},"featured_image_src_large":false,"author_info":{"display_name":"","author_link":"https:\/\/nil.uniza.sk\/en\/author\/"},"comment_info":8,"category_info":[{"term_id":731,"name":"Kamailio IMS","slug":"ngn-ims-kamailio","term_group":0,"term_taxonomy_id":729,"taxonomy":"category","description":"","parent":729,"count":16,"filter":"raw","cat_ID":731,"category_count":16,"category_description":"","cat_name":"Kamailio IMS","category_nicename":"ngn-ims-kamailio","category_parent":729}],"tag_info":false,"_links":{"self":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/posts\/607","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/users\/1519"}],"replies":[{"embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/comments?post=607"}],"version-history":[{"count":0,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/posts\/607\/revisions"}],"wp:attachment":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/media?parent=607"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/categories?post=607"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/tags?post=607"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}