[Asterisk-Dev] Bug with toll free between 2 asterisk servers
(special toll free signaling?)
John Lange
john.lange at open-it.ca
Mon Sep 19 15:53:19 MST 2005
I believe I have discovered a bug with Asterisk.
Situation: When a call is placed to a toll free number from a sip phone
that passes through 2 Asterisk servers before being terminated it
doesn't work. Asterisk seems to ultimately send the wrong progress
information to the SIP phone.
Network looks like:
PRI <-> Cisco Switch <-sip-> Astrsk 2 <-sip-> Astrsk 1 <-sip-> Sip Phone
This only happens with Toll Free calls! Long distance and other calls
work just fine.
If you remove Asterisk 1 from the equation and connect the Sip Phone
directly to Asterisk 2, then toll free works great. This problem only
happens when the SIP has to pass through 2 Asterisk servers.
Here is what you see in the consoles (Verbose = 3) (detailed sip debug
below):
Asterisk 1 (closest to the phone) console:
-- Executing Dial("SIP/2000-a7e0", "SIP/18665270123 at openit") in new stack
-- Called 18665270123 at openit
-- SIP/openit-c42e is making progress passing it to SIP/2000-a7e0
Asterisk 2 (closest to the PRI) console:
-- Executing Dial("SIP/s-6e98", "SIP/18665270123 at idyia_gw") in new stack
-- Called 18665270123 at idyia_gw
-- SIP/idyia_gw-cca3 is making progress passing it to SIP/s-6e98
On the phone you just hear a fast busy signal.
Please don't be fooled into thinking this is a NAT issue. This test was
done from behind NAT for the purpose of this email only. Normally this
is done from two Asterisk servers with real-world (non NAT) IP
addresses. Also, remember it works perfectly fine for all calls EXCEPT
toll free calls.
Here are the configs on the two machines:
---------
# Asterisk 1 (closest to the phone)
# sip.conf
register => user:X at sol.bighostbox.com
[openit]
type=peer
secret=X
username=user
host=XXX.XXX.XXX.XXX
insecure=very
nat=no
context=openit
dtmfmode=rfc2833
canreinvite=no
qualify=yes
disallow=all
allow=ulaw
# extensions.conf
exten => _18XXNXXXXXX,1,Dial(SIP/${EXTEN}@openit)
----------
---------
# Asterisk 2 (closest to the PRI)
# sip.conf
[darkcore]
type=peer
secret=X
username=user
host=dynamic
insecure=very
nat=yes
context=darkcore_in
dtmfmode=rfc2833
canreinvite=no
qualify=yes
disallow=all
allow=ulaw
# extensions.conf
exten => _18XXNXXXXXX,1,Dial(SIP/${EXTEN}@gw)
----------
SIP DEBUG ASTERISK 2 (closest to the PRI)
----------
Sip read:
INVITE sip:18665270123 at XXX.XXX.XXX.XXX SIP/2.0
Via: SIP/2.0/UDP 192.168.1.50:5060;branch=z9hG4bK71e1c90a
From: "2000" <sip:2000 at 192.168.1.50>;tag=as04c5d8a7
To: <sip:18665270123 at XXX.XXX.XXX.XXX>
Contact: <sip:2000 at 192.168.1.50>
Call-ID: 7091774a7745747f71bb9a95648ce7b4 at 192.168.1.50
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Date: Mon, 19 Sep 2005 21:08:21 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Content-Type: application/sdp
Content-Length: 267
v=0
o=root 29843 29843 IN IP4 192.168.1.50
s=session
c=IN IP4 192.168.1.50
t=0 0
m=audio 10980 RTP/AVP 0 8 2 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:2 G726-32/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
12 headers, 12 lines
Using latest request as basis request
Found peer 'darkcore'
Found RTP audio format 0
Found RTP audio format 8
Found RTP audio format 2
Found RTP audio format 101
Peer audio RTP is at port 192.168.1.50:10980
Found description format PCMU
Found description format PCMA
Found description format G726-32
Found description format telephone-event
Capabilities: us - 0x1c (ulaw|alaw|g726), peer - audio=0x1c (ulaw|alaw|g726)/video=0x0 (nothing), combined - 0x1c (ulaw|alaw|g726)
Non-codec capabilities: us - 0x1 (g723), peer - 0x1 (g723), combined - 0x1 (g723)
Looking for 18665270123 in darkcore_in
list_route: hop: <sip:2000 at 192.168.1.50>
Transmitting (NAT):
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.1.50:5060;branch=z9hG4bK71e1c90a;received=YYY.YYY.YYY.YYY;rport=1027
From: "2000" <sip:2000 at 192.168.1.50>;tag=as04c5d8a7
To: <sip:18665270123 at XXX.XXX.XXX.XXX>
Call-ID: 7091774a7745747f71bb9a95648ce7b4 at 192.168.1.50
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Contact: <sip:18665270123 at XXX.XXX.XXX.XXX>
Content-Length: 0
to YYY.YYY.YYY.YYY:1027
-- Executing Dial("SIP/s-66cf", "SIP/18665270123 at idyia_gw") in new stack
-- Called 18665270123 at idyia_gw
-- SIP/idyia_gw-1306 is making progress passing it to SIP/s-66cf
We're at XXX.XXX.XXX.XXX port 17630
Answering with preferred capability 0x4 (ulaw)
Answering with preferred capability 0x8 (alaw)
Answering with capability 0x10 (g726)
Answering with non-codec capability 0x1 (telephone-event)
Transmitting (NAT):
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP 192.168.1.50:5060;branch=z9hG4bK71e1c90a;received=YYY.YYY.YYY.YYY;rport=1027
From: "2000" <sip:2000 at 192.168.1.50>;tag=as04c5d8a7
To: <sip:18665270123 at XXX.XXX.XXX.XXX>;tag=as7fe769dc
Call-ID: 7091774a7745747f71bb9a95648ce7b4 at 192.168.1.50
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Contact: <sip:18665270123 at XXX.XXX.XXX.XXX>
Content-Type: application/sdp
Content-Length: 271
v=0
o=root 17825 17825 IN IP4 XXX.XXX.XXX.XXX
s=session
c=IN IP4 XXX.XXX.XXX.XXX
t=0 0
m=audio 17630 RTP/AVP 0 8 2 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:2 G726-32/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
to YYY.YYY.YYY.YYY:1027
----------
SIP DEBUG ASTERISK 1 (closest to the Phone)
----------
-- Executing Dial("SIP/2000-5afd", "SIP/18665270123 at openit") in new stack
We're at 192.168.1.50 port 14234
Answering/Requesting with root capability 0x4 (ulaw)
Answering with capability 0x8 (alaw)
Answering with capability 0x10 (g726)
Answering with non-codec capability 0x1 (telephone-event)
12 headers, 12 lines
Reliably Transmitting:
INVITE sip:18665270123 at XXX.XXX.XXX.XXX SIP/2.0
Via: SIP/2.0/UDP 192.168.1.50:5060;branch=z9hG4bK3b250ec2
From: "2000" <sip:2000 at 192.168.1.50>;tag=as5f5675bb
To: <sip:18665270123 at XXX.XXX.XXX.XXX>
Contact: <sip:2000 at 192.168.1.50>
Call-ID: 4d41e9573b02ff97222113d10377154a at 192.168.1.50
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Date: Mon, 19 Sep 2005 21:27:20 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Content-Type: application/sdp
Content-Length: 267
v=0
o=root 30653 30653 IN IP4 192.168.1.50
s=session
c=IN IP4 192.168.1.50
t=0 0
m=audio 14234 RTP/AVP 0 8 2 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:2 G726-32/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
(no NAT) to XXX.XXX.XXX.XXX:5060
-- Called 18665270123 at openit
ws50*CLI>
Sip read:
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.1.50:5060;branch=z9hG4bK3b250ec2;received=YYY.YYY.YYY.YYY;rport=1027
From: "2000" <sip:2000 at 192.168.1.50>;tag=as5f5675bb
To: <sip:18665270123 at XXX.XXX.XXX.XXX>
Call-ID: 4d41e9573b02ff97222113d10377154a at 192.168.1.50
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Contact: <sip:18665270123 at XXX.XXX.XXX.XXX>
Content-Length: 0
10 headers, 0 lines
ws50*CLI>
Sip read:
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP 192.168.1.50:5060;branch=z9hG4bK3b250ec2;received=YYY.YYY.YYY.YYY;rport=1027
From: "2000" <sip:2000 at 192.168.1.50>;tag=as5f5675bb
To: <sip:18665270123 at XXX.XXX.XXX.XXX>;tag=as45f7543e
Call-ID: 4d41e9573b02ff97222113d10377154a at 192.168.1.50
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Contact: <sip:18665270123 at XXX.XXX.XXX.XXX>
Content-Type: application/sdp
Content-Length: 271
v=0
o=root 17825 17825 IN IP4 XXX.XXX.XXX.XXX
s=session
c=IN IP4 XXX.XXX.XXX.XXX
t=0 0
m=audio 18466 RTP/AVP 0 8 2 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:2 G726-32/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
11 headers, 12 lines
Found RTP audio format 0
Found RTP audio format 8
Found RTP audio format 2
Found RTP audio format 101
Peer audio RTP is at port XXX.XXX.XXX.XXX:18466
Found description format PCMU
Found description format PCMA
Found description format G726-32
Found description format telephone-event
Capabilities: us - 0x1c (ulaw|alaw|g726), peer - audio=0x1c (ulaw|alaw|g726)/video=0x0 (nothing), combined - 0x1c (ulaw|alaw|g726)
Non-codec capabilities: us - 0x1 (g723), peer - 0x1 (g723), combined - 0x1 (g723)
-- SIP/openit-6444 is making progress passing it to SIP/2000-5afd
--
John Lange
More information about the asterisk-dev
mailing list