<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-15">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi all,<br>
<br>
my fight to have Presence and BLF working continue. Here's a "step
by step" trace when, on my phone with account 5002, i enabled a BLF
for account 5008. I use OpenSIPS 1.11.3-tls.<br>
<br>
First, the phone send SUBSCRIBE packet:<br>
<br>
<b>SUBSCRIBE <a class="moz-txt-link-abbreviated" href="mailto:sip:presence@voip.unisi.it:5060">sip:presence@voip.unisi.it:5060</a> SIP/2.0
</b><br>
Via: SIP/2.0/UDP
172.20.1.10:37508;branch=z9hG4bK-h30k6rwp6oy5;rport
<br>
From: <a class="moz-txt-link-rfc2396E" href="mailto:sip:5002@voip.unisi.it:5060"><sip:5002@voip.unisi.it:5060></a>;tag=pkntk9npjh
<br>
To:
<a class="moz-txt-link-rfc2396E" href="mailto:sip:5008@voip.unisi.it:5060;user=phone"><sip:5008@voip.unisi.it:5060;user=phone></a>;tag=f315b2d58ae8829149b784764c5a40e3-2387
<br>
Call-ID: 54b1fe548d09-v32qemyjagpv
<br>
CSeq: 3 SUBSCRIBE
<br>
Max-Forwards: 70
<br>
Contact: <a class="moz-txt-link-rfc2396E" href="mailto:sip:5002@172.20.1.10:37508"><sip:5002@172.20.1.10:37508></a>;reg-id=1
<br>
Event: dialog
<br>
Accept: application/dialog-info+xml
<br>
User-Agent: snom760/8.7.3.25.9
<br>
Expires: 3600
<br>
Content-Length: 0
<br>
<br>
<b>SIP/2.0 200 OK
</b><br>
Via: SIP/2.0/UDP
172.20.1.10:37508;received=172.20.1.10;branch=z9hG4bK-h30k6rwp6oy5;rport=37508
<br>
From: <a class="moz-txt-link-rfc2396E" href="mailto:sip:5002@voip.unisi.it:5060"><sip:5002@voip.unisi.it:5060></a>;tag=pkntk9npjh
<br>
To:
<a class="moz-txt-link-rfc2396E" href="mailto:sip:5008@voip.unisi.it:5060;user=phone"><sip:5008@voip.unisi.it:5060;user=phone></a>;tag=f315b2d58ae8829149b784764c5a40e3-2387
<br>
Call-ID: 54b1fe548d09-v32qemyjagpv
<br>
CSeq: 3 SUBSCRIBE
<br>
Expires: 3600
<br>
Contact: <a class="moz-txt-link-rfc2396E" href="mailto:sip:presence@voip.unisi.it:5060"><sip:presence@voip.unisi.it:5060></a>
<br>
Server: OpenSIPS (1.11.3-tls (i386/linux))
<br>
Content-Length: 0<br>
<br>
Afterward, i get a NOTIFY with the state of the phone:<br>
<br>
<b>NOTIFY <a class="moz-txt-link-abbreviated" href="mailto:sip:5002@172.20.1.10:37508">sip:5002@172.20.1.10:37508</a> SIP/2.0
</b><br>
Via: SIP/2.0/UDP 172.20.1.2:5060;branch=z9hG4bK4e24.38cd2ef4.0
<br>
To: <a class="moz-txt-link-rfc2396E" href="mailto:sip:5002@voip.unisi.it"><sip:5002@voip.unisi.it></a>;tag=pkntk9npjh
<br>
From:
<a class="moz-txt-link-rfc2396E" href="mailto:sip:5008@voip.unisi.it"><sip:5008@voip.unisi.it></a>;tag=f315b2d58ae8829149b784764c5a40e3-2387
<br>
CSeq: 2 NOTIFY
<br>
Call-ID: 54b1fe548d09-v32qemyjagpv
<br>
Max-Forwards: 70
<br>
Content-Length: 147
<br>
User-Agent: OpenSIPS (1.11.3-tls (i386/linux))
<br>
Event: dialog
<br>
Contact: <a class="moz-txt-link-rfc2396E" href="mailto:sip:presence@voip.unisi.it:5060"><sip:presence@voip.unisi.it:5060></a>
<br>
Subscription-State: active;expires=3600
<br>
Content-Type: application/dialog-info+xml
<br>
<br>
<?xml version="1.0"?><br>
<dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info"
version="1" state="full"
entity=<a class="moz-txt-link-rfc2396E" href="mailto:sip:5008@voip.unisi.it">"sip:5008@voip.unisi.it"</a>/><br>
<br>
<b>SIP/2.0 200 Ok
</b><br>
Via: SIP/2.0/UDP 172.20.1.2:5060;branch=z9hG4bK4e24.38cd2ef4.0
<br>
From:
<a class="moz-txt-link-rfc2396E" href="mailto:sip:5008@voip.unisi.it"><sip:5008@voip.unisi.it></a>;tag=f315b2d58ae8829149b784764c5a40e3-2387
<br>
To: <a class="moz-txt-link-rfc2396E" href="mailto:sip:5002@voip.unisi.it"><sip:5002@voip.unisi.it></a>;tag=pkntk9npjh
<br>
Call-ID: 54b1fe548d09-v32qemyjagpv
<br>
CSeq: 2 NOTIFY
<br>
Content-Length: 0<br>
<br>
<br>
At this point i expect a NOTIFY packet when 5008 was busy but none.
Of course i have a row on active_watchers table.<br>
<br>
My config for PRESENCE and PUA is:<br>
<br>
#### PRESENCE modules<br>
loadmodule "presence.so"<br>
loadmodule "presence_mwi.so"<br>
loadmodule "presence_callinfo.so"<br>
loadmodule "presence_xml.so"<br>
loadmodule "presence_dialoginfo.so"<br>
<br>
modparam("presence", "server_address",
<a class="moz-txt-link-rfc2396E" href="mailto:sip:presence@voip.unisi.it:5060">"sip:presence@voip.unisi.it:5060"</a>)<br>
modparam("presence", "notify_offline_body", 1)<br>
modparam("presence", "fallback2db", 1)<br>
modparam("presence", "clean_period", 30)<br>
modparam("presence", "mix_dialog_presence", 1)<br>
<br>
modparam("presence_xml","force_active",1)<br>
<br>
#### PUA module<br>
loadmodule "pua.so"<br>
loadmodule "pua_dialoginfo.so"<br>
loadmodule "pua_usrloc.so"<br>
<br>
modparam("pua_dialoginfo", "presence_server",
<a class="moz-txt-link-rfc2396E" href="mailto:sip:presence@voip.unisi.it:5060">"sip:presence@voip.unisi.it:5060"</a>)<br>
modparam("pua_dialoginfo", "include_callid", 1)<br>
modparam("pua_dialoginfo", "include_tags", 1)<br>
modparam("pua_dialoginfo", "include_localremote", 1)<br>
modparam("pua_dialoginfo", "publish_on_trying", 1)<br>
<br>
modparam("pua_usrloc", "default_domain", "voip.unisi.it")<br>
<br>
and on main() route logic i have:<br>
<br>
### PRESENCE<br>
if(is_method("PUBLISH|SUBSCRIBE")) {<br>
route(handle_presence);<br>
}<br>
[....]<br>
<br>
# Presence route<br>
<br>
route[handle_presence] {<br>
xlog("L_INFO","Route PRESENCE on $rm [$fd/$fu/$rd/$ru/$si/]\n");<br>
if(!t_newtran()){<br>
sl_reply_error();<br>
exit;<br>
}<br>
<br>
if (is_method("PUBLISH")) {<br>
if($hdr(Sender)!= NULL)<br>
handle_publish("$hdr(Sender)");<br>
else<br>
handle_publish();<br>
}<br>
<br>
if (is_method("SUBSCRIBE")) {<br>
if(search("^Event: message-summary")) {<br>
# if there is no R-URI username, grab From URI<br>
if(!uri=~"sip:.+@") { # add From username as R-URI
username<br>
avp_pushto("$ruri/username","$fU");<br>
}<br>
# fix some broken subscriptions<br>
if(!search("^Accept:
application/simple-message-summary")) {<br>
append_hf("Accept:
application/simple-message-summary\r\n");<br>
}<br>
setdsturi("sip:172.20.1.5:5060");<br>
t_relay();<br>
} else {<br>
handle_subscribe();<br>
}<br>
}<br>
exit;<br>
}<br>
<br>
Just for info, the MWI (using Asterisk) works perfectly...<br>
<br>
Any suggestions ? Hints ?<br>
<br>
Thanks, Michele<br>
<pre class="moz-signature" cols="72">--
Michele Pinassi
Responsabile Telefonia di Ateneo
Servizio Reti, Sistemi e Sicurezza Informatica - Universitą degli Studi di Siena
tel: 0577.(23)5000 - fax: 0577.(23)2053
Per trovare una soluzione rapida ai tuoi problemi tecnici
consulta le FAQ di Ateneo, <a class="moz-txt-link-freetext" href="http://www.faq.unisi.it">http://www.faq.unisi.it</a> </pre>
</body>
</html>