{"id":411,"date":"2011-04-01T12:26:04","date_gmt":"2011-04-01T10:26:04","guid":{"rendered":""},"modified":"2018-11-01T01:12:47","modified_gmt":"2018-11-01T00:12:47","slug":"extending-ims-base-platform-simple-presence-service-build-over-kamailio","status":"publish","type":"post","link":"https:\/\/nil.uniza.sk\/en\/extending-ims-base-platform-simple-presence-service-build-over-kamailio\/","title":{"rendered":"Extending IMS base platform with simple Presence service build over Kamailio AS"},"content":{"rendered":"<p>\n\tIn this article we describe how to extend the base Kamailio IMS platform (as is described <a href=\"https:\/\/nil.uniza.sk\/en\/ngnims\/kamailio-ims\/installing-base-kamailio-ims-platform-debian-squeeze-32bit\/\">here<\/a>) with simple presence service realized over Kamailio SIP&nbsp;server.<\/p>\n<h1>\n\tPrerequisities<\/h1>\n<h2>\n\tTopology prerequisities<\/h2>\n<ul>\n<li>\n\t\tFunctional IMS platform (as is described <a href=\"https:\/\/nil.uniza.sk\/en\/ngnims\/kamailio-ims\/installing-base-kamailio-ims-platform-debian-squeeze-32bit\/\">here<\/a> in our case).<\/li>\n<li>\n\t\tFunctional Kamailio SIP presence server configured with Mysql (as is described for example <a href=\"https:\/\/nil.uniza.sk\/en\/sip\/kamailio\/adding-mysql-support-kamailio-31-debian-lenny\/\">here<\/a>) and IM and presence service (as is described <a href=\"https:\/\/nil.uniza.sk\/en\/sip\/kamailio\/configuring-im-and-presence-kamailio-31-howto\/\">here<\/a>).<\/p>\n<ul>\n<li>\n\t\t\t\tNote: Do not use authorization as it is described inside of the article about Kamailio and Mysql (do not define directive WITH_AUTH).<\/li>\n<li>\n\t\t\t\tdo not enable registrar service on your Kamailio presence server.<\/li>\n<li>\n\t\t\t\talias parameter, defined for our kamamilio presence server, is <em>ims1.sip.uniza.sk<\/em>, the same as the domain zone name of our IMS.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>\n\tNote: As a good idea seems to install SIREMIS over Kamailio presence AS (as is for example <a href=\"https:\/\/nil.uniza.sk\/sk\/sip\/kamailio\/installing-siremis-20-kamailio-web-management-interface-debian-lenny-how\">described here<\/a>).<\/p>\n<h2>\n\tDNS&nbsp;preparation<\/h2>\n<p>\n\tWe have to define FQDN&nbsp;name of our Presence server, A record should be enough. In our case it is:<\/p>\n<pre>\r\nkam-presence    IN      A       158.193.139.36<\/pre>\n<p>\n\t&nbsp;FQDN = kam-presence.ims1.sip.uniza.sk<\/p>\n<h1>\n\tHSS configuration<\/h1>\n<p>\n\tEdit default service profile which is inserted in the HSS server to point server out on your presence server, here kam-presence.ims1.sip.uniza.sk. So, go to your HSS server (here hss.ims1.sip.uniza.sk), and log in. From the top level menu choose services, and from the left menu under Applcaition servers choose Search, then click on the Search button<\/p>\n<p>\n\tthen choose default_as by clicking on<\/p>\n<p>\n\t<img decoding=\"async\" alt=\"\" height=\"173\" src=\"\/wp-content\/uploads\/files\/image\/ngn-ims\/kamailio-ims\/hss\/hss-presence-service1.png\" width=\"422\" \/><\/p>\n<p>\n\tand edit field inside of the red square to pointing the service on your presence server, then save&#8230;<\/p>\n<p>\n\t<img decoding=\"async\" alt=\"\" height=\"570\" src=\"\/wp-content\/uploads\/files\/image\/ngn-ims\/kamailio-ims\/hss\/hss-presence-service2.png\" width=\"601\" \/><\/p>\n<p>\n\tThen set your IMPUs (public identities) to use the default service profile (default_sp). This profile forwards all PUBLISH and SUBSCRIBE messages to the Presence Application Server.<\/p>\n<p>\n\tFor default_as are other setting (as Trigger points, IFC, IFC sets.) preconfigured.<\/p>\n<h1>\n\tTests<\/h1>\n<h2>\n\tSetting up IMS client<\/h2>\n<h3>\n\t1) Registering client to the SIMPLE&nbsp;AS<\/h3>\n<pre>\r\n   158.193.152.64    158.193.139.40    158.193.139.41    158.193.139.42    158.193.139.36\r\n    client           pcscf.ims1        icscf.ims1        scsfc.ims1        kam-presence.ims1(AS)\r\n    |                 |                 |                 |                 |\r\n1 : |U----REGISTER---&gt;|                 |                 |                 |\r\n2 : |                 |U----REGISTER---&gt;|                 |                 |\r\n3 : |                 |                 |U----REGISTER---&gt;|                 |\r\n4 : |                 |                 |&lt;-401 Unauthori-U|                 |\r\n5 : |                 |&lt;-401 Unauthori-U|                 |                 |\r\n6 : |&lt;-401 Unauthori-U|                 |                 |                 |\r\n7 : |U----REGISTER---&gt;|                 |                 |                 |\r\n8 : |                 |U----REGISTER---&gt;|                 |                 |\r\n9 : |                 |                 |U----REGISTER---&gt;|                 |\r\n10: |                 |                 |&lt;-200 OK - SAR -U|                 |\r\n11: |                 |&lt;-200 OK - SAR -U|                 |                 |\r\n12: |&lt;-200 OK - SAR -U|                 |                 |                 |\r\n13: |U---SUBSCRIBE---&gt;|                 |                 |                 |\r\n14: |U----PUBLISH----&gt;|                 |                 |                 |\r\n15: |                 |U------------SUBSCRIBE------------&gt;|                 |\r\n16: |                 |U-------------PUBLISH-------------&gt;|                 |\r\n17: |                 |&lt;-200 Subscription to REG saved\/S-U|                 |\r\n18: |&lt;-200 Subscript-U|                 |                 |                 |\r\n19: |                 |                 |                 |U----PUBLISH----&gt;|\r\n20: |                 |                 |                 |&lt;-200 OK\/PUBLIS-U|\r\n21: |                 |&lt;----------200 OK\/PUBLISH---------U|                 |\r\n22: |&lt;-200 OK\/PUBLIS-U|                 |                 |                 |\r\n23: |                 |&lt;--------------NOTIFY-------------U|                 |\r\n24: |&lt;-----NOTIFY----U|                 |                 |                 |\r\n25: |U-200 OK\/NOTIFY-&gt;|                 |                 |                 |\r\n26: |                 |U----------200 OK\/NOTIFY----------&gt;|                 |\r\n27: |                 |U---SUBSCRIBE---&gt;|                 |                 |\r\n28: |                 |                 |U---SUBSCRIBE---&gt;|                 |\r\n29: |                 |                 |&lt;-200 Subscript-U|                 |\r\n30: |                 |&lt;-200 Subscript-U|                 |                 |\r\n31: |                 |&lt;--------------NOTIFY-------------U|                 |\r\n32: |                 |U-200 OK - P-CSCF|processed notif-&gt;|                 |\r\n<\/pre>\n<h2>\n\t2) Registering two SIP&nbsp;clients to presence server, a complete call flow sniff<\/h2>\n<p>\n\tpalo@ims1 is adding the user segi@ims1 to his contact list.<\/p>\n<pre>\r\n158.193.152.64      158.193.139.40      158.193.139.42      158.193.139.36\r\n    |                   |                   |                   |\r\n1 : |U----SUBSCRIBE----&gt;|                   |                   |\r\n2 : |                   |U----SUBSCRIBE----&gt;|                   |\r\n3 : |                   |                   |U----SUBSCRIBE----&gt;|\r\n4 : |                   |                   |&lt;-202 OK\/SUBSCRIB-U|\r\n5 : |                   |                   |&lt;------NOTIFY-----U|\r\n6 : |                   |&lt;-202 OK\/SUBSCRIB-U|                   |\r\n7 : |&lt;-202 OK\/SUBSCRIB-U|                   |                   |\r\n8 : |                   |&lt;------NOTIFY-----U|                   |\r\n9 : |&lt;------NOTIFY-----U|                   |                   |\r\n10: |U--200 OK\/NOTIFY--&gt;|                   |                   |\r\n11: |                   |U--200 OK\/NOTIFY--&gt;|                   |\r\n12: |                   |                   |U--200 OK\/NOTIFY--&gt;|<\/pre>\n<h2>\n\t3) More complex scenario, two users add itself to their contact lists and changing theri status to busy<\/h2>\n<p>\n\tuser palo@ims1.sip.uniza.sk is adding of user segi@ims1.sip.uniza.sk to his contact list, segi@ims1 is changing his status to busy.<\/p>\n<p>\n\tuser segi is then adding of user palo@ims1.sip.uniza.sk to his contact list, palo@ims1 is changing his status to busy.<\/p>\n<p>\n\t&nbsp;<\/p>","protected":false},"excerpt":{"rendered":"<p>\n\tIn this article we describe how to extend the base Kamailio IMS platform (as is described <a href=\"https:\/\/nil-test.kis.fri.uniza.sk\/ngnims\/kamailio-ims\/installing-base-kamailio-ims-platform-debian-squeeze-32bit\">here<\/a>) with simple presence service realized over Kamailio SIP&nbsp;server.<\/p>","protected":false},"author":7,"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":[781,731],"tags":[],"class_list":["post-411","post","type-post","status-publish","format-standard","hentry","category-kamailio-en","category-ngn-ims-kamailio"],"taxonomy_info":{"category":[{"value":781,"label":"Kamailio"},{"value":731,"label":"Kamailio IMS"}]},"featured_image_src_large":false,"author_info":{"display_name":"admin","author_link":"https:\/\/nil.uniza.sk\/en\/author\/admin\/"},"comment_info":3,"category_info":[{"term_id":781,"name":"Kamailio","slug":"kamailio-en","term_group":0,"term_taxonomy_id":779,"taxonomy":"category","description":"","parent":771,"count":29,"filter":"raw","cat_ID":781,"category_count":29,"category_description":"","cat_name":"Kamailio","category_nicename":"kamailio-en","category_parent":771},{"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\/411","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\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/comments?post=411"}],"version-history":[{"count":0,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/posts\/411\/revisions"}],"wp:attachment":[{"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/media?parent=411"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/categories?post=411"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nil.uniza.sk\/en\/wp-json\/wp\/v2\/tags?post=411"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}