[SR-Users] pua_xmpp presence problem with notify

Martin Pohančeník pohancenik.martin at gmail.com
Mon Apr 11 13:10:27 CEST 2011


Can somebody please tell me, how is it with the NOTIFY messages generated
byt handle_publish() and handle_subscribe() functions? Do they pass the
routing logic or not? If not, is there a way to make them go through the
routing logic??

Please
Martin

2011/4/8 Martin Pohančeník <pohancenik.martin at gmail.com>

> 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/20110411/d631bd07/attachment.htm>


More information about the sr-users mailing list