Call Pickup On Channel Sip With SNOM Phones Issue
Hi,
while trying to get my new Asterisk 15.5.0 PBX replacing a 11 years old Asterisk 1.2.31 ISDN BPX, I’m stuck to get call pickup going as usual. The old one uses specific patches, IIRC…
If I interpret various sources of related information correctly, current Asterisk versions should support this feature out of the box.
According to http://wiki.snom.com/Category:HowTo:Call_Pickup, there are several ways to get this feature going. I’m enjoying method (1) since ages, but I couldn’t get asterisk to send the full NOTIFY xml dialog-info including call-id, remote and local values, although setting context = phones allowsubscribe = yes subscribecontext = phones notifyringing = yes notifycid = ignore-context
as well as callgroup = 1
pickupgroup = 1
for every local phone (all snom, mostly 360 phones) in sip.conf.
[phones]
exten => 60,hint,SIP/60
exten => 61,hint,SIP/61
exten => 62,hint,SIP/62
exten => _60,1,Dial(SIP/60)
exten => _61,1,Dial(SIP/61)
exten => _62,1,Dial(SIP/62)
but the notify looks like this:
—
== Extension Changed 62[phones] new state Ringing for Notify User 62
Reliably Transmitting (NAT) to 172.16.23.60:2112:
NOTIFY sip:60@172.16.23.60:2112 SIP/2.0
Via: SIP/2.0/UDP 172.16.4.100:5060;branch=z9hG4bK7d7c5ac4;rport Max-Forwards: 70
From:
Contact:
Call-ID: 3c94f02212d4-8we7ggt625fi CSeq: 106 NOTIFY
User-Agent: Asterisk PBX 15.5.0
Subscription-State: active Event: dialog Content-Type: application/dialog-info+xml Content-Length: 217
<------------->
— (9 headers 0 lines) —
<--- SIP read from UDP:172.16.23.60:2112 --->
SIP/2.0 200 Ok Via: SIP/2.0/UDP 172.16.4.100:5060;branch=z9hG4bK7d7c5ac4;rport=5060
From:
Call-ID: 3c94f02212d4-8we7ggt625fi CSeq: 106 NOTIFY
Content-Length: 0
SIP/60 is notified correctly, but misses the notifycid information. I’ve tried both, notifycid = yes and notifycid = ignore-context of course.
*CLI> core show hints
62@phones : SIP/62 State:Idle Presence:not_set Watchers 3
61@phones : SIP/61 State:Idle Presence:not_set Watchers 2
60@phones : SIP/60 State:Idle Presence:not_set Watchers 3
*CLI> sip show subscriptions Peer User Call ID Extension Last state Type Mailbox Expiry
172.16.23.60 60 3c94f0220769-0p 61@phones Idle dialog-info+xml
172.16.23.60 60 3c94f0220182-27 60@phones Idle dialog-info+xml
172.16.23.62 62 313533353338323 60@phones Idle dialog-info+xml
172.16.23.62 62 313533353338323 62@phones Idle dialog-info+xml
172.16.23.60 60 3c94f0220d01-p2 62@phones Idle dialog-info+xml
172.16.23.60 60 3c94f023462b-j2 60@phones Idle dialog-info+xml
172.16.23.60 60 3c94f02212d4-8w 62@phones Idle dialog-info+xml
172.16.23.62 62 313533353338323 61@phones Idle dialog-info+xml
What am I missing here, any suggestions?
Cheers, Pete
—
One thought on - Call Pickup On Channel Sip With SNOM Phones Issue
Okay, scratch it, “notifycid = yes” must reside in the general section!
Now, it behaves as expected until:
[Aug 27 22:20:37] NOTICE[6200][C-00000003]: app_directed_pickup.c:365 pickup_exec: No target channel found for 62@phones
Details:
extensions.conf:
[phones]
exten => 60,hint,SIP/60
exten => 61,hint,SIP/61
exten => 62,hint,SIP/62
exten => _60,1,Dial(SIP/60)
exten => _61,1,Dial(SIP/61)
exten => _62,1,Dial(SIP/62)
A call from external to 62 is notified to 60 three times:
First a little silly (local and remote are identical):
== Extension Changed 62[phones] new state Ringing for Notify User 60;tag=as40973611;tag=ebsb74m178
Reliably Transmitting (NAT) to 172.16.23.60:2112:
NOTIFY sip:60@172.16.23.60:2112 SIP/2.0
Via: SIP/2.0/UDP 172.16.4.100:5060;branch=z9hG4bK2ec2ef2e;rport Max-Forwards: 70
From:
To:
Contact:
Call-ID: 3c95372c15b1-uz42rw4w6sy9
CSeq: 104 NOTIFY
User-Agent: Asterisk PBX 15.5.0
Subscription-State: active Event: dialog Content-Type: application/dialog-info+xml Content-Length: 524
<------------->
Then with an entity of sip:62@172.16.23.8, which is my old asterisk, but with correct local/remote values:
— (7 headers 0 lines) —;tag=as2c6b3fce To: ;tag=mafy78cezc Contact:
Reliably Transmitting (NAT) to 172.16.23.60:2112:
NOTIFY sip:60@172.16.23.60:2112 SIP/2.0
Via: SIP/2.0/UDP 172.16.4.100:5060;branch=z9hG4bK60e3a3a9;rport Max-Forwards: 70
From:
Call-ID: 3c95372c1b80-xmqzyr2cq6z2
CSeq: 105 NOTIFY
User-Agent: Asterisk PBX 15.5.0
Subscription-State: active Event: dialog Content-Type: application/dialog-info+xml Content-Length: 541
<------------->
And finally correctly:
— (7 headers 0 lines) —;tag=as40973611;tag=ebsb74m178
Reliably Transmitting (NAT) to 172.16.23.60:2112:
NOTIFY sip:60@172.16.23.60:2112 SIP/2.0
Via: SIP/2.0/UDP 172.16.4.100:5060;branch=z9hG4bK6d9e9f60;rport Max-Forwards: 70
From:
To:
Contact:
Call-ID: 3c95372c15b1-uz42rw4w6sy9
CSeq: 105 NOTIFY
User-Agent: Asterisk PBX 15.5.0
Subscription-State: active Event: dialog Content-Type: application/dialog-info+xml Content-Length: 542
<------------->
NOTIFY Ack:
— (11 headers 0 lines) —
sip_route_dump: route/path hop:
— SIP/62-00000003 is ringing
<--- SIP read from UDP:172.16.23.60:2112 --->;tag=as40973611;tag=ebsb74m178
SIP/2.0 200 Ok Via: SIP/2.0/UDP 172.16.4.100:5060;branch=z9hG4bK6d9e9f60;rport=5060
From:
To:
Call-ID: 3c95372c15b1-uz42rw4w6sy9
CSeq: 105 NOTIFY
Content-Length: 0
<------------->
60 want to take over the call:
<--- SIP read from UDP:172.16.23.60:2112 --->;tag=omy5lrfdik To: ;reg-id=1
INVITE sip:01721234567@172.16.4.100 SIP/2.0
Via: SIP/2.0/UDP 172.16.23.60:2112;branch=z9hG4bK-pb8ywn90vhet;rport From: “HFO”
Call-ID: 3c953745720b-p5q7kgcj604q CSeq: 1 INVITE
Max-Forwards: 70
Contact:
Replaces: pickup-3c95372c15b1-uz42rw4w6sy9;to-tag=as40973611;from-tag=ebsb74m178
P-Key-Flags: resolution=”31×13″, keys=”4″
User-Agent: snom360/7.3.30
Accept: application/sdp Allow: INVITE, ACK, CANCEL, BYE, REFER, OPTIONS, NOTIFY, SUBSCRIBE, PRACK, MESSAGE, INFO
Allow-Events: talk, hold, refer, call-info Supported: timer, 100rel, replaces, from-change Session-Expires: 3600;refresher=uas Min-SE: 90
Content-Type: application/sdp Content-Length: 452
<------------->
Unauthorized:
— (19 headers 18 lines) —
Sending to 172.16.23.60:2112 (NAT)
[Aug 27 22:20:37] NOTICE[6200][C-00000003]: chan_sip.c:26269 handle_request_invite: Trying to pick up 62@phones Sending to 172.16.23.60:2112 (NAT)
Using INVITE request as basis request – 3c953745720b-p5q7kgcj604q Found peer ’60’ for ’60’ from 172.16.23.60:2112
<--- Reliably Transmitting (NAT) to 172.16.23.60:2112 --->;tag=omy5lrfdik To: ;tag=as36a783db Call-ID: 3c953745720b-p5q7kgcj604q CSeq: 1 INVITE
SIP/2.0 401 Unauthorized Via: SIP/2.0/UDP 172.16.23.60:2112;branch=z9hG4bK-pb8ywn90vhet;received=172.16.23.60;rport=2112
From: “HFO”
Server: Asterisk PBX 15.5.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer WWW-Authenticate: Digest algorithm=MD5, realm=”asterisk”, nonce=”5835824d”
Content-Length: 0
<------------>
Ahh, okay
<--- SIP read from UDP:172.16.23.60:2112 --->;tag=omy5lrfdik To: ;tag=as36a783db Call-ID: 3c953745720b-p5q7kgcj604q CSeq: 1 ACK;reg-id=1
ACK sip:01721234567@172.16.4.100 SIP/2.0
Via: SIP/2.0/UDP 172.16.23.60:2112;branch=z9hG4bK-pb8ywn90vhet;rport From: “HFO”
Max-Forwards: 70
Contact:
Content-Length: 0
<------------->
You want auth, you get auth:
<--- SIP read from UDP:172.16.23.60:2112 --->;tag=omy5lrfdik To: ;reg-id=1
INVITE sip:01721234567@172.16.4.100 SIP/2.0
Via: SIP/2.0/UDP 172.16.23.60:2112;branch=z9hG4bK-zbjhw9im94ce;rport From: “HFO”
Call-ID: 3c953745720b-p5q7kgcj604q CSeq: 2 INVITE
Max-Forwards: 70
Contact:
Replaces: pickup-3c95372c15b1-uz42rw4w6sy9;to-tag=as40973611;from-tag=ebsb74m178
P-Key-Flags: resolution=”31×13″, keys=”4″
User-Agent: snom360/7.3.30
Accept: application/sdp Allow: INVITE, ACK, CANCEL, BYE, REFER, OPTIONS, NOTIFY, SUBSCRIBE, PRACK, MESSAGE, INFO
Allow-Events: talk, hold, refer, call-info Supported: timer, 100rel, replaces, from-change Session-Expires: 3600;refresher=uas Min-SE: 90
Authorization: Digest username=”60″,realm=”asterisk”,nonce=”5835824d”,uri=”sip:01721234567@172.16.4.100″,response=”d7b5ae311ffa0c9f41154f952600220e”,algorithm=MD5
Content-Type: application/sdp Content-Length: 452
<------------->
Figure out RTP parameter:
— (20 headers 18 lines) —
[Aug 27 22:20:37] NOTICE[6200][C-00000003]: chan_sip.c:26269 handle_request_invite: Trying to pick up 62@phones Sending to 172.16.23.60:2112 (NAT)
Using INVITE request as basis request – 3c953745720b-p5q7kgcj604q Found peer ’60’ for ’60’ from 172.16.23.60:2112
== Using SIP RTP CoS mark 5
Found RTP audio format 9
Found RTP audio format 0
Found RTP audio format 8
Found RTP audio format 3
Found RTP audio format 18
Found RTP audio format 4
Found RTP audio format 99
Found RTP audio format 101
[Aug 27 22:20:37] NOTICE[6200][C-00000003]: chan_sip.c:10742 process_sdp: Processed audio crypto attribute without SAVP specified; accepting anyway Found audio description format g722 for ID 9
Found audio description format pcmu for ID 0
Found audio description format pcma for ID 8
Found audio description format gsm for ID 3
Found audio description format g729 for ID 18
Found audio description format g723 for ID 4
Found audio description format g726-32 for ID 99
Found audio description format telephone-event for ID 101
Capabilities: us – (alaw|ulaw|gsm), peer – audio=(ulaw|gsm|g723|alaw|g722|g729|g726)/video=(nothing)/text=(nothing), combined – (alaw|ulaw|gsm)
Non-codec capabilities (dtmf): us – 0x0 (nothing), peer – 0x1 (telephone-event|), combined – 0x0 (nothing)
> 0x7f0fc405ecf0 — Strict RTP learning after remote address set to: 172.16.23.60:54560
Peer audio RTP is at port 172.16.23.60:54560
Looking for 01721234567 in phones (domain 172.16.4.100)
sip_route_dump: route/path hop:
Why asterisk is looking up the external caller in phones?
<------------->
Let’s talk together:
<--- Transmitting (NAT) to 172.16.23.60:2112 --->;tag=omy5lrfdik To:
SIP/2.0 100 Trying Via: SIP/2.0/UDP 172.16.23.60:2112;branch=z9hG4bK-zbjhw9im94ce;received=172.16.23.60;rport=2112
From: “HFO”
Call-ID: 3c953745720b-p5q7kgcj604q CSeq: 2 INVITE
Server: Asterisk PBX 15.5.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer Session-Expires: 1800;refresher=uas Contact:
Content-Length: 0
<------------>
Here it goes south: No target channel found for 62@phones
[Aug 27 22:20:37] NOTICE[6200][C-00000003]: app_directed_pickup.c:365 pickup_exec: No target channel found for 62@phones. Scheduling destruction of SIP dialog ‘3c953745720b-p5q7kgcj604q’ in 32000 ms (Method: INVITE);tag=as06a1662e To: ;tag=9ce2167e53
Reliably Transmitting (NAT) to 172.16.23.60:2112:
NOTIFY sip:60@172.16.23.60:2112 SIP/2.0
Via: SIP/2.0/UDP 172.16.4.100:5060;branch=z9hG4bK126d8508;rport Max-Forwards: 70
From:
Contact:
Call-ID: 3c95372c0a95-8efi7mvgrsud CSeq: 104 NOTIFY
User-Agent: Asterisk PBX 15.5.0
Subscription-State: active Event: dialog Content-Type: application/dialog-info+xml Content-Length: 200
—
Game over:
<--- Reliably Transmitting (NAT) to 172.16.23.60:2112 --->;tag=omy5lrfdik To: ;tag=as19bd5d41
SIP/2.0 603 Declined Via: SIP/2.0/UDP 172.16.23.60:2112;branch=z9hG4bK-zbjhw9im94ce;received=172.16.23.60;rport=2112
From: “HFO”
Call-ID: 3c953745720b-p5q7kgcj604q CSeq: 2 INVITE
Server: Asterisk PBX 15.5.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer Session-Expires: 1800;refresher=uas Content-Length: 0
<------------>
It should work as such, but doesn’t.
Any ideas are much appreciated.
Pete
—