SIP extensions not registering timing out

Fresh install of FreePBX on Centos5.2 with Plesk.

Asterisk is on a dedicated virtual at a hosting company. All SIP Extension registrations time out. The SIP Trunk registers no problem however. Here is my SIP Debug output:

|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
(12 headers 0 lines) —
Using latest REGISTER request as basis request
Sending to 192.168.1.3 : 51724 (no NAT)

<— Transmitting (NAT) to ip.of.ex.ten.si.on:51724 —>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.1.3:51724;branch=z9hG4bK-d8754z-a350613ac56c3b1e-1—d8754z-;received=ip.of.ex.ten.si.on;rport=51724
From: "Rusty"sip:[email protected];tag=f30cc673
To: "Rusty"sip:[email protected]
Call-ID: NjM1ZTgyOTlhMDEzZjI2YjM1YzdiYTVlYmYzNzQ3NTQ.
CSeq: 1 REGISTER
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces
Content-Length: 0

<------------>

<— Transmitting (NAT) to ip.of.ex.ten.si.on:51724 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.1.3:51724;branch=z9hG4bK-d8754z-a350613ac56c3b1e-1—d8754z-;received=ip.of.ex.ten.si.on;rport=51724
From: "Rusty"sip:[email protected];tag=f30cc673
To: "Rusty"sip:[email protected];tag=as789061a4
Call-ID: NjM1ZTgyOTlhMDEzZjI2YjM1YzdiYTVlYmYzNzQ3NTQ.
CSeq: 1 REGISTER
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces
WWW-Authenticate: Digest algorithm=MD5, realm=“asterisk”, nonce="34aa23f9"
Content-Length: 0

<------------>
Scheduling destruction of SIP dialog ‘NjM1ZTgyOTlhMDEzZjI2YjM1YzdiYTVlYmYzNzQ3NTQ.’ in 32000 ms (Method: REGISTER)
Really destroying SIP dialog ‘[email protected]’ Method: REGISTER
Really destroying SIP dialog ‘NjM1ZTgyOTlhMDEzZjI2YjM1YzdiYTVlYmYzNzQ3NTQ.’ Method: REGISTER
server*CLI>
<— SIP read from ip.of.ex.ten.si.on:51725 —>
REGISTER sip:domain.com SIP/2.0
Via: SIP/2.0/UDP 192.168.1.3:51725;branch=z9hG4bK-d8754z-0a63660e6f29cb47-1—d8754z-;rport
Max-Forwards: 70
Contact: sip:[email protected]:51725;rinstance=0302475bd9075d2e
To: "Rusty"sip:[email protected]
From: "Rusty"sip:[email protected];tag=4f0ce161
Call-ID: MjRjY2U3NDE4N2NhNjFlNGFkYmZkNTRkNGNkMTVmNjA.
CSeq: 1 REGISTER
Expires: 3601
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
User-Agent: X-Lite release 1103k stamp 53621
Content-Length: 0

<------------->
— (12 headers 0 lines) —
Using latest REGISTER request as basis request
Sending to 192.168.1.3 : 51725 (no NAT)

<— Transmitting (NAT) to ip.of.ex.ten.si.on:51725 —>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.1.3:51725;branch=z9hG4bK-d8754z-0a63660e6f29cb47-1—d8754z-;received=ip.of.ex.ten.si.on;rport=51725
From: "Rusty"sip:[email protected];tag=4f0ce161
To: "Rusty"sip:[email protected]
Call-ID: MjRjY2U3NDE4N2NhNjFlNGFkYmZkNTRkNGNkMTVmNjA.
CSeq: 1 REGISTER
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces
Content-Length: 0

<------------>

<— Transmitting (NAT) to ip.of.ex.ten.si.on:51725 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.1.3:51725;branch=z9hG4bK-d8754z-0a63660e6f29cb47-1—d8754z-;received=ip.of.ex.ten.si.on;rport=51725
From: "Rusty"sip:[email protected];tag=4f0ce161
To: "Rusty"sip:[email protected];tag=as26982b22
Call-ID: MjRjY2U3NDE4N2NhNjFlNGFkYmZkNTRkNGNkMTVmNjA.
CSeq: 1 REGISTER
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces
WWW-Authenticate: Digest algorithm=MD5, realm=“asterisk”, nonce="04b053e2"
Content-Length: 0

<------------>
Scheduling destruction of SIP dialog ‘MjRjY2U3NDE4N2NhNjFlNGFkYmZkNTRkNGNkMTVmNjA.’ in 32000 ms (Method: REGISTER)
Reliably Transmitting (no NAT) to 4.79.19.56:5060:
OPTIONS sip:sip.jfk.telasip.com SIP/2.0
Via: SIP/2.0/UDP ip.of.se.rv.er:5060;branch=z9hG4bK7f02253a;rport
From: “Unknown” sip:[email protected];tag=as4fd87ce0
To: sip:sip.jfk.telasip.com
Contact: sip:[email protected]
Call-ID: [email protected]
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX
Max-Forwards: 70
Date: Fri, 08 Jan 2010 05:15:12 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces
Content-Length: 0


server*CLI>
<— SIP read from 4.79.19.56:5060 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP ip.of.se.rv.er:5060;branch=z9hG4bK7f02253a;rport=5060
From: “Unknown” sip:[email protected];tag=as4fd87ce0
To: sip:sip.jfk.telasip.com;tag=e7c62a77345476bbf59d650383bfbec7.ac4a
Call-ID: [email protected]
CSeq: 102 OPTIONS
Accept: /
Accept-Encoding:
Accept-Language: en
Supported:
Content-Length: 0
Warning: 392 192.168.4.56:5060 “Noisy feedback tells: pid=13020 req_src_ip=ip.of.se.rv.er req_src_port=5060 in_uri=sip:sip.jfk.telasip.com out_uri=sip:sip.jfk.telasip.com via_cnt==1”

<------------->
— (12 headers 0 lines) —
Really destroying SIP dialog ‘[email protected]’ Method: OPTIONS
Really destroying SIP dialog ‘MjRjY2U3NDE4N2NhNjFlNGFkYmZkNTRkNGNkMTVmNjA.’ Method: REGISTER
serverCLI> <— Transmitting (NAT) to ip.of.ex.ten.si.on:51724 —>
No such command ‘<— Transmitting (NAT) to ip.of.ex.ten.si.on:51724 —>’ (type ‘help <— Transmitting’ for other possible commands)
server
CLI> SIP/2.0 401 Unauthorized
serverCLI> Via: SIP/2.0/UDP 192.168.1.3:51724;branch=z9hG4bK-d8754z-a350613ac56c3b1e-1—d8754z-;received=ip.of.ex.ten.si.on;rport=51724
No such command ‘SIP/2.0 401 Unauthorized’ (type ‘help SIP/2.0 401’ for other possible commands)
No such command ‘Via: SIP/2.0/UDP 192.168.1.3:51724;branch=z9hG4bK-d8754z-a350613ac56c3b1e-1—d8754z-;received=ip.of.ex.ten.si.on;rport=51724’ (type ‘help Via: SIP/2.0/UDP’ for other possible commands)
server
CLI> From: "Rusty"sip:[email protected];tag=f30cc673
No such command ‘From: "Rusty"sip:[email protected];tag=f30cc673’ (type ‘help From: Rustysip:[email protected];tag=f30cc673’ for other possible commands)
serverCLI> To: "Rusty"sip:[email protected];tag=as789061a4
No such command ‘To: "Rusty"sip:[email protected];tag=as789061a4’ (type ‘help To: Rustysip:[email protected];tag=as789061a4’ for other possible commands)
server
CLI> Call-ID: NjM1ZTgyOTlhMDEzZjI2YjM1YzdiYTVlYmYzNzQ3NTQ.
No such command ‘Call-ID: NjM1ZTgyOTlhMDEzZjI2YjM1YzdiYTVlYmYzNzQ3NTQ.’ (type ‘help Call-ID: NjM1ZTgyOTlhMDEzZjI2YjM1YzdiYTVlYmYzNzQ3NTQ.’ for other possible commands)
serverCLI> CSeq: 1 REGISTER
No such command ‘CSeq: 1 REGISTER’ (type ‘help CSeq: 1’ for other possible commands)
server
CLI> User-Agent: Asterisk PBX
No such command ‘User-Agent: Asterisk PBX’ (type ‘help User-Agent: Asterisk’ for other possible commands)
serverCLI> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
No such command ‘Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO’ (type ‘help Allow: INVITE,’ for other possible commands)
server
CLI> Supported: replaces
serverCLI> WWW-Authenticate: Digest algorithm=MD5, realm=“asterisk”, nonce="34aa23f9"
server
CLI> Content-Length: 0
No such command ‘Supported: replaces’ (type ‘help Supported: replaces’ for other possible commands)
No such command ‘WWW-Authenticate: Digest algorithm=MD5, realm=“asterisk”, nonce=“34aa23f9”’ (type ‘help WWW-Authenticate: Digest’ for other possible commands)
No such command ‘Content-Length: 0’ (type ‘help Content-Length: 0’ for other possible commands)
serverCLI>
server
CLI>
serverCLI> <------------>
No such command ‘<------------>’ (type ‘help <------------>’ for other possible commands)
server
CLI> Scheduling destruction of SIP dialog ‘NjM1ZTgyOTlhMDEzZjI2YjM1YzdiYTVlYmYzNzQ3NTQ.’ in 32000 ms (Method: REGISTER)
No such command ‘Scheduling destruction of SIP dialog ‘NjM1ZTgyOTlhMDEzZjI2YjM1YzdiYTVlYmYzNzQ3NTQ.’ in 32000 ms (Method: REGISTER)’ (type ‘help Scheduling destruction’ for other possible commands)
serverCLI> Really destroying SIP dialog ‘[email protected]’ Method: REGISTER
No such command ‘Really destroying SIP dialog ‘[email protected]’ Method: REGISTER’ (type ‘help Really destroying’ for other possible commands)
server
CLI> Really destroying SIP dialog ‘NjM1ZTgyOTlhMDEzZjI2YjM1YzdiYTVlYmYzNzQ3NTQ.’ Method: REGISTER
No such command ‘Really destroying SIP dialog ‘NjM1ZTgyOTlhMDEzZjI2YjM1YzdiYTVlYmYzNzQ3NTQ.’ Method: REGISTER’ (type ‘help Really destroying’ for other possible commands)
REGISTER 13 headers, 0 lines
Reliably Transmitting (no NAT) to 4.79.19.56:5060:
REGISTER sip:sip.jfk.telasip.com SIP/2.0
Via: SIP/2.0/UDP ip.of.se.rv.er:5060;branch=z9hG4bK44aac16f;rport
From: sip:[email protected];tag=as619a1d88
To: sip:[email protected]
Call-ID: [email protected]
CSeq: 105 REGISTER
User-Agent: Asterisk PBX
Max-Forwards: 70
Authorization: Digest username=“rendicott”, realm=“sip.jfk.telasip.com”, algorithm=MD5, uri=“sip:sip.jfk.telasip.com”, nonce=“4b46bfd89737cf127f75b9bb0bccf4a247f63930”, response="adbaba3a785282a5df011e732208f163"
Expires: 120
Contact: sip:[email protected]
Event: registration
Content-Length: 0


server*CLI>
<— SIP read from 4.79.19.56:5060 —>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP ip.of.se.rv.er:5060;branch=z9hG4bK44aac16f;rport=5060
From: sip:[email protected];tag=as619a1d88
To: sip:[email protected]
Call-ID: [email protected]
CSeq: 105 REGISTER
Content-Length: 0
Warning: 392 192.168.4.56:5060 “Noisy feedback tells: pid=13022 req_src_ip=ip.of.se.rv.er req_src_port=5060 in_uri=sip:sip.jfk.telasip.com out_uri=sip:sip.jfk.telasip.com via_cnt==1”

||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

Thanks for any ideas you guys might have, I’ll be happy to answer any further quesions.

Are you using the correct password/secret for the extensions? And do you have NAT=yes for the extensions? Finally how’s your firewall set for passing SIP and RTP?

Here’s a link that discusses noisy feedback - follow the links for the whole picture - doesn’t appear to be an issue.

Yes, I kept the extension/password really simple to avoid that for testing. I do have NAT=yes set for the extension. There is no firewall on the server end. Where the extension is trying to register from is set up as DMZ for testing.

I noticed that my sip_nat.conf is blank by default and lots of other people were filling it out. I tried doing that with a few diff. configs and it didn’t seem to make a difference.

Also, I saw a thread discussing the same “unauthorized” response by addressing the md5 algorithm.

At this point, if I can’t get it working soon I’m gonna have to try a VPN which would suck because half of the point of the remote box is so that developers can have an extension around the world and it still looks like it’s all under the company.

Thanks for helping out.

Sometimes the NAT statement will do strange things.

Still not working, here’s my extension from sip_additional.conf:

|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[1000]
deny=0.0.0.0/0.0.0.0
type=friend
secret=SUPERSECRET
qualify=yes
port=5070
pickupgroup=
permit=0.0.0.0/0.0.0.0
nat=no
mailbox=1000@device
host=dynamic
dtmfmode=rfc2833
dial=SIP/1000
context=from-external
canreinvite=no
callgroup=
callerid=device <1000>
allow=ulaw
accountcode=
call-limit=50
||||||||||||||||||||||||||||||||||||||||||||||||||||||

Here’s what happens when I do nat=no

||||||||||||||||||||||||||
<— SIP read from ip.of.ext.en.si.on:11460 —>
REGISTER sip:domain.com SIP/2.0
Via: SIP/2.0/UDP 192.168.1.3:11460;branch=z9hG4bK-d8754z-de49f241936a3423-1—d8754z-;rport
Max-Forwards: 70
Contact: sip:[email protected]:11460;rinstance=18dc9833c4b09bef
To: "Rusty"sip:[email protected]
From: "Rusty"sip:[email protected];tag=0e4f141c
Call-ID: ZGZkYzFkNGRkMDJkNDJjMzBiMDMwYzQ3NTMxZTE3ZDc.
CSeq: 1 REGISTER
Expires: 3601
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
User-Agent: X-Lite release 1103k stamp 53621
Content-Length: 0

<------------->
— (12 headers 0 lines) —
Using latest REGISTER request as basis request
Sending to 192.168.1.3 : 11460 (no NAT)
ambrin*CLI>
<— Transmitting (no NAT) to 192.168.1.3:11460 —>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.1.3:11460;branch=z9hG4bK-d8754z-de49f241936a3423-1—d8754z-;received=ip.of.ext.en.si.on;rport=11460
From: "Rusty"sip:[email protected];tag=0e4f141c
To: "Rusty"sip:[email protected]
Call-ID: ZGZkYzFkNGRkMDJkNDJjMzBiMDMwYzQ3NTMxZTE3ZDc.
CSeq: 1 REGISTER
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces
Content-Length: 0

<------------>

<— Transmitting (no NAT) to 192.168.1.3:11460 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.1.3:11460;branch=z9hG4bK-d8754z-de49f241936a3423-1—d8754z-;received=ip.of.ext.en.si.on;rport=11460
From: "Rusty"sip:[email protected];tag=0e4f141c
To: "Rusty"sip:[email protected];tag=as3eed4f17
Call-ID: ZGZkYzFkNGRkMDJkNDJjMzBiMDMwYzQ3NTMxZTE3ZDc.
CSeq: 1 REGISTER
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces
WWW-Authenticate: Digest algorithm=MD5, realm=“asterisk”, nonce="6652bad1"
Content-Length: 0
|||||||||||||||||||||||||||||||||||||||

It looks like it’s picking up on the local IP address of the extension and trying to communicate with that address. Of course it’s not going to find anything. So even when it can’t talk to 192.168.1.3 it throws up an “Unauthorized” instead of something more useful like “timed out” or something.

Looks like I have to play around with it until I can get all the “send to’s” and “coming from’s” ironed out.