[SR-Users] pua_xmpp presence problem with notify

Martin Pohančeník pohancenik.martin at gmail.com
Fri Apr 8 05:25:50 CEST 2011


Hi !
I have managed to get the XMPP module working for IM. Now I am working on
Presence service with the pua_xmpp module.
I have experienced some problems and I would like to ask some questions to
clarify my understandig of Kamailio.

When a SUBSCRIBE arrives to Kamailio, it adds a subscribtion to the watchers
table in the database.
And if the subscriber is online, he is also in the active_watchers table,
right?

Next... when a PUBLISH request arrives to Kamailio, by default the
handle_publish() function is called. This function generates
all NOTIFY msgs (based on the database content of watchers and presence
rules) and send them to the recipients. I wanted to ask if these
generated NOTIFY msgs go through the routing logic, or not ?

As I was saying, I was trying to get pua_xmpp module working, but Kamailio
does not seem to send NOTIFY to users in XMPP (winfo is sent, bude presence
itself is not).

Here is a piece of my configuration file:

if(is_method("NOTIFY"))
{
xlog(" ==== NOTIFY msg ====\n");
}
if(is_method("NOTIFY") && uri=~"sip:.+[*].+ at sip.sk")
{
xlog(" ====== NOTIFY from $fu to $tu ======\n");
if(pua_xmpp_notify())
{
xlog(" ====== NOTIFY to xmpp domain from $fu to $tu ======\n");
    t_reply("200", "OK");
}
exit;
}
if(is_method("PUBLISH"))
{
xlog("===== PUBLISH FROM $fu =====");
handle_publish();
t_release();
}
else
if( is_method("SUBSCRIBE"))
{
handle_subscribe();
if(uri=~"sip:.+[*].+ at sip.sk"  && $hdr(Event)== "presence")
{
xlog(" ====== SUBSCRIBE for XMPP domain from $fu to see $tu ======\n");
pua_xmpp_req_winfo("$ruri", "$hdr(Expires)");
}
t_release();
}
exit;

Based on this configuration, I never get the " ==== NOTIFY msg ====" output
to the syslog. So I assume the NOTIFY never goes through the routing logic.
Is that right?? If so, how can I get it to pass the routing logic so the
pua_xmpp_notify() function can be executed ?? Is there any way to do this??

Regards
Martin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20110408/14e5f6f9/attachment.htm>


More information about the sr-users mailing list