SPA 1001 inside NAT, asterisk on Internet, miserable


#1

I’m trying to connect an SPA 1001 inside a NAT’d network to an * box on the Internet.

I’ve tried the easiest thing: port forwarding 5060-5070 and 8566-35000(!) to the IP of the SPA1001. In sip.conf I’ve got nat=yes, and host=dynamic.
On the SPA, I’ve got nat mapping enable=yes. and nat keepalive=yes.

The SPA successfully registers with the * box, but I don’t get a dialtone and can’t place calls. With sip debug on, I see the successful registrations and keepalives, but I don’t see anything when I go offhook or dial.

The * config works fine with a Firefly sip client on my PC.

I’m going quite nuts.

Any help appreciated, I can send sip debug output, spa settings, cash…

Eric.


#2
  1. Dont enter a DISPLAYNAME in the Sipura setup, its messing up the SIP notifys !!

  2. Make sure, on the page “SIP”, you have
    0.020
    in the line
    RTP Packet Size

Besides from that, the SPA’s are great, but the setup is a MAJOR catastrophe and the support/documentation of Sipura/Linksys is worser then a rootcanal handling without narcotica.


#3

Arg, still no joy. Here’s the output starting with a hard reboot of the SPA1001:

<-- SIP read from pub.ip.add.net:5060:
REGISTER sip:myastbox.somewhere.com SIP/2.0
Via: SIP/2.0/UDP 192.168.168.15:5060;branch=z9hG4bK-40b2985a
From: sip:homesip@myastbox.somewhere.com;tag=2506c5a62f69bdf5o1
To: sip:homesip@myastbox.somewhere.com
Call-ID: 4996e01e-f9f7a5dd@192.168.168.15
CSeq: 1 REGISTER
Max-Forwards: 70
Contact: sip:homesip@192.168.168.15:5060;expires=3600
User-Agent: Sipura/SPA1001-2.0.13(SEg)
Content-Length: 0
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER
Supported: x-sipura

— (12 headers 0 lines)—
Using latest REGISTER request as basis request
Sending to 192.168.168.15 : 5060 (non-NAT)
Transmitting (NAT) to pub.ip.add.net:5060:
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.168.15:5060;branch=z9hG4bK-40b2985a;received=pub.ip.add.net
From: sip:homesip@myastbox.somewhere.com;tag=2506c5a62f69bdf5o1
To: sip:homesip@myastbox.somewhere.com
Call-ID: 4996e01e-f9f7a5dd@192.168.168.15
CSeq: 1 REGISTER
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Contact: sip:homesip@66.81.92.253
Content-Length: 0


Transmitting (NAT) to pub.ip.add.net:5060:
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.168.15:5060;branch=z9hG4bK-40b2985a;received=pub.ip.add.net
From: sip:homesip@myastbox.somewhere.com;tag=2506c5a62f69bdf5o1
To: sip:homesip@myastbox.somewhere.com;tag=as63f85a3d
Call-ID: 4996e01e-f9f7a5dd@192.168.168.15
CSeq: 1 REGISTER
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Contact: sip:homesip@66.81.92.253
WWW-Authenticate: Digest realm=“asterisk”, nonce="59cc83e7"
Content-Length: 0


Scheduling destruction of call ‘4996e01e-f9f7a5dd@192.168.168.15’ in 15000 ms
telebox*CLI>
<-- SIP read from pub.ip.add.net:5060:
REGISTER sip:myastbox.somewhere.com SIP/2.0
Via: SIP/2.0/UDP 192.168.168.15:5060;branch=z9hG4bK-a81664aa
From: sip:homesip@myastbox.somewhere.com;tag=2506c5a62f69bdf5o1
To: sip:homesip@myastbox.somewhere.com
Call-ID: 4996e01e-f9f7a5dd@192.168.168.15
CSeq: 2 REGISTER
Max-Forwards: 70
Authorization: Digest username=“homesip”,realm=“asterisk”,nonce=“59cc83e7”,uri=“sip:myastbox.somewhere.com”,algorithm=MD5,response="878b143d9658f9906a7d6a8af28bb028"
Contact: sip:homesip@192.168.168.15:5060;expires=3600
User-Agent: Sipura/SPA1001-2.0.13(SEg)
Content-Length: 0
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER
Supported: x-sipura

— (13 headers 0 lines)—
Using latest REGISTER request as basis request
Sending to 192.168.168.15 : 5060 (NAT)
Transmitting (NAT) to pub.ip.add.net:5060:
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.168.15:5060;branch=z9hG4bK-a81664aa;received=pub.ip.add.net
From: sip:homesip@myastbox.somewhere.com;tag=2506c5a62f69bdf5o1
To: sip:homesip@myastbox.somewhere.com
Call-ID: 4996e01e-f9f7a5dd@192.168.168.15
CSeq: 2 REGISTER
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Contact: sip:homesip@66.81.92.253
Content-Length: 0


Transmitting (NAT) to pub.ip.add.net:5060:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.168.15:5060;branch=z9hG4bK-a81664aa;received=pub.ip.add.net
From: sip:homesip@myastbox.somewhere.com;tag=2506c5a62f69bdf5o1
To: sip:homesip@myastbox.somewhere.com;tag=as63f85a3d
Call-ID: 4996e01e-f9f7a5dd@192.168.168.15
CSeq: 2 REGISTER
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Expires: 3600
Contact: sip:homesip@192.168.168.15:5060;expires=3600
Date: Tue, 25 Apr 2006 17:37:26 GMT
Content-Length: 0


Not sure what that first unauthorized is (wrong auth type?).

I’m also not sure about “Proxy” vs. “Outbound Proxy”, but these settings don’t seem to matter.

It… seems… so… close…

Eric.


#4

I am not that deep into SIP protocol thingies, but i think its normal, i have it too with all phones here.

See, the first authori…request is sequence 1, answered with 401.
And THEN you see the authori…request seq.2 but this time using the additional “Auth…: Digest” line.

So i THINK its the normal flow, maybe depending on the auth.-method ?
Maybe there is already MD5 in SIP coded, so the first “non md5” request get always a 401 back ?

Well, just babbling…could be wrong of course, but i think thats what happens there.

Anyway, your 2nd register was fine, answered with an “OK”, so there is no problem.

The register wasnt your problem anyway.