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