Apologies if this is a repeat: I trawled through the archives and couldn't
find a reasonable answer, so I'm asking here. I have an Asterisk install
connecting from behind a NAT device (DSL modem) to a SIP proxy (in my case,
Broadvoice). I have an sjphone softphone on a Windows PC also behind the NAT
device that connects to the Asterisk install, and using this setup I've been
pretty happily (up until a few days ago) been able to make and receive calls
from the softphone through Asterisk using the Broadvoice line.
All was quite well up until a couple of days when in response to the recent
OpenSSL advisory I was required to update my server (running Debian 4.0
testing) and the wonderful apt-get update pulled in Asterisk 1.4.18 (the
Debian customized package). Since then I've had a problem where incoming
calls work but outgoing calls from the softphone do not.
Incoming calls work: someone calling my Broadvoice line is properly directed
to my Asterisk server and the call audio is transferred to the softphone, so
when I'm home I can answer calls if my PC is on and otherwise voicemail
swallows it. However, on outgoing calls I consistently get a
"congested"
message. After a bunch of research, I think I've narrowed the problem down
to an incorrect SIP From address being sent by my server to Broadvoice in
response to the dial out request by my softphone, but I'm not certain if
this is a bug in my configuration or a bug in Asterisk so I'd be grateful if
any one with a more experienced eye could take a look at the configuration
and logs I generated and point out my errors. My apologies if the mail is
rather long, but I wanted to be as complete as possible.
I've included my OS version information, the Asterisk version information,
my SIP.conf and my extensions.conf (ignore the Gtalk integration stuff: not
relevant). The mess (I believe) occurs about midway through the SIP
debugging output: it executes the actual Dial command to talk to Broadvoice,
but it sends femi@<externip> as the From: address, as opposed to sending
my
broadvoice username and password (which I'm assuming is what it needs to
do). At this point Broadvoice throws a 403 Forbidden (as I would expect) and
Asterisk reports it as a Congested/Busy error (which seems wrong).
Thanks, and please let me know your thoughts,
Femi.
------------------------------------------
General machine information
------------------------------------------
owner at sophiel:~$ uname -a
Linux sophiel 2.6.18-6-686 #1 SMP Sun Feb 10 22:11:31 UTC 2008 i686
GNU/Linux
owner at sophiel:~$ more /etc/debian_version
lenny/sid
-----------------
Asterisk Version
-----------------
sophiel:/etc/asterisk# asterisk -vvvgc
Asterisk 1.4.18.1~dfsg-1, Copyright (C) 1999 - 2008 Digium, Inc. and others.
Created by Mark Spencer <markster at digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty'
for
details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it
under
certain conditions. Type 'core show license' for details.
----------------
SIP Config
----------------
[general]
context=default ; Default context for incoming calls
bindport=5060 ; UDP Port to bind to (SIP standard port is 5060)
bindaddr=0.0.0.0 ; IP address to bind to (0.0.0.0 binds to all)
srvlookup=yes ; Enable DNS SRV lookups on outbound calls
pedantic=no
maxexpiry=3600 ; Max length of incoming registration we allow
defaultexpiry=120 ; Default length of incoming/outgoing registration
disallow=all ; First disallow all codecs
allow=ulaw ; Allow codecs in order of preference
relaxdtmf=yes ; Relax dtmf handling
nat=yes ; Global NAT settings (Affects all peers and users)
dtmfmode=inband
register = XXXXXXXXXX at sip.broadvoice.com:Y
YYYYYYYYY:XXXXXXXXXX at sip.broadvoice.com/home_out
externip = AAA.BBB.CCC.DDD
localnet=192.168.0.0/255.255.0.0; All RFC 1918 addresses are local networks
[authentication]
[broadvoice-out]
type=friend
user=phone
host=sip.broadvoice.com
username=XXXXXXXXXX
fromuser=XXXXXXXXXX
fromdomain=sip.broadvoice.com
secret=YYYYYYYYYY
insecure=port,invite
context=pickup
authname=XXXXXXXXXX
dtmfmode=inband
dtmf=inband
canreinvite=no
nat=yes
qualify=yes
disallow=all
allow=ulaw
deny=0.0.0.0/0.0.0.0
proxy=proxy.bos.broadvoice.com
outboundproxy=proxy.bos.broadvoice.com
[femi]
type=friend
context=home-out
regexten=102 ; When they register, create extension 209
username=eeee
secret=FFFFFFFFFFF
host=dynamic
nat=no ; X-Lite is behind a NAT router
dtmfmode=INFO
canreinvite=yes ; Typically set to NO if behind NAT
disallow=all
allow=ulaw
----------------
Extensions
----------------
[general]
static=yes
writeprotect=no
autofallthrough=no
clearglobalvars=no
priorityjumping=no
[globals]
CONSOLE=Console/dsp ; Console interface for demo
IAXINFO=guest ; IAXtel username/password
TRUNK=Zap/g2 ; Trunk interface
TRUNKMSD=1 ; MSD digits to strip
(usually 1 or 0)
[dundi-e164-customers]
[dundi-e164-via-pstn]
[dundi-e164-local]
include => dundi-e164-canonical
include => dundi-e164-customers
include => dundi-e164-via-pstn
[dundi-e164-switch]
switch => DUNDi/e164
[dundi-e164-lookup]
include => dundi-e164-local
include => dundi-e164-switch
[macro-dundi-e164]
exten => s,1,Goto(${ARG1},1)
include => dundi-e164-lookup
[iaxtel700]
exten =>
_91700XXXXXXX,1,Dial(IAX2/${IAXINFO}@iaxtel.com/${EXTEN:1}@iaxtel<http://IAXINFO%7D
at iaxtel.com/$%7BEXTEN:1%7D at iaxtel>
)
[iaxprovider]
[trunkint]
exten => _9011.,1,Macro(dundi-e164,${EXTEN:4})
exten => _9011.,n,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
[trunkld]
exten => _91NXXNXXXXXX,1,Macro(dundi-e164,${EXTEN:1})
exten => _91NXXNXXXXXX,n,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
[trunklocal]
exten => _9NXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
[trunktollfree]
exten => _91800NXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
exten => _91888NXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
exten => _91877NXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
exten => _91866NXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
[international]
ignorepat => 9
include => longdistance
include => trunkint
[longdistance]
ignorepat => 9
include => local
include => trunkld
[local]
ignorepat => 9
include => default
include => parkedcalls
include => trunklocal
include => iaxtel700
include => trunktollfree
include => iaxprovider
[default]
include => pickup
[pickup]
exten => XXXXXXXXXX,1,Goto(office|s|1)
exten => s,1,Goto(office|s|1)
[office]
exten => s,1,Wait,1
exten => s,2,Answer
exten => s,3,Wait,1
exten => s,4,Background(main-intro)
exten => s,5,Background(dialextension)
exten => s,6,Wait,1
exten => s,7,Background(forsales)
exten => s,8,Background(press1)
exten => s,9,Wait,1
exten => s,10,Background(fortechsupport)
exten => s,11,Background(press2)
exten => s,12,Wait,1
exten => s,13,Background(forallotherinquiries)
exten => s,14,Background(press4)
exten => s,15,Wait,1
exten => s,16,Background(repeatoptions)
exten => s,17,Background(pressstar)
exten => s,18,WaitExten(10)
exten => t,1,Hangup
exten => *,1,Goto(s|7)
exten => 102,1,Dial(SIP/femi,15)
exten => 102,2,Voicemail(u102 at office)
exten => 102,3,Hangup
exten => 1,1,Dial(SIP/femi&Gtalk/asterisk/ggggggggggg at gmail.com,15)
exten => 1,2,Voicemail(u1 at office)
exten => 1,3,Hangup
exten => 2,1,Dial(SIP/femi,15)
exten => 2,2,Voicemail(u2 at office)
exten => 2,3,Hangup
exten => 4,1,Dial(SIP/femi,15)
exten => 4,2,Voicemail(u4 at office)
exten => 4,3,Hangup
exten => 8,1,JabberSend(asterisk,ggggggggggg at gmail.com,Incoming call from
${CALLERID(all)})
exten => 8,2,Dial(Gtalk/asterisk/ggggggggggg at gmail.com,15)
exten => 8,3,Voicemail(u1 at office)
exten => 8,4,Hangup
exten => 9,1,Dial(Gtalk/asterisk/hhhhhhh at gmail.com,15)
[home-out]
exten => *69,1,Dial(SIP/*69 at sip.broadvoice.com)
exten => _8XXXXXXXXXX,1,Dial(SIP/*65 at
sip.broadvoice.com,,D(wwww${EXTEN:1}))
exten => _XXXXXXXXXX,1,Dial(SIP/${EXTEN}@sip.broadvoice.com<EXTEN%7D at
sip.broadvoice.com>
)
exten => _1XXXXXXXXXX,1,Dial(SIP/${EXTEN}@sip.broadvoice.com<EXTEN%7D at
sip.broadvoice.com>
)
exten => _011XXXXXXXXXXXX,1,Dial(SIP/${EXTEN}@sip.broadvoice.com<EXTEN%7D
at sip.broadvoice.com>
)
exten => _011XXXXXXXXXXX,1,Dial(SIP/${EXTEN}@sip.broadvoice.com<EXTEN%7D
at sip.broadvoice.com>
)
exten => 1,1,Voicemail(u1 at office)
exten => 2,1,Voicemail(u2 at office)
exten => 4,1,Voicemail(u4 at office)
exten => 102,1,Voicemail(u102 at office)
exten => 8,1,Dial(Gtalk/asterisk/ggggggggggg at gmail.com,15)
exten => 9,1,Dial(Gtalk/asterisk/hhhhhhh at gmail.com,15)
-----------------
Dialog
-----------------
=============== Starting out
<--- SIP read from 192.168.2.11:5060 --->
INVITE sip:1GGGGGGGGGG at 192.168.2.1 <sip%3A1GGGGGGGGGG at 192.168.2.1>
SIP/2.0
Via: SIP/2.0/UDP 192.168.2.11
;branch=z9hG4bKc0a8020b000001594834443400007cf00000015e;rport
From: "unknown" <sip:femi at 192.168.2.1 <sip%3Afemi at
192.168.2.1>>;tag=f4f45e2898
To: <sip:1GGGGGGGGGG at 192.168.2.1 <sip%3A1GGGGGGGGGG at
192.168.2.1>>
Contact: <sip:femi at 192.168.2.11 <sip%3Afemi at 192.168.2.11>>
Call-ID: 6D8716979A2542FBBF444A7740BE8F110xc0a8020b
CSeq: 1 INVITE
Max-Forwards: 70
User-Agent: SJphone/1.65.377a (SJ Labs)
Content-Length: 309
Content-Type: application/sdp
Supported: replaces,norefersub,timer
v=0
o=- 3420373684 3420373684 IN IP4 192.168.2.11
s=SJphone
c=IN IP4 192.168.2.11
t=0 0
m=audio 49182 RTP/AVP 3 97 98 8 0
c=IN IP4 192.168.2.11
a=rtpmap:3 GSM/8000
a=rtpmap:97 iLBC/8000
a=rtpmap:98 iLBC/8000
a=fmtp:98 mode=20
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=setup:active
a=sendrecv
=============== Executing the Dial command from the dial plan
<------------>
-- Executing [1GGGGGGGGGG at home-out:1] Dial("SIP/femi-081fd850",
"SIP/
1GGGGGGGGGG at sip.broadvoice.com") in new stack
Audio is at AAA.BBB.CCC.DDD port 14950
Adding codec 0x4 (ulaw) to SDP
Reliably Transmitting (NAT) to 147.135.32.221:5060:
INVITE sip:1GGGGGGGGGG at sip.broadvoice.com<sip%3A1GGGGGGGGGG at
sip.broadvoice.com>SIP/2.0
Via: SIP/2.0/UDP AAA.BBB.CCC.DDD:5060;branch=z9hG4bK32793aaa;rport
From: "unknown" <sip:femi at AAA.BBB.CCC.DDD>;tag=as19d4b188
To: <sip:1GGGGGGGGGG at sip.broadvoice.com<sip%3A1GGGGGGGGGG at
sip.broadvoice.com>>
Contact: <sip:femi at AAA.BBB.CCC.DDD>
Call-ID: 12d5044c5688a5854b46da0b6c6c7df8 at AAA.BBB.CCC.DDD
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Max-Forwards: 70
Date: Wed, 21 May 2008 15:48:02 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Content-Type: application/sdp
Content-Length: 190
v=0
o=root 18965 18965 IN IP4 AAA.BBB.CCC.DDD
s=session
c=IN IP4 AAA.BBB.CCC.DDD
t=0 0
m=audio 14950 RTP/AVP 0
a=rtpmap:0 PCMU/8000
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv
---
-- Called 1GGGGGGGGGG at sip.broadvoice.com
<--- SIP read from 147.135.32.221:5060 --->
SIP/2.0 100 Trying
Call-ID: 12d5044c5688a5854b46da0b6c6c7df8 at AAA.BBB.CCC.DDD
CSeq: 102 INVITE
From: "unknown" <sip:femi at AAA.BBB.CCC.DDD>;tag=as19d4b188
To: <sip:1GGGGGGGGGG at sip.broadvoice.com<sip%3A1GGGGGGGGGG at
sip.broadvoice.com>>
Via: SIP/2.0/UDP AAA.BBB.CCC.DDD:5060;branch=z9hG4bK32793aaa
Content-Length: 0
<------------->
--- (7 headers 0 lines) ---
<--- SIP read from 147.135.32.221:5060 --->
SIP/2.0 403 Forbidden
Call-ID: 12d5044c5688a5854b46da0b6c6c7df8 at AAA.BBB.CCC.DDD
CSeq: 102 INVITE
From: "unknown" <sip:femi at AAA.BBB.CCC.DDD>;tag=as19d4b188
To: <sip:1GGGGGGGGGG at sip.broadvoice.com<sip%3A1GGGGGGGGGG at
sip.broadvoice.com>>;tag=xz01
Via: SIP/2.0/UDP AAA.BBB.CCC.DDD:5060;branch=z9hG4bK32793aaa
User-Agent: Asterisk PBX
Content-Length: 139
Content-Type: application/sdp
v=0
o=2546725875 18965 18965 IN IP4 AAA.BBB.CCC.DDD
s=-
c=IN IP4 AAA.BBB.CCC.DDD
t=0 0
m=audio 14950 RTP/AVP 0
a=rtpmap:0 PCMU/8000
<------------->
--- (9 headers 7 lines) ---
Transmitting (NAT) to 147.135.32.221:5060:
ACK sip:1GGGGGGGGGG at sip.broadvoice.com<sip%3A1GGGGGGGGGG at
sip.broadvoice.com>SIP/2.0
Via: SIP/2.0/UDP AAA.BBB.CCC.DDD:5060;branch=z9hG4bK32793aaa;rport
From: "unknown" <sip:femi at AAA.BBB.CCC.DDD>;tag=as19d4b188
To: <sip:1GGGGGGGGGG at sip.broadvoice.com<sip%3A1GGGGGGGGGG at
sip.broadvoice.com>>;tag=xz01
Contact: <sip:femi at AAA.BBB.CCC.DDD>
Call-ID: 12d5044c5688a5854b46da0b6c6c7df8 at AAA.BBB.CCC.DDD
CSeq: 102 ACK
User-Agent: Asterisk PBX
Max-Forwards: 70
Content-Length: 0
---
[May 21 11:48:02] WARNING[18972]: chan_sip.c:12198 handle_response_invite:
Received response: "Forbidden" from '"unknown"
<sip:femi at AAA.BBB.CCC.DDD>;tag=as19d4b188'
-- SIP/sip.broadvoice.com-08201e98 is circuit-busy
== Everyone is busy/congested at this time (1:0/1/0)
Really destroying SIP dialog
'12d5044c5688a5854b46da0b6c6c7df8 at AAA.BBB.CCC.DDD' Method: INVITE
<--- SIP read from 192.168.2.11:5060 --->
CANCEL sip:1GGGGGGGGGG at 192.168.2.1 <sip%3A1GGGGGGGGGG at 192.168.2.1>
SIP/2.0
Via: SIP/2.0/UDP 192.168.2.11
;branch=z9hG4bKc0a8020b0000015a483444350000703c00000160;rport
From: "unknown" <sip:femi at 192.168.2.1 <sip%3Afemi at
192.168.2.1>>;tag=f4f45e2898
To: <sip:1GGGGGGGGGG at 192.168.2.1 <sip%3A1GGGGGGGGGG at
192.168.2.1>>
Call-ID: 6D8716979A2542FBBF444A7740BE8F110xc0a8020b
CSeq: 2 CANCEL
Max-Forwards: 70
User-Agent: SJphone/1.65.377a (SJ Labs)
Content-Length: 0
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.digium.com/pipermail/asterisk-users/attachments/20080522/3f31ae61/attachment.htm