Re: [asterisk-users] Call pickup on channel sip with SNOM phones issue

2018-08-27 Thread Hans-Peter Jansen
On Montag, 27. August 2018 17:42:37 Hans-Peter Jansen wrote:
> 
> What am I missing here, any suggestions?
> 

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-0003]: 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 
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: ;tag=as40973611
To: ;tag=ebsb74m178
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





sip:62@172.16.4.100



sip:62@172.16.4.100


early



<->

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) ---
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: ;tag=as2c6b3fce
To: ;tag=mafy78cezc
Contact: 
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





sip:01721234567@172.16.4.100



sip:62@172.16.4.100


early



<->

And finally correctly:

--- (7 headers 0 lines) ---
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: ;tag=as40973611
To: ;tag=ebsb74m178
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





sip:01721234567@172.16.4.100



sip:62@172.16.4.100


early



<->

NOTIFY Ack:

--- (11 headers 0 lines) ---
sip_route_dump: route/path hop: 
-- SIP/62-0003 is ringing

<--- 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=z9hG4bK6d9e9f60;rport=5060
From: ;tag=as40973611
To: ;tag=ebsb74m178
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 --->
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" ;tag=omy5lrfdik
To: 
Call-ID: 3c953745720b-p5q7kgcj604q
CSeq: 1 INVITE
Max-Forwards: 70
Contact: ;reg-id=1
Replaces: pickup-3c95372c15b1-uz42rw4w6sy9;to-tag=as40973611;from-tag=ebsb74m178
P-Key-Flags: resolution="31x13", 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-0003]: 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 --->
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" ;tag=omy5lrfdik
To: ;tag=as36a783db
Call-ID: 3c953745720b-p5q7kgcj604q
CSeq: 1 INVITE
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 --->
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" ;tag=omy5lrfdik
To: ;tag=as36a783db
Call-ID: 3c953745720b-p5q7kgcj604q
CSeq: 1 ACK
Max-Forwards: 70
Contact: ;reg-id=1
Content-Length: 0

<->

You want auth, you get auth:

<--- SIP read from UDP:172.16.23.60:2112 --->
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" ;tag=omy5lrfdik
To: 
Call-ID: 

[asterisk-users] Call pickup on channel sip with SNOM phones issue

2018-08-27 Thread Hans-Peter Jansen
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: ;tag=as72f9c98b
To: ;tag=ufln5vo7x5
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




early



<->
--- (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: ;tag=as72f9c98b
To: ;tag=ufln5vo7x5
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/62State:Idle
Presence:not_set Watchers  3
61@phones   : SIP/61State:Idle
Presence:not_set Watchers  2
60@phones   : SIP/60State:Idle
Presence:not_set Watchers  3

*CLI> sip show subscriptions
Peer User Call ID  ExtensionLast state  
   TypeMailboxExpiry
172.16.23.60 60   3c94f0220769-0p  61@phonesIdle
   dialog-info+xml  003600
172.16.23.60 60   3c94f0220182-27  60@phonesIdle
   dialog-info+xml  003600
172.16.23.62 62   313533353338323  60@phonesIdle
   dialog-info+xml  003600
172.16.23.62 62   313533353338323  62@phonesIdle
   dialog-info+xml  003600
172.16.23.60 60   3c94f0220d01-p2  62@phonesIdle
   dialog-info+xml  003600
172.16.23.60 60   3c94f023462b-j2  60@phonesIdle
   dialog-info+xml  003600
172.16.23.60 60   3c94f02212d4-8w  62@phonesIdle
   dialog-info+xml  003600
172.16.23.62 62   313533353338323  61@phonesIdle
   dialog-info+xml  003600

What am I missing here, any suggestions?

Cheers,
Pete


-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Astricon is coming up October 9-11!  Signup is available at: 
https://www.asterisk.org/community/astricon-user-conference

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users