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 class="Apple-tab-span" style="white-space:pre">        </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">sip.sk</a>&quot;)</div><div>{</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>xlog(&quot; ====== NOTIFY from $fu to $tu ======\n&quot;);</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>if(pua_xmpp_notify())</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>{</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>xlog(&quot; ====== NOTIFY to xmpp domain from $fu to $tu ======\n&quot;);</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>    t_reply(&quot;200&quot;, &quot;OK&quot;);</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>}</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>exit;</div>
<div>}</div><div>if(is_method(&quot;PUBLISH&quot;))</div><div>{</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>xlog(&quot;===== PUBLISH FROM $fu =====&quot;);</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>handle_publish();</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>t_release();</div><div>}</div><div>else</div><div>if( is_method(&quot;SUBSCRIBE&quot;))</div><div>{</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>handle_subscribe();</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>if(uri=~&quot;sip:.+[*].+@<a href="http://sip.sk">sip.sk</a>&quot;  &amp;&amp; $hdr(Event)== &quot;presence&quot;)</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>{</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>xlog(&quot; ====== SUBSCRIBE for XMPP domain from $fu to see $tu ======\n&quot;);</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>pua_xmpp_req_winfo(&quot;$ruri&quot;, &quot;$hdr(Expires)&quot;);</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>}</div><div><span class="Apple-tab-span" style="white-space:pre">        </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>