[SR-Users] Kamailio "Presence Server" configuration

denislav.tsonev at musala.com denislav.tsonev at musala.com
Thu Nov 22 13:33:40 CET 2018


Hello,

I'm trying to configure Kamailio to be "Presence Server". Simple scheme: 
two phones (one "hard phone" Grandstream GXP1620 and "Soft phone" 
MicroSIP) and Kamailio server with default configuration. So when 
"MicroSIP" send SIP SUBSCRIBE to Kamailio, server response with SIP NOTIFY 
but without XML part. Then when hard phone change his status from "Ready" 
to "Ringing" and then "On-The-Phone" Kamailio is not sending any SIP 
NOTIFY messages. Is this normal behavior or I missed something? (In DB I 
have records in "active_watchers" and  "watchers" tables but not in 
"presentity" table)
======================================================================
====================== Module configuration: =============================
======================================================================

#!ifdef WITH_PRESENCE
loadmodule "presence.so"
loadmodule "presence_xml.so"
#!endif

#!ifdef WITH_PRESENCE
# ----- presence params -----
modparam("presence", "db_url", DBURL)
modparam("presence", "server_address", "sip:10.0.6.123:5060")

# ----- presence_xml params -----
modparam("presence_xml", "db_url", DBURL)
modparam("presence_xml", "force_active", 1)

#!endif

======================================================================


==============================================================
======================== Route: ================================
==============================================================
route[PRESENCE] {
        if(!is_method("PUBLISH|SUBSCRIBE"))
                return;

#!ifdef WITH_PRESENCE
        if (!t_newtran()) {
                sl_reply_error();
                exit;
        }

        if(is_method("PUBLISH")) {
                handle_publish();
                t_release();
        } else if(is_method("SUBSCRIBE")) {
                handle_subscribe();
                t_release();
        }
        exit;
#!endif

        # if presence enabled, this part will not be executed
        if (is_method("PUBLISH") || $rU==$null) {
                sl_send_reply("404", "Not here");
                exit;
        }
        return;
}

================================================================

Thanks in advance



Denislav Raychev Tsonev  |  Integration and Infrastructure Engineer |  
Musala Soft JSC 
www.musala.com  |  t: +359 2 969 58 21   |  m: +359 878 270 965   |  f: 
+359 2 969 58 22 
World Trade Center, 36 Dragan Tsankov blvd., Sofia 1057, Bulgaria 







-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20181122/1dd14ffb/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 5133 bytes
Desc: not available
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20181122/1dd14ffb/attachment.jpe>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 1825 bytes
Desc: not available
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20181122/1dd14ffb/attachment-0001.jpe>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 2091 bytes
Desc: not available
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20181122/1dd14ffb/attachment-0002.jpe>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 3074 bytes
Desc: not available
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20181122/1dd14ffb/attachment-0003.jpe>


More information about the sr-users mailing list