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??<div>
<br>Please</div><div>Martin</div><div><br><div class="gmail_quote">2011/4/8 Martin Pohančeník <span dir="ltr"><<a href="mailto:pohancenik.martin@gmail.com">pohancenik.martin@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi !<div>I have managed to get the XMPP module working for IM. Now I am working on Presence service with the pua_xmpp module.</div><div>I have experienced some problems and I would like to ask some questions to clarify my understandig of Kamailio.</div>
<div><br></div><div>When a SUBSCRIBE arrives to Kamailio, it adds a subscribtion to the watchers table in the database.</div><div>And if the subscriber is online, he is also in the active_watchers table, right?</div><div>
<br></div><div>Next... when a PUBLISH request arrives to Kamailio, by default the handle_publish() function is called. This function generates</div><div>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</div>
<div>generated NOTIFY msgs go through the routing logic, or not ?</div><div><br></div><div>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).</div>
<div><br></div><div>Here is a piece of my configuration file:</div><div><br></div><div><div>if(is_method("NOTIFY"))</div><div>{</div><div><span style="white-space:pre-wrap">        </span>xlog(" ==== NOTIFY msg ====\n");</div>
<div>}</div><div>if(is_method("NOTIFY") && uri=~"sip:.+[*].+@<a href="http://sip.sk" target="_blank">sip.sk</a>")</div><div>{</div><div><span style="white-space:pre-wrap">        </span>xlog(" ====== NOTIFY from $fu to $tu ======\n");</div>
<div><span style="white-space:pre-wrap">        </span>if(pua_xmpp_notify())</div><div><span style="white-space:pre-wrap">        </span>{</div><div><span style="white-space:pre-wrap">                </span>xlog(" ====== NOTIFY to xmpp domain from $fu to $tu ======\n");</div>
<div><span style="white-space:pre-wrap">        </span> t_reply("200", "OK");</div><div><span style="white-space:pre-wrap">        </span>}</div><div><span style="white-space:pre-wrap">        </span>exit;</div>
<div>}</div><div>if(is_method("PUBLISH"))</div><div>{</div><div><span style="white-space:pre-wrap">        </span>xlog("===== PUBLISH FROM $fu =====");</div><div><span style="white-space:pre-wrap">        </span>handle_publish();</div>
<div><span style="white-space:pre-wrap">        </span>t_release();</div><div>}</div><div>else</div><div>if( is_method("SUBSCRIBE"))</div><div>{</div><div><span style="white-space:pre-wrap">        </span>handle_subscribe();</div>
<div><span style="white-space:pre-wrap">        </span>if(uri=~"sip:.+[*].+@<a href="http://sip.sk" target="_blank">sip.sk</a>" && $hdr(Event)== "presence")</div><div><span style="white-space:pre-wrap">        </span>{</div>
<div><span style="white-space:pre-wrap">                </span>xlog(" ====== SUBSCRIBE for XMPP domain from $fu to see $tu ======\n");</div><div><span style="white-space:pre-wrap">                </span>pua_xmpp_req_winfo("$ruri", "$hdr(Expires)");</div>
<div><span style="white-space:pre-wrap">        </span>}</div><div><span style="white-space:pre-wrap">        </span>t_release();</div><div>}</div><div>exit;</div></div><div><br></div><div>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.</div>
<div>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??</div><div><br></div><div>Regards</div><div>Martin</div>
</blockquote></div><br></div>