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.<br>
<div class="gmail_quote">
<br>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.<br>
<br>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.<br>
<br>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).<br>
<br>Thanks, and please let me know your thoughts,<br>Femi.<br><br>------------------------------------------<br>General machine information<br>------------------------------------------<br>owner@sophiel:~$ uname -a<br>Linux sophiel 2.6.18-6-686 #1 SMP Sun Feb 10 22:11:31 UTC 2008 i686 GNU/Linux<br>
owner@sophiel:~$ more /etc/debian_version<br>lenny/sid<br><br>-----------------<br>Asterisk Version<br>-----------------<br>sophiel:/etc/asterisk# asterisk -vvvgc<br>Asterisk <a href="http://1.4.18.1/" target="_blank">1.4.18.1</a>~dfsg-1, Copyright (C) 1999 - 2008 Digium, Inc. and others.<br>
Created by Mark Spencer <<a href="mailto:markster@digium.com" target="_blank">markster@digium.com</a>><br>Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.<br>This is free software, with components licensed under the GNU General Public<br>
License version 2 and other licenses; you are welcome to redistribute it under<br>certain conditions. Type 'core show license' for details.<br><br>----------------<br>SIP Config<br>----------------<br>[general]<br>
context=default ; Default context for incoming calls<br>bindport=5060 ; UDP Port to bind to (SIP standard port is 5060)<br>bindaddr=<a href="http://0.0.0.0/" target="_blank">0.0.0.0</a> ; IP address to bind to (<a href="http://0.0.0.0/" target="_blank">0.0.0.0</a> binds to all)<br>
srvlookup=yes ; Enable DNS SRV lookups on outbound calls<br>pedantic=no<br>maxexpiry=3600 ; Max length of incoming registration we allow<br>defaultexpiry=120 ; Default length of incoming/outgoing registration<br>
disallow=all ; First disallow all codecs<br>allow=ulaw ; Allow codecs in order of preference<br>relaxdtmf=yes ; Relax dtmf handling<br>nat=yes ; Global NAT settings (Affects all peers and users)<br>
dtmfmode=inband<br>register = XXXXXXXXXX@sip.broadvoice.com:Y<a href="http://YYYYYYYYY:XXXXXXXXXX@sip.broadvoice.com/home_out" target="_blank">YYYYYYYYY:XXXXXXXXXX@sip.broadvoice.com/home_out</a><br>externip = AAA.BBB.CCC.DDD<br>
localnet=<a href="http://192.168.0.0/255.255.0.0" target="_blank">192.168.0.0/255.255.0.0</a>; All RFC 1918 addresses are local networks<br>
<br>[authentication]<br><br>[broadvoice-out]<br>type=friend<br>user=phone<br>host=<a href="http://sip.broadvoice.com/" target="_blank">sip.broadvoice.com</a><br>username=XXXXXXXXXX<br>fromuser=XXXXXXXXXX<br>fromdomain=<a href="http://sip.broadvoice.com/" target="_blank">sip.broadvoice.com</a><br>
secret=YYYYYYYYYY<br>insecure=port,invite<br>context=pickup<br>authname=XXXXXXXXXX<br>dtmfmode=inband<br>dtmf=inband<br>canreinvite=no<br>nat=yes<br>qualify=yes<br>disallow=all<br>allow=ulaw<br>deny=<a href="http://0.0.0.0/0.0.0.0" target="_blank">0.0.0.0/0.0.0.0</a><br>
proxy=<a href="http://proxy.bos.broadvoice.com/" target="_blank">proxy.bos.broadvoice.com</a><br>outboundproxy=<a href="http://proxy.bos.broadvoice.com/" target="_blank">proxy.bos.broadvoice.com</a><br><br>[femi]<br>type=friend<br>
context=home-out<br>regexten=102 ; When they register, create extension 209<br>
username=eeee<br>secret=FFFFFFFFFFF<br>host=dynamic<br>nat=no ; X-Lite is behind a NAT router<br>dtmfmode=INFO<br>canreinvite=yes ; Typically set to NO if behind NAT<br>disallow=all<br>
allow=ulaw<br><br><br>----------------<br>Extensions<br>----------------<br>[general]<br>static=yes<br>writeprotect=no<br>autofallthrough=no<br>clearglobalvars=no<br>priorityjumping=no<br><br>[globals]<br>CONSOLE=Console/dsp ; Console interface for demo<br>
IAXINFO=guest ; IAXtel username/password<br>TRUNK=Zap/g2 ; Trunk interface<br>TRUNKMSD=1 ; MSD digits to strip (usually 1 or 0)<br>
<br>[dundi-e164-customers]<br><br>[dundi-e164-via-pstn]<br><br>[dundi-e164-local]<br>include => dundi-e164-canonical<br>include => dundi-e164-customers<br>include => dundi-e164-via-pstn<br><br>[dundi-e164-switch]<br>
switch => DUNDi/e164<br><br>[dundi-e164-lookup]<br>include => dundi-e164-local<br>include => dundi-e164-switch<br><br>[macro-dundi-e164]<br>exten => s,1,Goto(${ARG1},1)<br>include => dundi-e164-lookup<br><br>
[iaxtel700]<br>exten => _91700XXXXXXX,1,Dial(IAX2/${<a href="http://IAXINFO%7D@iaxtel.com/$%7BEXTEN:1%7D@iaxtel" target="_blank">IAXINFO}@iaxtel.com/${EXTEN:1}@iaxtel</a>)<br><br>[iaxprovider]<br><br>[trunkint]<br>exten => _9011.,1,Macro(dundi-e164,${EXTEN:4})<br>
exten => _9011.,n,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})<br><br>[trunkld]<br>exten => _91NXXNXXXXXX,1,Macro(dundi-e164,${EXTEN:1})<br>exten => _91NXXNXXXXXX,n,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})<br><br>[trunklocal]<br>
exten => _9NXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})<br><br>[trunktollfree]<br>exten => _91800NXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})<br>exten => _91888NXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})<br>
exten => _91877NXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})<br>
exten => _91866NXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})<br><br>[international]<br>ignorepat => 9<br>include => longdistance<br>include => trunkint<br><br>[longdistance]<br>ignorepat => 9<br>include => local<br>
include => trunkld<br><br>[local]<br>ignorepat => 9<br>include => default<br>include => parkedcalls<br>include => trunklocal<br>include => iaxtel700<br>include => trunktollfree<br>include => iaxprovider<br>
<br>[default]<br>include => pickup<br><br>[pickup]<br>exten => XXXXXXXXXX,1,Goto(office|s|1)<br>exten => s,1,Goto(office|s|1)<br><br>[office]<br>exten => s,1,Wait,1<br>exten => s,2,Answer<br>exten => s,3,Wait,1<br>
exten => s,4,Background(main-intro)<br>exten => s,5,Background(dialextension)<br>exten => s,6,Wait,1<br>exten => s,7,Background(forsales)<br>exten => s,8,Background(press1)<br>exten => s,9,Wait,1<br>exten => s,10,Background(fortechsupport)<br>
exten => s,11,Background(press2)<br>exten => s,12,Wait,1<br>exten => s,13,Background(forallotherinquiries)<br>exten => s,14,Background(press4)<br>exten => s,15,Wait,1<br>exten => s,16,Background(repeatoptions)<br>
exten => s,17,Background(pressstar)<br>exten => s,18,WaitExten(10)<br>exten => t,1,Hangup<br>exten => *,1,Goto(s|7)<br>exten => 102,1,Dial(SIP/femi,15)<br>exten => 102,2,Voicemail(u102@office)<br>exten => 102,3,Hangup<br>
exten => 1,1,Dial(SIP/femi&Gtalk/asterisk/<a href="mailto:ggggggggggg@gmail.com" target="_blank">ggggggggggg@gmail.com</a>,15)<br>exten => 1,2,Voicemail(u1@office)<br>exten => 1,3,Hangup<br>exten => 2,1,Dial(SIP/femi,15)<br>
exten => 2,2,Voicemail(u2@office)<br>exten => 2,3,Hangup<br>exten => 4,1,Dial(SIP/femi,15)<br>exten => 4,2,Voicemail(u4@office)<br>exten => 4,3,Hangup<br><br>exten => 8,1,JabberSend(asterisk,<a href="mailto:ggggggggggg@gmail.com" target="_blank">ggggggggggg@gmail.com</a>,Incoming call from ${CALLERID(all)})<br>
exten => 8,2,Dial(Gtalk/asterisk/<a href="mailto:ggggggggggg@gmail.com" target="_blank">ggggggggggg@gmail.com</a>,15)<br>exten => 8,3,Voicemail(u1@office)<br>exten => 8,4,Hangup<br>exten => 9,1,Dial(Gtalk/asterisk/<a href="mailto:hhhhhhh@gmail.com" target="_blank">hhhhhhh@gmail.com</a>,15)<br>
<br>[home-out]<br>exten => *69,1,Dial(SIP/*<a href="mailto:69@sip.broadvoice.com" target="_blank">69@sip.broadvoice.com</a>)<br>exten => _8XXXXXXXXXX,1,Dial(SIP/*<a href="mailto:65@sip.broadvoice.com" target="_blank">65@sip.broadvoice.com</a>,,D(wwww${EXTEN:1}))<br>
exten => _XXXXXXXXXX,1,Dial(SIP/${<a href="mailto:EXTEN%7D@sip.broadvoice.com" target="_blank">EXTEN}@sip.broadvoice.com</a>)<br>exten => _1XXXXXXXXXX,1,Dial(SIP/${<a href="mailto:EXTEN%7D@sip.broadvoice.com" target="_blank">EXTEN}@sip.broadvoice.com</a>)<br>
exten => _011XXXXXXXXXXXX,1,Dial(SIP/${<a href="mailto:EXTEN%7D@sip.broadvoice.com" target="_blank">EXTEN}@sip.broadvoice.com</a>)<br>exten => _011XXXXXXXXXXX,1,Dial(SIP/${<a href="mailto:EXTEN%7D@sip.broadvoice.com" target="_blank">EXTEN}@sip.broadvoice.com</a>)<br>
exten => 1,1,Voicemail(u1@office)<br>exten => 2,1,Voicemail(u2@office)<br>exten => 4,1,Voicemail(u4@office)<br>exten => 102,1,Voicemail(u102@office)<br>exten => 8,1,Dial(Gtalk/asterisk/<a href="mailto:ggggggggggg@gmail.com" target="_blank">ggggggggggg@gmail.com</a>,15)<br>
exten => 9,1,Dial(Gtalk/asterisk/<a href="mailto:hhhhhhh@gmail.com" target="_blank">hhhhhhh@gmail.com</a>,15)<br><br><br>-----------------<br>Dialog<br>-----------------<br>=============== Starting out<br><--- SIP read from <a href="http://192.168.2.11:5060/" target="_blank">192.168.2.11:5060</a> ---><br>
INVITE <a href="mailto:sip%3A1GGGGGGGGGG@192.168.2.1" target="_blank">sip:1GGGGGGGGGG@192.168.2.1</a> SIP/2.0<br>Via: SIP/2.0/UDP <a href="http://192.168.2.11/" target="_blank">192.168.2.11</a>;branch=z9hG4bKc0a8020b000001594834443400007cf00000015e;rport<br>
From: "unknown" <<a href="mailto:sip%3Afemi@192.168.2.1" target="_blank">sip:femi@192.168.2.1</a>>;tag=f4f45e2898<br>To: <<a href="mailto:sip%3A1GGGGGGGGGG@192.168.2.1" target="_blank">sip:1GGGGGGGGGG@192.168.2.1</a>><br>
Contact: <<a href="mailto:sip%3Afemi@192.168.2.11" target="_blank">sip:femi@192.168.2.11</a>><br>
Call-ID: 6D8716979A2542FBBF444A7740BE8F110xc0a8020b<br>CSeq: 1 INVITE<br>Max-Forwards: 70<br>User-Agent: SJphone/1.65.377a (SJ Labs)<br>Content-Length: 309<br>Content-Type: application/sdp<br>Supported: replaces,norefersub,timer<br>
<br>v=0<br>o=- 3420373684 3420373684 IN IP4 <a href="http://192.168.2.11/" target="_blank">192.168.2.11</a><br>s=SJphone<br>c=IN IP4 <a href="http://192.168.2.11/" target="_blank">192.168.2.11</a><br>t=0 0<br>m=audio 49182 RTP/AVP 3 97 98 8 0<br>
c=IN IP4 <a href="http://192.168.2.11/" target="_blank">192.168.2.11</a><br>
a=rtpmap:3 GSM/8000<br>a=rtpmap:97 iLBC/8000<br>a=rtpmap:98 iLBC/8000<br>a=fmtp:98 mode=20<br>a=rtpmap:8 PCMA/8000<br>a=rtpmap:0 PCMU/8000<br>a=setup:active<br>a=sendrecv<br><br>=============== Executing the Dial command from the dial plan<br>
<------------><br> -- Executing [1GGGGGGGGGG@home-out:1] Dial("SIP/femi-081fd850", "SIP/<a href="mailto:1GGGGGGGGGG@sip.broadvoice.com" target="_blank">1GGGGGGGGGG@sip.broadvoice.com</a>") in new stack<br>
Audio is at AAA.BBB.CCC.DDD port 14950<br>Adding codec 0x4 (ulaw) to SDP<br>Reliably Transmitting (NAT) to <a href="http://147.135.32.221:5060/" target="_blank">147.135.32.221:5060</a>:<br>INVITE <a href="mailto:sip%3A1GGGGGGGGGG@sip.broadvoice.com" target="_blank">sip:1GGGGGGGGGG@sip.broadvoice.com</a> SIP/2.0<br>
Via: SIP/2.0/UDP AAA.BBB.CCC.DDD:5060;branch=z9hG4bK32793aaa;rport<br>From: "unknown" <sip:femi@AAA.BBB.CCC.DDD>;tag=as19d4b188<br>To: <<a href="mailto:sip%3A1GGGGGGGGGG@sip.broadvoice.com" target="_blank">sip:1GGGGGGGGGG@sip.broadvoice.com</a>><br>
Contact: <sip:femi@AAA.BBB.CCC.DDD><br>Call-ID: 12d5044c5688a5854b46da0b6c6c7df8@AAA.BBB.CCC.DDD<br>CSeq: 102 INVITE<br>User-Agent: Asterisk PBX<br>Max-Forwards: 70<br>Date: Wed, 21 May 2008 15:48:02 GMT<br>Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY<br>
Supported: replaces<br>Content-Type: application/sdp<br>Content-Length: 190<br><br>v=0<br>o=root 18965 18965 IN IP4 AAA.BBB.CCC.DDD<br>s=session<br>c=IN IP4 AAA.BBB.CCC.DDD<br>t=0 0<br>m=audio 14950 RTP/AVP 0<br>a=rtpmap:0 PCMU/8000<br>
a=silenceSupp:off - - - -<br>a=ptime:20<br>a=sendrecv<br><br>---<br> -- Called <a href="mailto:1GGGGGGGGGG@sip.broadvoice.com" target="_blank">1GGGGGGGGGG@sip.broadvoice.com</a><br><br><--- SIP read from <a href="http://147.135.32.221:5060/" target="_blank">147.135.32.221:5060</a> ---><br>
SIP/2.0 100 Trying<br>Call-ID: 12d5044c5688a5854b46da0b6c6c7df8@AAA.BBB.CCC.DDD<br>CSeq: 102 INVITE<br>From: "unknown" <sip:femi@AAA.BBB.CCC.DDD>;tag=as19d4b188<br>To: <<a href="mailto:sip%3A1GGGGGGGGGG@sip.broadvoice.com" target="_blank">sip:1GGGGGGGGGG@sip.broadvoice.com</a>><br>
Via: SIP/2.0/UDP AAA.BBB.CCC.DDD:5060;branch=z9hG4bK32793aaa<br>Content-Length: 0<br><br><br><-------------><br>--- (7 headers 0 lines) ---<br><br><--- SIP read from <a href="http://147.135.32.221:5060/" target="_blank">147.135.32.221:5060</a> ---><br>
SIP/2.0 403 Forbidden<br>Call-ID: 12d5044c5688a5854b46da0b6c6c7df8@AAA.BBB.CCC.DDD<br>CSeq: 102 INVITE<br>From: "unknown" <sip:femi@AAA.BBB.CCC.DDD>;tag=as19d4b188<br>To: <<a href="mailto:sip%3A1GGGGGGGGGG@sip.broadvoice.com" target="_blank">sip:1GGGGGGGGGG@sip.broadvoice.com</a>>;tag=xz01<br>
Via: SIP/2.0/UDP AAA.BBB.CCC.DDD:5060;branch=z9hG4bK32793aaa<br>User-Agent: Asterisk PBX<br>Content-Length: 139<br>Content-Type: application/sdp<br><br>v=0<br>o=2546725875 18965 18965 IN IP4 AAA.BBB.CCC.DDD<br>s=-<br>c=IN IP4 AAA.BBB.CCC.DDD<br>
t=0 0<br>m=audio 14950 RTP/AVP 0<br>a=rtpmap:0 PCMU/8000<br><br><-------------><br>--- (9 headers 7 lines) ---<br>Transmitting (NAT) to <a href="http://147.135.32.221:5060/" target="_blank">147.135.32.221:5060</a>:<br>
ACK <a href="mailto:sip%3A1GGGGGGGGGG@sip.broadvoice.com" target="_blank">sip:1GGGGGGGGGG@sip.broadvoice.com</a> SIP/2.0<br>
Via: SIP/2.0/UDP AAA.BBB.CCC.DDD:5060;branch=z9hG4bK32793aaa;rport<br>From: "unknown" <sip:femi@AAA.BBB.CCC.DDD>;tag=as19d4b188<br>To: <<a href="mailto:sip%3A1GGGGGGGGGG@sip.broadvoice.com" target="_blank">sip:1GGGGGGGGGG@sip.broadvoice.com</a>>;tag=xz01<br>
Contact: <sip:femi@AAA.BBB.CCC.DDD><br>Call-ID: 12d5044c5688a5854b46da0b6c6c7df8@AAA.BBB.CCC.DDD<br>CSeq: 102 ACK<br>User-Agent: Asterisk PBX<br>Max-Forwards: 70<br>Content-Length: 0<br><br><br>---<br>[May
21 11:48:02] WARNING[18972]: chan_sip.c:12198 handle_response_invite:
Received response: "Forbidden" from '"unknown"
<sip:femi@AAA.BBB.CCC.DDD>;tag=as19d4b188'<br>
-- SIP/sip.broadvoice.com-08201e98 is circuit-busy<br> == Everyone is busy/congested at this time (1:0/1/0)<br>Really destroying SIP dialog '12d5044c5688a5854b46da0b6c6c7df8@AAA.BBB.CCC.DDD' Method: INVITE<br>
<br><--- SIP read from <a href="http://192.168.2.11:5060/" target="_blank">192.168.2.11:5060</a> ---><br>CANCEL <a href="mailto:sip%3A1GGGGGGGGGG@192.168.2.1" target="_blank">sip:1GGGGGGGGGG@192.168.2.1</a> SIP/2.0<br>
Via: SIP/2.0/UDP <a href="http://192.168.2.11/" target="_blank">192.168.2.11</a>;branch=z9hG4bKc0a8020b0000015a483444350000703c00000160;rport<br>
From: "unknown" <<a href="mailto:sip%3Afemi@192.168.2.1" target="_blank">sip:femi@192.168.2.1</a>>;tag=f4f45e2898<br>To: <<a href="mailto:sip%3A1GGGGGGGGGG@192.168.2.1" target="_blank">sip:1GGGGGGGGGG@192.168.2.1</a>><br>
Call-ID: 6D8716979A2542FBBF444A7740BE8F110xc0a8020b<br>
CSeq: 2 CANCEL<br>Max-Forwards: 70<br>User-Agent: SJphone/1.65.377a (SJ Labs)<br>Content-Length: 0<br><br><br><br><br><br><br>
</div><br>