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">&lt;<a href="mailto:pohancenik.martin@gmail.com">pohancenik.martin@gmail.com</a>&gt;</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(&quot;NOTIFY&quot;))</div><div>{</div><div><span style="white-space:pre-wrap">        </span>xlog(&quot; ==== NOTIFY msg ====\n&quot;);</div>

<div>}</div><div>if(is_method(&quot;NOTIFY&quot;) &amp;&amp; uri=~&quot;sip:.+[*].+@<a href="http://sip.sk" target="_blank">sip.sk</a>&quot;)</div><div>{</div><div><span style="white-space:pre-wrap">        </span>xlog(&quot; ====== NOTIFY from $fu to $tu ======\n&quot;);</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(&quot; ====== NOTIFY to xmpp domain from $fu to $tu ======\n&quot;);</div>

<div><span style="white-space:pre-wrap">        </span>    t_reply(&quot;200&quot;, &quot;OK&quot;);</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(&quot;PUBLISH&quot;))</div><div>{</div><div><span style="white-space:pre-wrap">        </span>xlog(&quot;===== PUBLISH FROM $fu =====&quot;);</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(&quot;SUBSCRIBE&quot;))</div><div>{</div><div><span style="white-space:pre-wrap">        </span>handle_subscribe();</div>

<div><span style="white-space:pre-wrap">        </span>if(uri=~&quot;sip:.+[*].+@<a href="http://sip.sk" target="_blank">sip.sk</a>&quot;  &amp;&amp; $hdr(Event)== &quot;presence&quot;)</div><div><span style="white-space:pre-wrap">        </span>{</div>

<div><span style="white-space:pre-wrap">                </span>xlog(&quot; ====== SUBSCRIBE for XMPP domain from $fu to see $tu ======\n&quot;);</div><div><span style="white-space:pre-wrap">                </span>pua_xmpp_req_winfo(&quot;$ruri&quot;, &quot;$hdr(Expires)&quot;);</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 &quot; ==== NOTIFY msg ====&quot; 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>