[OpenSIPS-Users] Again BLF and Presence with Snom 7xx phones and OpenSips
sevpal
sevpal at aol.com
Thu Mar 19 16:45:41 CET 2015
You need to handle the in-dialog SUBSCRIBE requests. eg:
if has_totag() {
...
if (loose_route()) {
...
} else {
...
if (is_method("SUBSCRIBE")) {
route(2);
exit;
}
...
}
...
}
From: Bogdan-Andrei Iancu
Sent: Thursday, February 26, 2015 7:56 AM
To: OpenSIPS users mailling list ; mailto:michele.pinassi at unisi.it
Subject: Re: [OpenSIPS-Users] Again BLF and Presence with Snom 7xx phones and OpenSips
Hi Michele,
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 trace, ending with 404 and terminating the subscription).
In the " if ( has_totag() ) " block, you have:
} else {
if (is_method("SUBSCRIBE") && $rd == "127.0.0.1:5060") { # CUSTOMIZE ME
The $rd detection does not cover all your cases, as you configure the presence module to advertise as SIP contact "sip:presence at voip.unisi.it:5060". So, the test fails.
You can adapt the test like:
if (is_method("SUBSCRIBE") && $rd == "voip.unisi.it") { # CUSTOMIZE ME
Or set the contact in presence with the real IP:
modparam("presence", "server_address", mailto:sip:presence at 127.0.0.1:5060)
Best regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.comOn 24.02.2015 12:04, Michele Pinassi wrote:
Hi all,
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:
SUBSCRIBE sip:5020 at voip.unisi.it;user=phone SIP/2.0.
Via: SIP/2.0/UDP 172.20.1.10:57286;branch=z9hG4bK-nprg3gvnk4q1;rport.
From: mailto:sip:5002 at voip.unisi.it:5060;tag=nyux2omhly.
To: mailto:sip:5020 at voip.unisi.it;user=phone.
Call-ID: 3944ec54dc20-pfzjpjhrpm6p.
CSeq: 2 SUBSCRIBE.
Max-Forwards: 70.
Contact: mailto:sip:5002 at 172.20.1.10:57286;reg-id=1.
Event: dialog.
Accept: application/dialog-info+xml.
User-Agent: snom760/8.7.3.25.9.
Proxy-Authorization: Digest
Expires: 3600.
Content-Length: 0.
SIP/2.0 200 OK.
Via: SIP/2.0/UDP 172.20.1.10:57286;received=172.20.1.10;branch=z9hG4bK-nprg3gvnk4q1;rport=57286.
From: mailto:sip:5002 at voip.unisi.it:5060;tag=nyux2omhly.
To: mailto:sip:5020 at voip.unisi.it;user=phone;tag=f315b2d58ae8829149b784764c5a40e3-163d.
Call-ID: 3944ec54dc20-pfzjpjhrpm6p.
CSeq: 2 SUBSCRIBE.
Expires: 3600.
Contact: mailto:sip:presence at voip.unisi.it:5060.
Server: OpenSIPS (1.11.3-tls (i386/linux)).
Content-Length: 0.
NOTIFY sip:5002 at 172.20.1.10:57286 SIP/2.0.
Via: SIP/2.0/UDP 172.20.1.2:5060;branch=z9hG4bKdb02.83d58916.0.
To: mailto:sip:5002 at voip.unisi.it;tag=nyux2omhly.
From: mailto:sip:5020 at voip.unisi.it;tag=f315b2d58ae8829149b784764c5a40e3-163d.
CSeq: 1 NOTIFY.
Call-ID: 3944ec54dc20-pfzjpjhrpm6p.
Max-Forwards: 70.
Content-Length: 147.
User-Agent: OpenSIPS (1.11.3-tls (i386/linux)).
Event: dialog.
Contact: mailto:sip:presence at voip.unisi.it:5060.
Subscription-State: active;expires=3600.
Content-Type: application/dialog-info+xml.
.
<?xml version="1.0"?>
<dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info" version="0" state="full" entity=mailto:sip:5020 at voip.unisi.it/>
SIP/2.0 200 Ok.
Via: SIP/2.0/UDP 172.20.1.2:5060;branch=z9hG4bKdb02.83d58916.0.
From: mailto:sip:5020 at voip.unisi.it;tag=f315b2d58ae8829149b784764c5a40e3-163d.
To: mailto:sip:5002 at voip.unisi.it;tag=nyux2omhly.
Call-ID: 3944ec54dc20-pfzjpjhrpm6p.
CSeq: 1 NOTIFY.
Content-Length: 0.
SUBSCRIBE sip:presence at voip.unisi.it:5060 SIP/2.0.
Via: SIP/2.0/UDP 172.20.1.25:32768;branch=z9hG4bK-lbgnea3kuorq;rport.
From: mailto:sip:5007 at voip.unisi.it:5060;tag=w8vp9q5iyn.
To: mailto:sip:5002 at voip.unisi.it;user=phone;tag=f315b2d58ae8829149b784764c5a40e3-29cc.
Call-ID: 54ec3a578c9e-klgn0s3i32zo.
CSeq: 75 SUBSCRIBE.
Max-Forwards: 70.
Contact: mailto:sip:5007 at 172.20.1.25:32768;reg-id=1.
Event: dialog.
Accept: application/dialog-info+xml.
User-Agent: snom710/8.7.3.25.9.
Expires: 3600.
Content-Length: 0.
SIP/2.0 404 Not here.
Via: SIP/2.0/UDP 172.20.1.25:32768;received=172.20.1.25;branch=z9hG4bK-lbgnea3kuorq;rport=32768.
From: mailto:sip:5007 at voip.unisi.it:5060;tag=w8vp9q5iyn.
To: mailto:sip:5002 at voip.unisi.it;user=phone;tag=f315b2d58ae8829149b784764c5a40e3-29cc.
Call-ID: 54ec3a578c9e-klgn0s3i32zo.
CSeq: 75 SUBSCRIBE.
Server: OpenSIPS (1.11.3-tls (i386/linux)).
Content-Length: 0.
NOTIFY sip:5002 at 172.20.1.10:57286 SIP/2.0.
Via: SIP/2.0/UDP 172.20.1.2:5060;branch=z9hG4bKdbe9.7966c706.0.
To: mailto:sip:5002 at voip.unisi.it;tag=iklb1qjh1v.
From: mailto:sip:5007 at voip.unisi.it;tag=f315b2d58ae8829149b784764c5a40e3-b571.
CSeq: 2 NOTIFY.
Call-ID: ee35ec54a72b-draf1nwo4qn7.
Max-Forwards: 70.
Content-Length: 0.
User-Agent: OpenSIPS (1.11.3-tls (i386/linux)).
Event: dialog.
Contact: mailto:sip:presence at voip.unisi.it:5060.
Subscription-State: terminated;reason=timeout.
SIP/2.0 200 Ok.
Via: SIP/2.0/UDP 172.20.1.2:5060;branch=z9hG4bKdbe9.7966c706.0.
From: mailto:sip:5007 at voip.unisi.it;tag=f315b2d58ae8829149b784764c5a40e3-b571.
To: mailto:sip:5002 at voip.unisi.it;tag=iklb1qjh1v.
Call-ID: ee35ec54a72b-draf1nwo4qn7.
CSeq: 2 NOTIFY.
Content-Length: 0.
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.
The full opensips.cfg is available here: http://pastebin.com/e6SfbFfq
Thanks for any help.
Michele
--
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, http://www.faq.unisi.it
_______________________________________________
Users mailing list
Users at lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
--------------------------------------------------------------------------------
_______________________________________________
Users mailing list
Users at lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20150319/44b0715e/attachment-0001.htm>
More information about the Users
mailing list