[Asterisk-Users] Wired Interactions between Asterisk (Public) and
Budgetone (behind NAT)
Patrick Yu
ipaq3870 at gmail.com
Mon Aug 8 10:33:01 MST 2005
Hi,
I recently encountered a weired situation where my budgetone stopped
working. My network is like this:
Asterisk on Public IP ----------- ADSL NAT Router ----- GS01, GS02,
GS03 on Internal IP
We have an Asterisk server running with a public IP address, which
serves as the master PBX. On a remote site, we have 3 Budgetones all
having internal IP addresses assigned by the ADSL NAT router. The 3
Budgetones connects to our Asterisk using random ports and Stun,
which is also running on the same server as Asterisk.
The strange part is, one day all the Budgetones stopped working and
the only work part is SIP registration. When an attempt to dial in
from Asterisk to GS0x, the actual physical GS phone just don't ring at
all (or for just a fraction of a second sometimes, just bearly
noticeable) - but we can still hear the ringing sound from the calling
phone until the timeout of Dial() has reached, i.e. about 20 seconds
later. A trace via etheral reveals the following:
7.37s Asterisk-----invite----->GS01
7.48s GS01-----trying----->Asterisk
7.49s GS01-----rining----->Asterisk
7.51s GS01-----OK----->Asterisk
7.52s GS01-----487 request cancelled----->Asterisk
7.53s Asterisk----->ACK----->GS01
I have no idea why the 487 request cancel appeared here. Does that
mean there's something wrong with the GS or the network in the remote
site? I have attached the SIP debug message at the end of the mail.
When the people from the remote site tried to pick up the phone and
dialed a number, it shows a 486 error message on the LCD. The
ethereal trace looks like this:
5.15s GS01-----invite----->Asterisk
5.16s Asterisk-----407 Proxy Authentication Required----->GS01
5.18s GS01-----ACK----->Asterisk
5.27s GS01-----ACK(w/Proxy authorization)----->Asterisk
6.28s GS01-----ACK(w/Proxy authorization)----->Asterisk
8.28s GS01-----ACK(w/Proxy authorization)----->Asterisk
Looks like that Asterisk don't quite like the authorization coming
with ACK and produces no response at all. Is there anything wrong with
Asterisk?
I tried to setup another GS04 with the exact phone and server
settings, except that it is using a public IP instead of NAT, though I
keep Stun settings in place. It works as expected, for both
directions.
Dial out from GS04 will produce the following ethereal traces:
1.22s GS04-----invite----->Asterisk
1.23s Asterisk-----407 Proxy Authentication Required----->GS04
1.26s GS04-----ACK----->Asterisk
1.28s GS04-----invite(w/Proxy authorization)----->Asterisk
1.29s Asterisk-----Trying----->GS04
1.30s Asterisk-----OK----->GS04
1.32s Asterisk<-----RTP----->GS04
1.35s GS04-----ACK----->Asterisk
GS that don't use internal IP (or Stun?) did work and sent out invite
instead of ACK to carry the Proxy authorization. This time Asterisk
was happy to respond. Weird...
I have a mix of 1.0.5.22 and 1.0.6.6 Budgetone 100 in the remote site,
and I tried Asterisk 1.0.7/8/9, with the same strange results.
Does anybody know what happened and how to solve it? Any help or
advice are greatly appreciated.
Thanks in advance.
PY
-----excerpt from sip.conf-----
[general]
port=5060
bindaddr=0.0.0.0
[GS0x]
callerid=Test <0000>
username=GS0x
secret=
host=dynamic
type=friend
nat=yes
qualify=yes
canreinvite=no
dtmfmode=rfc2833
disallow=all
allow=ilbc
-----sip debug peer message for the 1st etheral trace-----
We're at 203.86.58.85 port 17824
Answering with capability 0x400 (ilbc)
Answering with non-codec capability 0x1 (telephone-event)
12 headers, 10 lines
Reliably Transmitting:
INVITE sip:grandstream03 at 218.17.9.52:61675 SIP/2.0
Via: SIP/2.0/UDP 203.86.58.85:5060;branch=z9hG4bK391c73a3;rport
From: "asterisk" <sip:asterisk at 203.86.58.85>;tag=as60a92937
To: <sip:grandstream03 at 218.17.9.52:61675>
Contact: <sip:asterisk at 203.86.58.85>
Call-ID: 7c4925fe42a7140e34b4553438798f50 at 203.86.58.85
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Date: Mon, 08 Aug 2005 15:43:39 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Content-Type: application/sdp
Content-Length: 222
v=0
o=root 23723 23723 IN IP4 203.86.58.85
s=session
c=IN IP4 203.86.58.85
t=0 0
m=audio 17824 RTP/AVP 97 101
a=rtpmap:97 iLBC/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
(NAT) to 218.17.9.52:61675
-- Called grandstream03
Sip read:
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 203.86.58.85:5060;branch=z9hG4bK391c73a3;rport
From: "asterisk" <sip:asterisk at 203.86.58.85>;tag=as60a92937
To: <sip:grandstream03 at 218.17.9.52:61675>
Call-ID: 7c4925fe42a7140e34b4553438798f50 at 203.86.58.85
CSeq: 102 INVITE
User-Agent: Grandstream BT100 1.0.5.22
Warning: 399 218.17.9.52 "detected NAT type is full cone"
Content-Length: 0
9 headers, 0 lines
Sip read:
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 203.86.58.85:5060;branch=z9hG4bK391c73a3;rport
From: "asterisk" <sip:asterisk at 203.86.58.85>;tag=as60a92937
To: <sip:grandstream03 at 218.17.9.52:61675>;tag=3ea9070f455df613
Call-ID: 7c4925fe42a7140e34b4553438798f50 at 203.86.58.85
CSeq: 102 INVITE
User-Agent: Grandstream BT100 1.0.5.22
Warning: 399 218.17.9.52 "detected NAT type is full cone"
Content-Length: 0
9 headers, 0 lines
-- SIP/grandstream03-8516 is ringing
Sip read:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 203.86.58.85:5060;branch=z9hG4bK391c73a3;rport
From: "asterisk" <sip:asterisk at 203.86.58.85>;tag=as60a92937
To: <sip:grandstream03 at 218.17.9.52:61675>;tag=b13f68e3c711f17a
Call-ID: 7c4925fe42a7140e34b4553438798f50 at 203.86.58.85
CSeq: 1 CANCEL
User-Agent: Grandstream BT100 1.0.5.22
Warning: 399 218.17.9.52 "detected NAT type is full cone"
Contact: <sip:grandstream03 at 218.17.9.52:61675>
Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE
Supported: replaces
Content-Length: 0
12 headers, 0 lines
Sip read:
SIP/2.0 487 Request Cancelled
Via: SIP/2.0/UDP 203.86.58.85:5060;branch=z9hG4bK391c73a3;rport
From: "asterisk" <sip:asterisk at 203.86.58.85>;tag=as60a92937
To: <sip:grandstream03 at 218.17.9.52:61675>;tag=5c4edba74a62c358
Call-ID: 7c4925fe42a7140e34b4553438798f50 at 203.86.58.85
CSeq: 102 INVITE
User-Agent: Grandstream BT100 1.0.5.22
Warning: 399 218.17.9.52 "detected NAT type is full cone"
Content-Length: 0
9 headers, 0 lines
Transmitting:
ACK sip:grandstream03 at 218.17.9.52:61675 SIP/2.0
Via: SIP/2.0/UDP 203.86.58.85:5060;branch=z9hG4bK391c73a3;rport
From: "asterisk" <sip:asterisk at 203.86.58.85>;tag=as60a92937
To: <sip:grandstream03 at 218.17.9.52:61675>;tag=5c4edba74a62c358
Contact: <sip:asterisk at 203.86.58.85>
Call-ID: 7c4925fe42a7140e34b4553438798f50 at 203.86.58.85
CSeq: 102 ACK
User-Agent: Asterisk PBX
Content-Length: 0
(NAT) to 218.17.9.52:61675
Sip read:
0 headers, 0 lines
11 headers, 0 lines
Reliably Transmitting:
OPTIONS sip:grandstream03 at 218.17.9.52:61675 SIP/2.0
Via: SIP/2.0/UDP 203.86.58.85:5060;branch=z9hG4bK73be5f13
From: "asterisk" <sip:asterisk at 203.86.58.85>;tag=as572c251f
To: <sip:grandstream03 at 218.17.9.52:61675>
Contact: <sip:asterisk at 203.86.58.85>
Call-ID: 59c9aa8b403ecd082dfc59a31373e592 at 203.86.58.85
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX
Date: Mon, 08 Aug 2005 15:43:55 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Content-Length: 0
(no NAT) to 218.17.9.52:61675
Sip read:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 203.86.58.85:5060;branch=z9hG4bK73be5f13
From: "asterisk" <sip:asterisk at 203.86.58.85>;tag=as572c251f
To: <sip:grandstream03 at 218.17.9.52:61675>;tag=ddc15f2b8c0f3868
Call-ID: 59c9aa8b403ecd082dfc59a31373e592 at 203.86.58.85
CSeq: 102 OPTIONS
User-Agent: Grandstream BT100 1.0.5.22
Warning: 399 218.17.9.52 "detected NAT type is full cone"
Contact: <sip:grandstream03 at 218.17.9.52:61675>
Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE
Supported: replaces
Content-Length: 0
12 headers, 0 lines
Destroying call '59c9aa8b403ecd082dfc59a31373e592 at 203.86.58.85'
More information about the asterisk-users
mailing list