Hi Anca<br>I am using 1.5.1 version of opensips and I have pua_xmpp_req_winfo call in my cfg file. I get NOTIFY for Watcher Info with the watcherinfo+xml payoad. But there is no presence state communication sent from Jabber2 server to opensips. Did you look at the debug output document that I sent you ?. That should have it all.<br>
<br>Here is my config file.<br><br><br># main request routing logic<br><br>route{<br><br> # initial sanity checks -- messages with<br> # max_forwards==0, or excessively long requests<br> if (!mf_process_maxfwd_header("10")) {<br>
sl_send_reply("483","Too Many Hops");<br> exit;<br> };<br><br> #if (msg:len >= 2048 ) {<br> # sl_send_reply("513", "Message too big");<br>
# exit;<br> #};<br><br> # we record-route all messages -- to make sure that<br> # subsequent messages will go through our proxy; that's<br> # particularly good if upstream and downstream entities<br>
# use different transport protocol<br> if (!method=="REGISTER")<br> record_route();<br><br> # subsequent messages withing a dialog should take the<br> # path determined by record-routing<br>
if (loose_route()) {<br> # mark routing logic in request<br> append_hf("P-hint: rr-enforced\r\n");<br> route(1);<br> };<br> if(method == "INVITE")<br>
setflag(5);<br><br> if( uri=~"<a href="mailto:sip%3A.%2B@sip-xmpp.smithmicro.com">sip:.+@sip-xmpp.smithmicro.com</a>" ||<br> uri=~"<a href="mailto:sip%3A.%2B@sip-xmpp.smithmicro.com">sip:.+@sip-xmpp.smithmicro.com</a>" ||<br>
uri=~"<a href="mailto:sip%3A.%2B@sips01.smithmicro.com">sip:.+@sips01.smithmicro.com</a>")<br> {<br> if( is_method("PUBLISH|SUBSCRIBE|NOTIFY"))<br> route(2);<br>
}<br><br> if( uri=~"<a href="mailto:sip%3A.%2B@sip-xmpp.smithmicro.com">sip:.+@sip-xmpp.smithmicro.com</a>")<br> {<br> # absorb retransmissions ###<br> if (!t_newtran()) {<br>
sl_reply_error();<br> return;<br> }<br> if (method == "MESSAGE") {<br> log("*** xmpp-handled MESSAGE message.\n");<br>
if (xmpp_send_message()) {<br> t_reply("200", "Accepted");<br> } else {<br> t_reply("404", "Not found");<br>
}<br> return;<br> }else {<br> t_reply("403","not supported");<br> exit;<br> }<br>
<br> }<br><br> if (!uri==myself) {<br> # mark routing logic in request<br> append_hf("P-hint: outbound\r\n");<br> # if you have some interdomain connections via TLS<br>
#if(uri=~"@<a href="http://tls_domain1.net">tls_domain1.net</a>") {<br> # t_relay("tls:<a href="http://domain1.net">domain1.net</a>");<br> # exit;<br>
#} else if(uri=~"@<a href="http://tls_domain2.net">tls_domain2.net</a>") {<br> # t_relay("tls:<a href="http://domain2.net">domain2.net</a>");<br> # exit;<br>
#}<br> route(1);<br> };<br><br> # if the request is for other domain use UsrLoc<br> # (in case, it does not work, use the following command<br> # with proper names and addresses in it)<br>
if (uri==myself) {<br><br> if( is_method("PUBLISH|SUBSCRIBE|NOTIFY"))<br> route(2);<br><br> if (method=="REGISTER") {<br><br> if (!www_authorize("", "subscriber"))<br>
{<br> www_challenge("", "0");<br> exit;<br> }<br><br> if (!check_to())<br>
{<br> sl_send_reply("403","Forbidden auth ID");<br> exit;<br> }<br><br> if (!save("location"))<br>
sl_reply_error();<br><br> exit;<br> };<br><br> # native SIP destinations are handled using our USRLOC DB<br> if (!lookup("location")) {<br>
sl_send_reply("404", "Not Found");<br> exit;<br> };<br> append_hf("P-hint: usrloc applied\r\n");<br> };<br>
<br> route(1);<br>}<br><br>route[1] {<br> # send it out now; use stateful forwarding as it works reliably<br> # even for UDP2TCP<br> if (!t_relay()) {<br> sl_reply_error();<br> };<br>
exit;<br>}<br><br>route[2]<br>{<br> if ( !t_newtran() ){<br> sl_reply_error();<br> exit;<br> };<br><br> if( is_method("NOTIFY") && uri=~"<a href="mailto:sip%3A.%2B@sip-xmpp.smithmicro.com">sip:.+@sip-xmpp.smithmicro.com</a>"){<br>
pua_xmpp_notify();<br> t_reply("200", "OK");<br> exit;<br> }<br><br> if(is_method("PUBLISH")){<br> handle_publish();<br>
#t_release();<br> /* the call to t_release is no longer needed in 1.5 */<br> }<br> else<br> if( is_method("SUBSCRIBE")){<br> handle_subscribe();<br>
if( uri=~"<a href="mailto:sip%3A.%2B@sip-xmpp.smithmicro.com">sip:.+@sip-xmpp.smithmicro.com</a>" && $hdr(Event)== "pres ence"){<br>
pua_xmpp_req_winfo("$ruri", "$hdr(Expires)");<br> }<br> #t_release();<br> /* the call to t_release is no longer needed in 1.5 */<br>
}<br> exit;<br>}<br><br><br><div class="gmail_quote">On Thu, Jun 25, 2009 at 7:26 AM, Anca Vamanu <span dir="ltr"><<a href="mailto:anca@opensips.org">anca@opensips.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Mani,<br>
<br>
I order to have opensips send subscribe messages to jabber, you need to call 'pua_xmpp_req_winfo("$ruri", "$hdr(Expires)");' when you see from the script that a Subscribe request is sent to a jabber contact. This is the function responsible for sending subscribe messages to jabber.<br>
<br>
What opensips version are you using?<div class="im"><br>
<br>
regards,<br>
Anca<br>
<br>
mani sivaraman wrote:<br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">
Hi Anca<br>
I do not see any xmpp subscribe packet request sent from opensips to jabber server. That's the reason why jabber server is not sending any presence notify to opensips. Jabber sends the xmpp status to other clients like pidgin.<br>
<br>
When I add a xmpp buddy to sip client, I get the Subscriber/200 OK response. I can see the output saying subscribe sent in behalf of xmpp buddy.. etc. But this is just a sip subscribe output. I do not see any xmpp subscribe sent to jabber server from opensips. What is blocking opensips from sendsing the xmpp subscribes to jabber server ?<br>
<br>
Please let me know.<br>
<br></div><div class="im">
On Wed, Jun 24, 2009 at 11:12 AM, mani sivaraman <<a href="mailto:mani.opensips@gmail.com" target="_blank">mani.opensips@gmail.com</a> <mailto:<a href="mailto:mani.opensips@gmail.com" target="_blank">mani.opensips@gmail.com</a>>> wrote:<br>
<br>
Oh wait, this xml packet is destined to "<a href="mailto:jabb2@xmpp.smithmicro.com" target="_blank">jabb2@xmpp.smithmicro.com</a><br></div>
<<a href="http://jabb2" target="_blank">http://jabb2</a>@<a href="http://xmpp.smithmicro.com/275c37159368" target="_blank">xmpp.smithmicro.com/275c37159368</a>>" , not opensips<div class="im"><br>
c2s interface. Since all status goes out from 5347 to all xmpp<br>
clients, I have to separate out the opensips port connected to<br>
5347 and then try. I found it to be dynamic port 59284. After<br>
doing ngrep on that port I see opensips sending all status update<br>
to 5347, but not other way. The only packet from 5347 to 59284 is<br>
a probe to know if the an offline sip buddy is available (last<br>
couple of packets)<br>
<br>
Here is the ngrep output<br>
<br>
sips01:/etc/jabberd2# ngrep -d lo port 59284<br></div>
interface: lo (<a href="http://127.0.0.0/255.0.0.0" target="_blank">127.0.0.0/255.0.0.0</a> <<a href="http://127.0.0.0/255.0.0.0" target="_blank">http://127.0.0.0/255.0.0.0</a>>)<div class="im"><br>
filter: (ip or ip6) and ( port 59284 )<br>
#<br></div>
T <a href="http://172.16.0.139:59284" target="_blank">172.16.0.139:59284</a> <<a href="http://172.16.0.139:59284" target="_blank">http://172.16.0.139:59284</a>> -><br>
<a href="http://172.16.0.139:5347" target="_blank">172.16.0.139:5347</a> <<a href="http://172.16.0.139:5347" target="_blank">http://172.16.0.139:5347</a>> [AP]<div class="im"><br>
<presence to="<a href="mailto:jabb2@xmpp.smithmicro.com" target="_blank">jabb2@xmpp.smithmicro.com</a><br></div>
<mailto:<a href="mailto:jabb2@xmpp.smithmicro.com" target="_blank">jabb2@xmpp.smithmicro.com</a>>"<div class="im"><br>
from="rboxall*<a href="http://sips01.smithmicro.com" target="_blank">sips01.smithmicro.com</a><br></div>
<<a href="http://sips01.smithmicro.com" target="_blank">http://sips01.smithmicro.com</a>>@<a href="http://xmpp-sip.smithmicro.com" target="_blank">xmpp-sip.smithmicro.com</a><br>
<<a href="http://xmpp-sip.smithmicro.com" target="_blank">http://xmpp-sip.smithmicro.com</a>>"<br>
type="unavailable"/><br>
##<br>
T <a href="http://172.16.0.139:59284" target="_blank">172.16.0.139:59284</a> <<a href="http://172.16.0.139:59284" target="_blank">http://172.16.0.139:59284</a>> -><br>
<a href="http://172.16.0.139:5347" target="_blank">172.16.0.139:5347</a> <<a href="http://172.16.0.139:5347" target="_blank">http://172.16.0.139:5347</a>> [AP]<div class="im"><br>
<presence to="<a href="mailto:jabb1@xmpp.smithmicro.com" target="_blank">jabb1@xmpp.smithmicro.com</a><br></div>
<mailto:<a href="mailto:jabb1@xmpp.smithmicro.com" target="_blank">jabb1@xmpp.smithmicro.com</a>>"<div class="im"><br>
from="rboxall*<a href="http://sips01.smithmicro.com" target="_blank">sips01.smithmicro.com</a><br></div>
<<a href="http://sips01.smithmicro.com" target="_blank">http://sips01.smithmicro.com</a>>@<a href="http://xmpp-sip.smithmicro.com" target="_blank">xmpp-sip.smithmicro.com</a><br>
<<a href="http://xmpp-sip.smithmicro.com" target="_blank">http://xmpp-sip.smithmicro.com</a>>"<br>
type="unavailable"/><br>
##<br>
T <a href="http://172.16.0.139:59284" target="_blank">172.16.0.139:59284</a> <<a href="http://172.16.0.139:59284" target="_blank">http://172.16.0.139:59284</a>> -><br>
<a href="http://172.16.0.139:5347" target="_blank">172.16.0.139:5347</a> <<a href="http://172.16.0.139:5347" target="_blank">http://172.16.0.139:5347</a>> [AP]<div class="im"><br>
<presence to="<a href="mailto:jabb2@xmpp.smithmicro.com" target="_blank">jabb2@xmpp.smithmicro.com</a><br></div>
<mailto:<a href="mailto:jabb2@xmpp.smithmicro.com" target="_blank">jabb2@xmpp.smithmicro.com</a>>"<div class="im"><br>
from="rboxall*<a href="http://sips01.smithmicro.com" target="_blank">sips01.smithmicro.com</a><br></div>
<<a href="http://sips01.smithmicro.com" target="_blank">http://sips01.smithmicro.com</a>>@<a href="http://xmpp-sip.smithmicro.com" target="_blank">xmpp-sip.smithmicro.com</a><br>
<<a href="http://xmpp-sip.smithmicro.com" target="_blank">http://xmpp-sip.smithmicro.com</a>>"><div class="im"><br>
. <status>hi there !!!</status>. <priority>0.00</priority>. </presence><br>
##<br></div>
T <a href="http://172.16.0.139:59284" target="_blank">172.16.0.139:59284</a> <<a href="http://172.16.0.139:59284" target="_blank">http://172.16.0.139:59284</a>> -><br>
<a href="http://172.16.0.139:5347" target="_blank">172.16.0.139:5347</a> <<a href="http://172.16.0.139:5347" target="_blank">http://172.16.0.139:5347</a>> [AP]<div class="im"><br>
<presence to="<a href="mailto:jabb1@xmpp.smithmicro.com" target="_blank">jabb1@xmpp.smithmicro.com</a><br></div>
<mailto:<a href="mailto:jabb1@xmpp.smithmicro.com" target="_blank">jabb1@xmpp.smithmicro.com</a>>"<div class="im"><br>
from="rboxall*<a href="http://sips01.smithmicro.com" target="_blank">sips01.smithmicro.com</a><br></div>
<<a href="http://sips01.smithmicro.com" target="_blank">http://sips01.smithmicro.com</a>>@<a href="http://xmpp-sip.smithmicro.com" target="_blank">xmpp-sip.smithmicro.com</a><br>
<<a href="http://xmpp-sip.smithmicro.com" target="_blank">http://xmpp-sip.smithmicro.com</a>>"><div class="im"><br>
. <status>hi there !!!</status>. <priority>0.00</priority>. </presence><br>
##<br></div>
T <a href="http://172.16.0.139:5347" target="_blank">172.16.0.139:5347</a> <<a href="http://172.16.0.139:5347" target="_blank">http://172.16.0.139:5347</a>> -><br>
<a href="http://172.16.0.139:59284" target="_blank">172.16.0.139:59284</a> <<a href="http://172.16.0.139:59284" target="_blank">http://172.16.0.139:59284</a>> [AP]<div class="im"><br>
<presence xmlns='jabber:client' type='probe'<br>
to='rboxall*<a href="http://sips01.smithmicro.com" target="_blank">sips01.smithmicro.com</a><br></div>
<<a href="http://sips01.smithmicro.com" target="_blank">http://sips01.smithmicro.com</a>>@<a href="http://xmpp-sip.smithmicro.com" target="_blank">xmpp-sip.smithmicro.com</a><br>
<<a href="http://xmpp-sip.smithmicro.com" target="_blank">http://xmpp-sip.smithmicro.com</a>>' from='jabb1<br>
@<a href="http://xmpp.smithmicro.com" target="_blank">xmpp.smithmicro.com</a> <<a href="http://xmpp.smithmicro.com" target="_blank">http://xmpp.smithmicro.com</a>>'/><br>
##<br>
T <a href="http://172.16.0.139:59284" target="_blank">172.16.0.139:59284</a> <<a href="http://172.16.0.139:59284" target="_blank">http://172.16.0.139:59284</a>> -><br>
<a href="http://172.16.0.139:5347" target="_blank">172.16.0.139:5347</a> <<a href="http://172.16.0.139:5347" target="_blank">http://172.16.0.139:5347</a>> [AP]<div class="im"><br>
<presence to="<a href="mailto:jabb1@xmpp.smithmicro.com" target="_blank">jabb1@xmpp.smithmicro.com</a><br></div>
<mailto:<a href="mailto:jabb1@xmpp.smithmicro.com" target="_blank">jabb1@xmpp.smithmicro.com</a>>"<div class="im"><br>
from="rboxall*<a href="http://sips01.smithmicro.com" target="_blank">sips01.smithmicro.com</a><br></div>
<<a href="http://sips01.smithmicro.com" target="_blank">http://sips01.smithmicro.com</a>>@<a href="http://xmpp-sip.smithmicro.com" target="_blank">xmpp-sip.smithmicro.com</a><br>
<<a href="http://xmpp-sip.smithmicro.com" target="_blank">http://xmpp-sip.smithmicro.com</a>>">. <status><div class="im"><br>
hi there !!!</status>. <priority>0.00</priority>. </presence><br>
##<br></div>
T <a href="http://172.16.0.139:5347" target="_blank">172.16.0.139:5347</a> <<a href="http://172.16.0.139:5347" target="_blank">http://172.16.0.139:5347</a>> -><br>
<a href="http://172.16.0.139:59284" target="_blank">172.16.0.139:59284</a> <<a href="http://172.16.0.139:59284" target="_blank">http://172.16.0.139:59284</a>> [AP]<div class="im"><br>
<presence xmlns='jabber:client' type='probe'<br>
to='msivaraman*<a href="http://sips01.smithmicro.com" target="_blank">sips01.smithmicro.com</a><br></div>
<<a href="http://sips01.smithmicro.com" target="_blank">http://sips01.smithmicro.com</a>>@<a href="http://xmpp-sip.smithmicro.com" target="_blank">xmpp-sip.smithmicro.com</a><br>
<<a href="http://xmpp-sip.smithmicro.com" target="_blank">http://xmpp-sip.smithmicro.com</a>>' from='ja<br>
<a href="mailto:bb1@xmpp.smithmicro.com" target="_blank">bb1@xmpp.smithmicro.com</a> <mailto:<a href="mailto:bb1@xmpp.smithmicro.com" target="_blank">bb1@xmpp.smithmicro.com</a>>'/><br>
#<br>
T <a href="http://172.16.0.139:59284" target="_blank">172.16.0.139:59284</a> <<a href="http://172.16.0.139:59284" target="_blank">http://172.16.0.139:59284</a>> -><br>
<a href="http://172.16.0.139:5347" target="_blank">172.16.0.139:5347</a> <<a href="http://172.16.0.139:5347" target="_blank">http://172.16.0.139:5347</a>> [AP]<div class="im"><br>
<presence to="<a href="mailto:jabb1@xmpp.smithmicro.com" target="_blank">jabb1@xmpp.smithmicro.com</a><br></div>
<mailto:<a href="mailto:jabb1@xmpp.smithmicro.com" target="_blank">jabb1@xmpp.smithmicro.com</a>>"<div class="im"><br>
from="msivaraman*<a href="http://sips01.smithmicro.com" target="_blank">sips01.smithmicro.com</a><br></div>
<<a href="http://sips01.smithmicro.com" target="_blank">http://sips01.smithmicro.com</a>>@<a href="http://xmpp-sip.smithmicro.com" target="_blank">xmpp-sip.smithmicro.com</a><br>
<<a href="http://xmpp-sip.smithmicro.com" target="_blank">http://xmpp-sip.smithmicro.com</a>>" type="unav<br>
ailable"/><br>
<br>
<br>
</blockquote>
<br>
</blockquote></div><br>