Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[asterisk-users] Getting Asterisk to use the SIP Path header


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
lists at pbaines.com
Guest





PostPosted: Wed Jan 06, 2016 5:29 am    Post subject: [asterisk-users] Getting Asterisk to use the SIP Path header Reply with quote

Hi,


How do I get asterisk to use the SIP Path header value from registrations when calling devices?



I am trying to use opensips as a proxy for asterisk, when a client registers I am adding the Path header before forwarding the REGISTER onto asterisk. The problem is when asterisk recieves an INVITE it does not use the value from the Path header, it is sending directly to the device. Can anyone point me in the right direction as to why?


I am using asterisk 13.6.0 with the default configuration, the changes I have made are:


In sip.conf I have uncommented:
supportpath=yes
rtsavepath=yes


In users.conf I have:


[6000]
secret =
host=dynamic
context = default

[6001]
secret =
host=dynamic
context = default

[6002]
secret =
host=dynamic
context = default


In extensions.conf I have made default like:
[default]
;include => demo
exten => 6000,1,Dial(SIP/6000,1Cool
exten => 6000,n,Hangup()

exten => 6002,1,Dial(SIP/6002,1Cool
exten => 6002,n,Hangup()

exten => 6001,1,Dial(SIP/6001,1Cool
exten => 6001,n,Hangup()



Below is the 6000 user REGISTER going from opensips (10.15.20.137:5060) into asterisk (192.168.68.68:5070) with the Path header.

U 2016/01/06 10:04:23.399170 10.15.20.137:5060 -> 192.168.68.68:5070
REGISTER sip:10.15.20.137 SIP/2.0.
Via: SIP/2.0/UDP 10.15.20.137:5060;branch=z9hG4bKcc2c.b40fb511.0.
Via: SIP/2.0/UDP 10.15.20.53:52666;received=10.15.20.53;branch=z9hG4bK-d8754z-91422161f08a7943-1---d8754z-;rport=52666.
Max-Forwards: 69.
Contact: <sip:6000@10.15.20.53:52666;rinstance=d4284982f7c18786>.
To: <sip:6000@10.15.20.137 ([email]sip%3A6000@10.15.20.137[/email])>.
From: <sip:6000@10.15.20.137 ([email]sip%3A6000@10.15.20.137[/email])>;tag=9e95da50.
Call-ID: OTQ1ZTdmZmE3OTM1ZWVkYzMzYWZiMDMzMDgyODhmOTU.
CSeq: 2 REGISTER.
Expires: 3600.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO.
User-Agent: Bria 3 release 3.5.5 stamp 71243.
Content-Length: 0.
Path: <sip:10.15.20.137;lr>.



Below is the INVITE going from opensips to asterisk for 6000


U 2016/01/06 10:11:13.668929 10.15.20.137:5060 -> 192.168.68.68:5070
INVITE sip:6000@10.15.20.137 ([email]sip%3A6000@10.15.20.137[/email]);transport=UDP SIP/2.0.
Record-Route: <sip:10.15.20.137;lr;nat=yes>.
Via: SIP/2.0/UDP 10.15.20.137:5060;branch=z9hG4bK8f77.9d6ef7e7.0.
Via: SIP/2.0/UDP 188.39.51.2:35631;rport=35631;received=10.15.20.53;branch=z9hG4bK-d8754z-d46f3a0333dc5d49-1---d8754z-.
Max-Forwards: 69.
Contact: <sip:6001@10.15.20.53:35631;transport=UDP>.
To: <sip:6000@10.15.20.137 ([email]sip%3A6000@10.15.20.137[/email]);transport=UDP>.
From: <sip:6001@10.15.20.137 ([email]sip%3A6001@10.15.20.137[/email]);transport=UDP>;tag=870fdf72.
Call-ID: YWVjN2VjMDZmYmZmNjg4MTE2MzJlZGU1ZDNjZGU2NDc..
CSeq: 2 INVITE.
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE.
Content-Type: application/sdp.
Supported: replaces, norefersub, extended-refer, timer, X-cisco-serviceuri.
User-Agent: Z 3.3.21933 r21903.
Allow-Events: presence, kpml.
Content-Length: 237.
.
v=0.
o=Z 0 0 IN IP4 188.39.51.2.
s=Z.
c=IN IP4 188.39.51.2.
t=0 0.
m=audio 8000 RTP/AVP 3 110 8 0 98 101.
a=rtpmap:110 speex/8000.
a=rtpmap:98 iLBC/8000.
a=fmtp:98 mode=20.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-15.
a=sendrecv.



I would now expect asterisk to send the INVITE to the value of the Path header in the registration (10.15.20.137:5060) however it is sending the INVITE directly to the device (10.15.20.53:52666):

U 2016/01/06 10:11:13.671345 192.168.68.68:5070 -> 10.15.20.53:52666
INVITE sip:6000@10.15.20.53:52666;rinstance=d4284982f7c18786 SIP/2.0.
Via: SIP/2.0/UDP 192.168.68.68:5070;branch=z9hG4bK308a4ef5;rport.
Max-Forwards: 70.
Route: <sip:10.15.20.137;lr>.
From: "New User" <sip:6001@192.168.68.68:5070>;tag=as3daea415.
To: <sip:6000@10.15.20.53:52666;rinstance=d4284982f7c18786>.
Contact: <sip:6001@192.168.68.68:5070>.
Call-ID: 55202bc71f9e684d0b82c7cb2e8684ab@192.168.68.68:5070.
CSeq: 102 INVITE.
User-Agent: Asterisk PBX 13.6.0.
Date: Wed, 06 Jan 2016 10:11:13 GMT.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE.
Supported: replaces, timer, path.
Content-Type: application/sdp.
Content-Length: 286.
.
v=0.
o=root 887525354 887525354 IN IP4 192.168.68.68.
s=Asterisk PBX 13.6.0.
c=IN IP4 192.168.68.68.
t=0 0.
m=audio 12356 RTP/AVP 0 8 3 101.
a=rtpmap:0 PCMU/8000.
a=rtpmap:8 PCMA/8000.
a=rtpmap:3 GSM/8000.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-16.
a=maxptime:150.
a=sendrecv.



Thanks,

Peter
Back to top
lists at pbaines.com
Guest





PostPosted: Thu Jan 07, 2016 11:23 am    Post subject: [asterisk-users] Getting Asterisk to use the SIP Path header Reply with quote

If anyone else is having this issue, asterisk 1.8.32.3 uses the Path header as expected, if you want to follow progress I've created a bug report: https://issues.asterisk.org/jira/browse/ASTERISK-25666



On 6 January 2016 at 10:29, Peter Baines <lists@pbaines.com (lists@pbaines.com)> wrote:
Quote:
Hi,


How do I get asterisk to use the SIP Path header value from registrations when calling devices?



I am trying to use opensips as a proxy for asterisk, when a client registers I am adding the Path header before forwarding the REGISTER onto asterisk. The problem is when asterisk recieves an INVITE it does not use the value from the Path header, it is sending directly to the device. Can anyone point me in the right direction as to why?


I am using asterisk 13.6.0 with the default configuration, the changes I have made are:


In sip.conf I have uncommented:
supportpath=yes
rtsavepath=yes


In users.conf I have:


[6000]
secret =
host=dynamic
context = default

[6001]
secret =
host=dynamic
context = default

[6002]
secret =
host=dynamic
context = default


In extensions.conf I have made default like:
[default]
;include => demo
exten => 6000,1,Dial(SIP/6000,1Cool
exten => 6000,n,Hangup()

exten => 6002,1,Dial(SIP/6002,1Cool
exten => 6002,n,Hangup()

exten => 6001,1,Dial(SIP/6001,1Cool
exten => 6001,n,Hangup()



Below is the 6000 user REGISTER going from opensips (10.15.20.137:5060) into asterisk (192.168.68.68:5070) with the Path header.

U 2016/01/06 10:04:23.399170 10.15.20.137:5060 -> 192.168.68.68:5070
REGISTER sip:10.15.20.137 SIP/2.0.
Via: SIP/2.0/UDP 10.15.20.137:5060;branch=z9hG4bKcc2c.b40fb511.0.
Via: SIP/2.0/UDP 10.15.20.53:52666;received=10.15.20.53;branch=z9hG4bK-d8754z-91422161f08a7943-1---d8754z-;rport=52666.
Max-Forwards: 69.
Contact: <sip:6000@10.15.20.53:52666;rinstance=d4284982f7c18786>.
To: <sip:6000@10.15.20.137 ([email]sip%3A6000@10.15.20.137[/email])>.
From: <sip:6000@10.15.20.137 ([email]sip%3A6000@10.15.20.137[/email])>;tag=9e95da50.
Call-ID: OTQ1ZTdmZmE3OTM1ZWVkYzMzYWZiMDMzMDgyODhmOTU.
CSeq: 2 REGISTER.
Expires: 3600.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO.
User-Agent: Bria 3 release 3.5.5 stamp 71243.
Content-Length: 0.
Path: <sip:10.15.20.137;lr>.



Below is the INVITE going from opensips to asterisk for 6000


U 2016/01/06 10:11:13.668929 10.15.20.137:5060 -> 192.168.68.68:5070
INVITE sip:6000@10.15.20.137 ([email]sip%3A6000@10.15.20.137[/email]);transport=UDP SIP/2.0.
Record-Route: <sip:10.15.20.137;lr;nat=yes>.
Via: SIP/2.0/UDP 10.15.20.137:5060;branch=z9hG4bK8f77.9d6ef7e7.0.
Via: SIP/2.0/UDP 188.39.51.2:35631;rport=35631;received=10.15.20.53;branch=z9hG4bK-d8754z-d46f3a0333dc5d49-1---d8754z-.
Max-Forwards: 69.
Contact: <sip:6001@10.15.20.53:35631;transport=UDP>.
To: <sip:6000@10.15.20.137 ([email]sip%3A6000@10.15.20.137[/email]);transport=UDP>.
From: <sip:6001@10.15.20.137 ([email]sip%3A6001@10.15.20.137[/email]);transport=UDP>;tag=870fdf72.
Call-ID: YWVjN2VjMDZmYmZmNjg4MTE2MzJlZGU1ZDNjZGU2NDc..
CSeq: 2 INVITE.
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE.
Content-Type: application/sdp.
Supported: replaces, norefersub, extended-refer, timer, X-cisco-serviceuri.
User-Agent: Z 3.3.21933 r21903.
Allow-Events: presence, kpml.
Content-Length: 237.
.
v=0.
o=Z 0 0 IN IP4 188.39.51.2.
s=Z.
c=IN IP4 188.39.51.2.
t=0 0.
m=audio 8000 RTP/AVP 3 110 8 0 98 101.
a=rtpmap:110 speex/8000.
a=rtpmap:98 iLBC/8000.
a=fmtp:98 mode=20.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-15.
a=sendrecv.



I would now expect asterisk to send the INVITE to the value of the Path header in the registration (10.15.20.137:5060) however it is sending the INVITE directly to the device (10.15.20.53:52666):

U 2016/01/06 10:11:13.671345 192.168.68.68:5070 -> 10.15.20.53:52666
INVITE sip:6000@10.15.20.53:52666;rinstance=d4284982f7c18786 SIP/2.0.
Via: SIP/2.0/UDP 192.168.68.68:5070;branch=z9hG4bK308a4ef5;rport.
Max-Forwards: 70.
Route: <sip:10.15.20.137;lr>.
From: "New User" <sip:6001@192.168.68.68:5070>;tag=as3daea415.
To: <sip:6000@10.15.20.53:52666;rinstance=d4284982f7c18786>.
Contact: <sip:6001@192.168.68.68:5070>.
Call-ID: 55202bc71f9e684d0b82c7cb2e8684ab@192.168.68.68:5070.
CSeq: 102 INVITE.
User-Agent: Asterisk PBX 13.6.0.
Date: Wed, 06 Jan 2016 10:11:13 GMT.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE.
Supported: replaces, timer, path.
Content-Type: application/sdp.
Content-Length: 286.
.
v=0.
o=root 887525354 887525354 IN IP4 192.168.68.68.
s=Asterisk PBX 13.6.0.
c=IN IP4 192.168.68.68.
t=0 0.
m=audio 12356 RTP/AVP 0 8 3 101.
a=rtpmap:0 PCMU/8000.
a=rtpmap:8 PCMA/8000.
a=rtpmap:3 GSM/8000.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-16.
a=maxptime:150.
a=sendrecv.



Thanks,

Peter


Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services