<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Thanks fot the help.<br>
<br>
At the moment here's the situation. From my pone (5002 -
172.20.1.47) i watch 5030. Here's the LOG:<br>
<br>
Apr 9 10:03:26 proxy-voip01 /usr/sbin/opensips[28871]: Route
PRESENCE SUBSCRIBE ,To: 5030 ,From: 5002 ,RURI:
<a class="moz-txt-link-abbreviated" href="mailto:sip:5030@voip.unisi.it:5060;user=phone">sip:5030@voip.unisi.it:5060;user=phone</a><br>
Apr 9 10:03:26 proxy-voip01 /usr/sbin/opensips[28871]:
<a class="moz-txt-link-freetext" href="INFO:presence:update_subscription">INFO:presence:update_subscription</a>: notify<br>
Apr 9 10:03:26 proxy-voip01 /usr/sbin/opensips[28871]:
<a class="moz-txt-link-freetext" href="INFO:presence:send_notify_request">INFO:presence:send_notify_request</a>: NOTIFY <a class="moz-txt-link-abbreviated" href="mailto:sip:5002@voip.unisi.it">sip:5002@voip.unisi.it</a> via
<a class="moz-txt-link-abbreviated" href="mailto:sip:5002@172.20.1.47:57907">sip:5002@172.20.1.47:57907</a> on behalf of <a class="moz-txt-link-abbreviated" href="mailto:sip:5030@voip.unisi.it">sip:5030@voip.unisi.it</a> for
event dialog, to_tag=f315b2d58ae8829149b784764c5a40e3-a523, cseq=1<br>
<br>
and i have the row in active_watchers table (watchers table was
still empty). I suppose that, when someone call 5030, OpenSIPS
trigger a NOTIFY to 5002, right ?<br>
<br>
Sadly, the answer is NO :-(<br>
<br>
Here's the brief log whei i call 5030 from 2169:<br>
<br>
Apr 9 10:07:19 proxy-voip01 /usr/sbin/opensips[28870]: Context for
5030 is voip<br>
Apr 9 10:07:19 proxy-voip01 /usr/sbin/opensips[28870]: Route RELAY
INVITE ,To: 5030 ,From: 2169 ,RURI: <a class="moz-txt-link-abbreviated" href="mailto:sip:5030@172.20.1.39:32768">sip:5030@172.20.1.39:32768</a><br>
Apr 9 10:07:19 proxy-voip01 /usr/sbin/opensips[28870]: Route NEW
BRANCH
[<a class="moz-txt-link-abbreviated" href="mailto:172.20.1.4/sip:2169@172.20.1.4:5060/172.20.1.39/sip:5030@172.20.1.39:32768/172.20.1.4/">172.20.1.4/sip:2169@172.20.1.4:5060/172.20.1.39/sip:5030@172.20.1.39:32768/172.20.1.4/</a>]<br>
Apr 9 10:07:20 proxy-voip01 /usr/sbin/opensips[28870]: Registration
SUCCESS <a class="moz-txt-link-abbreviated" href="mailto:sip:5025@voip.unisi.it:5060">sip:5025@voip.unisi.it:5060</a><br>
Apr 9 10:07:20 proxy-voip01 /usr/sbin/opensips[28868]: Route
PRESENCE PUBLISH ,To: 5025 ,From: 5025 ,RURI:
<a class="moz-txt-link-abbreviated" href="mailto:sip:5025@voip.unisi.it:5060">sip:5025@voip.unisi.it:5060</a><br>
Apr 9 10:07:22 proxy-voip01 /usr/sbin/opensips[28869]: Route MISSED
CALL
[<a class="moz-txt-link-abbreviated" href="mailto:172.20.1.4/sip:2169@172.20.1.4:5060/172.20.1.39/sip:5030@172.20.1.39:32768/172.20.1.4/">172.20.1.4/sip:2169@172.20.1.4:5060/172.20.1.39/sip:5030@172.20.1.39:32768/172.20.1.4/</a>]<br>
<br>
and no NOTIFY was sent by OpenSIPS server (checked also with
siptrace).<br>
<br>
Here is my opensips.cfg: <a class="moz-txt-link-freetext" href="http://pastebin.com/YGvVrt6b">http://pastebin.com/YGvVrt6b</a><br>
<br>
Thanks for any help.<br>
<br>
Michele<br>
<br>
<br>
<div class="moz-cite-prefix">Il 19/03/2015 16:45, sevpal ha scritto:<br>
</div>
<blockquote cite="mid:8FD5BDF5F390435DA0908E29022FC007@LenovoPC"
type="cite">
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
<div dir="ltr">
<div style="FONT-SIZE: 12pt; FONT-FAMILY: 'Calibri'; COLOR:
#000000">
<div>You need to handle the in-dialog SUBSCRIBE requests. eg:</div>
<div> </div>
<div>if has_totag() {</div>
<div> ...</div>
<div> if (loose_route()) {</div>
<div> ...</div>
<div> } else {</div>
<div> ... </div>
<div><tt> if (is_method("SUBSCRIBE")) { </tt></div>
<div><tt> route(2);</tt></div>
<div><tt> exit; </tt></div>
<div><tt> }</tt></div>
<div><tt> ...</tt></div>
<div><tt> }</tt></div>
<div><tt> ... <br>
</tt>}</div>
<div style="FONT-SIZE: small; FONT-FAMILY: 'Calibri';
FONT-WEIGHT: normal; COLOR: #000000; FONT-STYLE: normal;
TEXT-DECORATION: none; DISPLAY: inline">
<div style="FONT: 10pt tahoma">
<div> </div>
<div style="BACKGROUND: #f5f5f5">
<div style="font-color: black"><b>From:</b> <a
moz-do-not-send="true" title="bogdan@opensips.org"
href="mailto:bogdan@opensips.org">Bogdan-Andrei
Iancu</a> </div>
<div><b>Sent:</b> Thursday, February 26, 2015 7:56 AM</div>
<div><b>To:</b> <a moz-do-not-send="true"
title="users@lists.opensips.org"
href="mailto:users@lists.opensips.org">OpenSIPS
users mailling list</a> ; <a moz-do-not-send="true"
title="michele.pinassi@unisi.it"
href="mailto:michele.pinassi@unisi.it">mailto:michele.pinassi@unisi.it</a>
</div>
<div><b>Subject:</b> Re: [OpenSIPS-Users] Again BLF and
Presence with Snom 7xx phones and OpenSips</div>
</div>
</div>
<div> </div>
</div>
<div style="FONT-SIZE: small; FONT-FAMILY: 'Calibri';
FONT-WEIGHT: normal; COLOR: #000000; FONT-STYLE: normal;
TEXT-DECORATION: none; DISPLAY: inline">
<div class="moz-cite-prefix"><tt>Hi Michele,</tt><tt><br>
</tt><tt><br>
</tt><tt>The problem in your script is that you do not
handle the sequential (in-dialog) SUBSCRIBE requests (as
you have the second one in your </tt><tt>trace, ending
with 404 and terminating the subscription).</tt><tt><br>
</tt><tt><br>
</tt><tt>In the " if ( has_totag() ) " </tt><tt>block,
you have:</tt><tt> </tt><tt><br>
</tt><tt> </tt><tt>} else {</tt>
<div class="de1"><tt> if (is_method("SUBSCRIBE")
&& $rd == "127.0.0.1:5060") { # CUSTOMIZE ME</tt><tt><br>
</tt><tt><br>
</tt><tt>The $rd detection does not cover all your
cases, as you configure the presence module to
advertise as SIP contact "</tt><tt><a
class="moz-txt-link-rfc2396E"
href="mailto:sip:presence@voip.unisi.it:5060"
moz-do-not-send="true">si<font color="#000000">p:presence@voip.unisi.it:5060</font></a></tt><tt>".
So, the test fails.</tt><tt><br>
</tt><tt><br>
</tt><tt>You can adapt the test like:</tt><tt><br>
</tt><tt> if (is_method("SUBSCRIBE") &&
$rd == "voip.unisi.it") { # CUSTOMIZE ME</tt><tt><br>
</tt><tt><br>
</tt><tt>Or set the contact in presence with the real
IP:</tt><tt><br>
</tt><tt> </tt><tt>modparam("presence",
"server_address", <a moz-do-not-send="true"
class="moz-txt-link-rfc2396E"
href="mailto:sip:presence@127.0.0.1:5060">mailto:sip:presence@127.0.0.1:5060</a>)</tt></div>
<tt><br>
Best regards,<br>
</tt>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
On 24.02.2015 12:04, Michele Pinassi wrote:<br>
</div>
<blockquote cite="mid:54EC4C92.8040204@unisi.it" type="cite">Hi
all,<br>
<br>
I'm still stuck on this issue: BLF not working. For
example, on my SNOM 760 (ext 5002) i activated BLF for
some ext, like 5020. Using SIPGREP i saw:<br>
<b><br>
</b><b>SUBSCRIBE <a class="moz-txt-link-abbreviated"
href="mailto:sip:5020@voip.unisi.it;user=phone"
moz-do-not-send="true">sip:5020@voip.unisi.it;user=phone</a>
SIP/2.0.</b><br>
Via: SIP/2.0/UDP
172.20.1.10:57286;branch=z9hG4bK-nprg3gvnk4q1;rport.<br>
From: <a class="moz-txt-link-rfc2396E"
href="mailto:sip:5002@voip.unisi.it:5060"
moz-do-not-send="true">mailto:sip:5002@voip.unisi.it:5060</a>;tag=nyux2omhly.<br>
To: <a class="moz-txt-link-rfc2396E"
href="mailto:sip:5020@voip.unisi.it;user=phone"
moz-do-not-send="true">mailto:sip:5020@voip.unisi.it;user=phone</a>.<br>
Call-ID: 3944ec54dc20-pfzjpjhrpm6p.<br>
CSeq: 2 SUBSCRIBE.<br>
Max-Forwards: 70.<br>
Contact: <a class="moz-txt-link-rfc2396E"
href="mailto:sip:5002@172.20.1.10:57286"
moz-do-not-send="true">mailto:sip:5002@172.20.1.10:57286</a>;reg-id=1.<br>
Event: dialog.<br>
Accept: application/dialog-info+xml.<br>
User-Agent: snom760/8.7.3.25.9.<br>
Proxy-Authorization: Digest <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:57286;received=172.20.1.10;branch=z9hG4bK-nprg3gvnk4q1;rport=57286.<br>
From: <a class="moz-txt-link-rfc2396E"
href="mailto:sip:5002@voip.unisi.it:5060"
moz-do-not-send="true">mailto:sip:5002@voip.unisi.it:5060</a>;tag=nyux2omhly.<br>
To: <a class="moz-txt-link-rfc2396E"
href="mailto:sip:5020@voip.unisi.it;user=phone"
moz-do-not-send="true">mailto:sip:5020@voip.unisi.it;user=phone</a>;tag=f315b2d58ae8829149b784764c5a40e3-163d.<br>
Call-ID: 3944ec54dc20-pfzjpjhrpm6p.<br>
CSeq: 2 SUBSCRIBE.<br>
Expires: 3600.<br>
Contact: <a class="moz-txt-link-rfc2396E"
href="mailto:sip:presence@voip.unisi.it:5060"
moz-do-not-send="true">mailto:sip:presence@voip.unisi.it:5060</a>.<br>
Server: OpenSIPS (1.11.3-tls (i386/linux)).<br>
Content-Length: 0.<br>
<br>
<b>NOTIFY <a class="moz-txt-link-abbreviated"
href="mailto:sip:5002@172.20.1.10:57286"
moz-do-not-send="true">sip:5002@172.20.1.10:57286</a>
SIP/2.0.</b><br>
Via: SIP/2.0/UDP
172.20.1.2:5060;branch=z9hG4bKdb02.83d58916.0.<br>
To: <a class="moz-txt-link-rfc2396E"
href="mailto:sip:5002@voip.unisi.it"
moz-do-not-send="true">mailto:sip:5002@voip.unisi.it</a>;tag=nyux2omhly.<br>
From: <a class="moz-txt-link-rfc2396E"
href="mailto:sip:5020@voip.unisi.it"
moz-do-not-send="true">mailto:sip:5020@voip.unisi.it</a>;tag=f315b2d58ae8829149b784764c5a40e3-163d.<br>
CSeq: 1 NOTIFY.<br>
Call-ID: 3944ec54dc20-pfzjpjhrpm6p.<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"
moz-do-not-send="true">mailto: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="0" state="full" entity=<a
class="moz-txt-link-rfc2396E"
href="mailto:sip:5020@voip.unisi.it"
moz-do-not-send="true">mailto:sip:5020@voip.unisi.it</a>/><br>
<b><br>
</b><b>SIP/2.0 200 Ok.</b><br>
Via: SIP/2.0/UDP
172.20.1.2:5060;branch=z9hG4bKdb02.83d58916.0.<br>
From: <a class="moz-txt-link-rfc2396E"
href="mailto:sip:5020@voip.unisi.it"
moz-do-not-send="true">mailto:sip:5020@voip.unisi.it</a>;tag=f315b2d58ae8829149b784764c5a40e3-163d.<br>
To: <a class="moz-txt-link-rfc2396E"
href="mailto:sip:5002@voip.unisi.it"
moz-do-not-send="true">mailto:sip:5002@voip.unisi.it</a>;tag=nyux2omhly.<br>
Call-ID: 3944ec54dc20-pfzjpjhrpm6p.<br>
CSeq: 1 NOTIFY.<br>
Content-Length: 0.<br>
<br>
<b>SUBSCRIBE <a class="moz-txt-link-abbreviated"
href="mailto:sip:presence@voip.unisi.it:5060"
moz-do-not-send="true">sip:presence@voip.unisi.it:5060</a>
SIP/2.0.</b><br>
Via: SIP/2.0/UDP
172.20.1.25:32768;branch=z9hG4bK-lbgnea3kuorq;rport.<br>
From: <a class="moz-txt-link-rfc2396E"
href="mailto:sip:5007@voip.unisi.it:5060"
moz-do-not-send="true">mailto:sip:5007@voip.unisi.it:5060</a>;tag=w8vp9q5iyn.<br>
To: <a class="moz-txt-link-rfc2396E"
href="mailto:sip:5002@voip.unisi.it;user=phone"
moz-do-not-send="true">mailto:sip:5002@voip.unisi.it;user=phone</a>;tag=f315b2d58ae8829149b784764c5a40e3-29cc.<br>
Call-ID: 54ec3a578c9e-klgn0s3i32zo.<br>
CSeq: 75 SUBSCRIBE.<br>
Max-Forwards: 70.<br>
Contact: <a class="moz-txt-link-rfc2396E"
href="mailto:sip:5007@172.20.1.25:32768"
moz-do-not-send="true">mailto:sip:5007@172.20.1.25:32768</a>;reg-id=1.<br>
Event: dialog.<br>
Accept: application/dialog-info+xml.<br>
User-Agent: snom710/8.7.3.25.9.<br>
Expires: 3600.<br>
Content-Length: 0.<br>
<b><br>
</b><b>SIP/2.0 404 Not here.</b><br>
Via: SIP/2.0/UDP
172.20.1.25:32768;received=172.20.1.25;branch=z9hG4bK-lbgnea3kuorq;rport=32768.<br>
From: <a class="moz-txt-link-rfc2396E"
href="mailto:sip:5007@voip.unisi.it:5060"
moz-do-not-send="true">mailto:sip:5007@voip.unisi.it:5060</a>;tag=w8vp9q5iyn.<br>
To: <a class="moz-txt-link-rfc2396E"
href="mailto:sip:5002@voip.unisi.it;user=phone"
moz-do-not-send="true">mailto:sip:5002@voip.unisi.it;user=phone</a>;tag=f315b2d58ae8829149b784764c5a40e3-29cc.<br>
Call-ID: 54ec3a578c9e-klgn0s3i32zo.<br>
CSeq: 75 SUBSCRIBE.<br>
Server: OpenSIPS (1.11.3-tls (i386/linux)).<br>
Content-Length: 0.<br>
<br>
<b>NOTIFY <a class="moz-txt-link-abbreviated"
href="mailto:sip:5002@172.20.1.10:57286"
moz-do-not-send="true">sip:5002@172.20.1.10:57286</a>
SIP/2.0.</b><br>
Via: SIP/2.0/UDP
172.20.1.2:5060;branch=z9hG4bKdbe9.7966c706.0.<br>
To: <a class="moz-txt-link-rfc2396E"
href="mailto:sip:5002@voip.unisi.it"
moz-do-not-send="true">mailto:sip:5002@voip.unisi.it</a>;tag=iklb1qjh1v.<br>
From: <a class="moz-txt-link-rfc2396E"
href="mailto:sip:5007@voip.unisi.it"
moz-do-not-send="true">mailto:sip:5007@voip.unisi.it</a>;tag=f315b2d58ae8829149b784764c5a40e3-b571.<br>
CSeq: 2 NOTIFY.<br>
Call-ID: ee35ec54a72b-draf1nwo4qn7.<br>
Max-Forwards: 70.<br>
Content-Length: 0.<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"
moz-do-not-send="true">mailto:sip:presence@voip.unisi.it:5060</a>.<br>
<b>Subscription-State: terminated;reason=timeout.</b><br>
<b><br>
</b><b>SIP/2.0 200 Ok.</b><br>
Via: SIP/2.0/UDP
172.20.1.2:5060;branch=z9hG4bKdbe9.7966c706.0.<br>
From: <a class="moz-txt-link-rfc2396E"
href="mailto:sip:5007@voip.unisi.it"
moz-do-not-send="true">mailto:sip:5007@voip.unisi.it</a>;tag=f315b2d58ae8829149b784764c5a40e3-b571.<br>
To: <a class="moz-txt-link-rfc2396E"
href="mailto:sip:5002@voip.unisi.it"
moz-do-not-send="true">mailto:sip:5002@voip.unisi.it</a>;tag=iklb1qjh1v.<br>
Call-ID: ee35ec54a72b-draf1nwo4qn7.<br>
CSeq: 2 NOTIFY.<br>
Content-Length: 0.<br>
<br>
The line 5020 was active but no lamp was powered. Also no
NOTIFY or other event was sent by Opensips server when i
try to call (from another phone) 5020.<br>
<br>
The full opensips.cfg is available here: <a
class="moz-txt-link-freetext"
href="http://pastebin.com/e6SfbFfq"
moz-do-not-send="true">http://pastebin.com/e6SfbFfq</a><br>
<br>
Thanks for any help.<br>
<br>
Michele<br>
<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" moz-do-not-send="true">http://www.faq.unisi.it</a> </pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
<p>
</p>
<hr>
_______________________________________________<br>
Users mailing list<br>
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</div>
</div>
</div>
</blockquote>
<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>