Hello I have problem with Kamailio presence,i have configure my kamailio.cfg to handle dialog presence and facing issue in case of subs_db_mode = 2 in case of mode 2 facing following presence issue.

  1. after hangup presence is still up
  2. sometimes stuck in ringing state
  3. sometime presence not came..etc

but in case of subs_db_mode = 3 (DB ONLY) mode presence working fine not facing any issue with this mode.

I noticed that sometimes Kamailio will throw following message during PUBLISH processesing and it will not generate appropriate NOTIFY i also verify in active watcher subscription is thare for that user and also proper entry in dialog table.

MSG during PUBLISH processesing and it will not generate appropriate NOTIFY

Oct 30 07:42:10 NC-HOSTED-1 /usr/local/sbin/kamailio[2409]: DEBUG: presence [notify.c:1444]: publ_notify(): Could not find subs_dialog

kamailio.cfg param

modparam("pua", "db_url", DBURL_KAMAILIO)
modparam("pua", "db_mode", 2)
modparam("pua", "update_period", 100)
modparam("pua", "dlginfo_increase_version", 1)
modparam("pua", "default_expires", 3600)
modparam("pua", "fetch_rows", 1000)
modparam("pua", "outbound_proxy", SERVER_IP)

modparam("dialog", "db_url", DBURL_KAMAILIO )
modparam("dialog", "db_mode", 1)
modparam("dialog", "db_update_period", 260)
modparam("dialog", "db_fetch_rows", 500)

modparam("pua_dialoginfo", "include_callid", 1)
modparam("pua_dialoginfo", "send_publish_flag", 8)
modparam("pua_dialoginfo", "caller_confirmed", 0)
modparam("pua_dialoginfo", "include_tags", 1)
modparam("pua_dialoginfo", "use_pubruri_avps", 1)
modparam("pua_dialoginfo", "include_localremote", 1)
modparam("pua_dialoginfo", "override_lifetime", 300)
modparam("pua_dialoginfo", "pubruri_caller_avp", "$avp(s:puburis_caller)")
modparam("pua_dialoginfo", "pubruri_caller_dlg_var", "pubruri_caller")
modparam("pua_dialoginfo", "pubruri_callee_dlg_var", "pubruri_callee")
modparam("pua_dialoginfo", "pubruri_callee_avp", "$avp(s:puburis_callee)")

modparam("presence_dialoginfo", "force_single_dialog", 1)
modparam("presence", "db_table_lock_type", 0)
modparam("presence", "db_url", DBURL_KAMAILIO)
modparam("presence", "db_update_period", 5)
modparam("presence", "send_fast_notify", 1)
modparam("presence", "clean_period", 100)
modparam("presence", "subs_db_mode", 2)
//modparam("presence", "subs_db_mode", 3)
modparam("presence", "timeout_rm_subs", 1) //new/
//modparam("presence", "notifier_processes", 2) //new//
modparam("presence", "notifier_poll_rate", 20) //new//
modparam("presence", "waitn_time",1)
modparam("presence", "fetch_rows", 1000)
modparam("presence", "presentity_table", "presentity")
modparam("presence", "active_watchers_table", "active_watchers")
modparam("presence", "watchers_table", "watchers")
modparam("presence", "max_expires", 3600)

modparam("presence_xml", "db_url", DBURL_KAMAILIO)
modparam("presence_xml", "force_active", 1)

logic for presence

request_route {

    if(is_method("PUBLISH") || is_method("SUBSCRIBE")) {
            route(HANDLE_PRESENCE);
    }

}

route[HANDLE_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;

}

route[RELAY] {

    if(is_method("INVITE|BYE|UPDATE|CANCEL|ACK")) {
            $avp(t_ext) = $tU ;             
            $avp(domain) = $fd ;                
            $avp(et) = $_s(sip:$avp(t_ext)@$avp(domain)) ;          
            $avp(s:puburis_callee) = $avp(et);
            setflag(8);
            dlg_manage();
    }

}


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.