PBXes (http://www1.pbxes.com/forum/index.php)
- English (http://www1.pbxes.com/forum/board.php?boardid=16)
-- Feature Requests (http://www1.pbxes.com/forum/board.php?boardid=23)
--- RE: nat=no (http://www1.pbxes.com/forum/threadid.php?threadid=1359216085)


Posted by bazmercer on 26.01.2013 at 18:01:

nat=no

any chance of being able to configure the nat option for some extensions?

Or, if you're feeling generous, just set my extension 103 to be "no" smile


Posted by i-p-tel on 27.01.2013 at 23:05:

RE: nat=no

What would be the benefit of that?


Posted by bazmercer on 28.01.2013 at 00:12:

RE: nat=no

I think it'll disable the symmetric NAT won't it? So that asterisk will then respect the contact header instead of replying to the same port the packet was sent on. Trying to get my cisco phone to work...

edit:
well, asper the rfcs it should disable it. I've set up a freepbx on amazons cloud and have successfully got my cisco to register and make and receive calls. both devices are behind natted, extensions is "nat=no"


Posted by i-p-tel on 30.01.2013 at 00:47:

RE: nat=no

I have set it on extension 103 for you to try. Change any other settings and press the red bar to bring the change into effect.

To restore the default value please re-save extension 103.


Posted by bazmercer on 30.01.2013 at 02:18:

RE: nat=no

Great thanks. It almost works, I'm getting responses from you on the right port now, but I'm getting a 401 when i try to register.

SEP0024C442AFCB.52859 > www1.pbxes.com.5060: SIP, length: 981 REGISTER sip:188.40.65.170 SIP/2.0
www3.pbxes.com.27570 > SEP0024C442AFCB.5060: SIP, length: 457
SIP/2.0 100 Trying
www3.pbxes.com.27570 > SEP0024C442AFCB.5060: SIP, length: 572
SIP/2.0 401 Unauthorized

I've checked the config and it looks ok... but it's pretty late so who knows!


Posted by i-p-tel on 30.01.2013 at 10:34:

RE: nat=no

You could activate SIP trace in System Log to find out more.


Posted by bazmercer on 30.01.2013 at 11:34:

RE: nat=no

Anything obvious other than the 401? Would the nat change have made it 401 for any reason? I'll double check the config when I'm back at the phone but it looked ok


Jan 30 09:25:14 VERBOSE[33711] logger.c:
<-- SIP read
REGISTER sip:188.40.65.170 SIP/2.0
Via: SIP/2.0/UDP 86.152.69.250:5060;branch=z9hG4bKf8c5e7ff
From: <sip:xxxx-103@188.40.65.170>;tag=0024c442afcb006690b72be5-f3af97a3
To: <sip:xxx-103@188.40.65.170>
Call-ID: 0024c442-afcb0064-89fc9141-baab6417@86.152.69.250
Max-Forwards: 70
Date: Wed, 30 Jan 2013 09:25:01 GMT
CSeq: 199 REGISTER
User-Agent: Cisco-CP7945G/9.3.1
Contact: <sip:xxx-103@86.152.69.250:5060;transport=udp>;+sip.instance="<urn:uuid:00000000-0000-0000-0000-0024c442afcb>";+u.sip!devicename.ccm.cisco.com="SEP0024C442AFCB";+u.sip!model.ccm.cisco.com="435"
Supported: replaces,join,sdp-anat,norefersub,resource-priority,extended-refer,X-cisco-callinfo,X-cisco-serviceuri,X-cisco-escapecodes,X-cisco-service-control,X-cisco-srtp-fallback,X-cisco-monrec,X-cisco-config,X-cisco-sis-6.0.0,X-cisco-xsi-8.5.1
Content-Length: 0
Reason: SIP;cause=200;text="cisco-alarm:20 Name=SEP0024C442AFCB Load=SIP45.9-3-1SR1-1S Last=phone-keypad"
Expires: 600

Jan 30 09:25:14 VERBOSE[33711] logger.c: --- (14 headers 0 lines)Jan 30 09:25:14 VERBOSE[33711] logger.c: --- (14 headers 0 lines)---
Jan 30 09:25:14 VERBOSE[33711] logger.c: Using latest REGISTER request as basis request
Jan 30 09:25:14 VERBOSE[33711] logger.c: Transmitting (no NAT)
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 86.152.69.250:5060;branch=z9hG4bKf8c5e7ff;received=88.198.69.250
From: <sip:xxx-103@188.40.65.170>;tag=0024c442afcb006690b72be5-f3af97a3
To: <sip:xxx-103@188.40.65.170>
Call-ID: 0024c442-afcb0064-89fc9141-baab6417@86.152.69.250
CSeq: 199 REGISTER
User-Agent: PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Contact: <sip:xxx-103@88.198.69.250:27570>
Content-Length: 0


---
Jan 30 09:25:14 VERBOSE[33711] logger.c: Transmitting (no NAT)
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 86.152.69.250:5060;branch=z9hG4bKf8c5e7ff;received=88.198.69.250
From: <sip:xxx-103@188.40.65.170>;tag=0024c442afcb006690b72be5-f3af97a3
To: <sip:xxx-103@188.40.65.170>;tag=as09a399ac
Call-ID: 0024c442-afcb0064-89fc9141-baab6417@86.152.69.250
CSeq: 199 REGISTER
User-Agent: PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Contact: <sip:xxx-103@88.198.69.250:27570>
WWW-Authenticate: Digest realm="pbxes.org", nonce="4da247670d1077b622e66a7262e748292e4bf08d"
Content-Length: 0


Posted by i-p-tel on 30.01.2013 at 13:01:

RE: nat=no

It's the correct response, providing a nonce for encrypted authentication. Your phone probably does not receive the reply. You could do a test without a password and see what happens. For this test you would need to set nat=no again. I suggest you sign up for a PRO account which is free for 14 days. Then you can edit the option under Source View >> sip.conf.


Posted by bazmercer on 30.01.2013 at 23:54:

RE: nat=no

Hm, strange. I'm seeing this:

22:47:30.260577 IP 192.168.1.108.51791 > www1.pbxes.com.5060: SIP, length: 981
22:47:30.379100 IP www3.pbxes.com.27570 > 192.168.1.108.5060: SIP, length: 457
22:47:30.393256 IP www3.pbxes.com.27570 > 192.168.1.108.5060: SIP, length: 572
22:47:30.932572 IP www1.pbxes.com.5060 > 192.168.1.108.52082: SIP, length: 4
22:47:30.932663 IP www1.pbxes.com.5060 > 192.168.1.108.52146: SIP, length: 4
22:47:30.932705 IP www1.pbxes.com.5060 > 192.168.1.108.52061: SIP, length: 4


So I thought "Why does www1 not reply to the right port?" So, I specified www3.pbxes.com and not pbxes.com as the proxy. Are they configured the same? Is my nat=no not set on www1? Either way, we have registration with the impossible Cisco 7945 using www3 smile

edit: but i can't make calls unglücklich

edit 2:
More curious, you only reply on 506 for the initial registration request. Then you seem to revert to the (incorrect for UDP) behavior of replying symetrically.

registration stuff
23:13:28.127162 IP SEP0024C442AFCB.52736 > www3.pbxes.com.5060: SIP, length: 981
23:13:28.230148 IP www3.pbxes.com.27570 > SEP0024C442AFCB.5060: SIP, length: 457
23:13:28.244327 IP www3.pbxes.com.27570 > SEP0024C442AFCB.5060: SIP, length: 572
23:13:28.256626 IP SEP0024C442AFCB.51218 > www3.pbxes.com.5060: SIP, length: 1178
23:13:28.346176 IP www3.pbxes.com.27570 > SEP0024C442AFCB.5060: SIP, length: 457
23:13:28.361915 IP www3.pbxes.com.27570 > SEP0024C442AFCB.5060SIP, length: 544
23:13:28.715275 IP SEP0024C442AFCB.52832 > www3.pbxes.com.5060: SIP, length: 640
23:13:28.743531 IP SEP0024C442AFCB.51669 > www3.pbxes.com.5060: SIP, length: 1352

making a call (part of)
23:15:55.162948 IP (tos 0x78, ttl 45, id 0, offset 0, flags [DF], proto UDP (17), length 906)
www3.pbxes.com.5060 > SEP0024C442AFCB.51738: SIP, length: 878
SIP/2.0 404 Not Found

this isn't right. https://issues.asterisk.org/jira/browse/ASTERISK-17535 maybe?

Powered by: Burning Board Lite 1.0.2 © 2001-2004 WoltLab GmbH
English translation by Satelk