[asterisk-users] Configuring Bandwidth.com SIP trunks to prevent one-way audio

Kurt Knudsen kurt.knudsen at gmail.com
Fri Oct 10 16:17:46 CDT 2008


Hello,



We have 2 SIP trunks from Bandwidth.com and if both are in use and someone
tries to dial out, they cause another call to get one-way audio (the caller
hears us, we cannot hear them). This happens 100% of the time and
Bandwidth.com doesn't offer any support. I don't see any setting that tells
Asterisk that there are 2 channels available from Bandwidth.com's IP. I'm
currently using, or attempting to use, groups to solve this problem, but
sometimes it works, sometimes it doesn't. It breaks when a call goes out on
a Queue, because it seems to add each phone to the group, which breaks my
GotoIf() statement. Here's some relevant information:



Users.conf (added by Asterisk-GUI)

[trunk_2]

provider = Bandwidth (SIP)  ; GUI metadata

context = DID_trunk_2

hasexten = no

hasiax = no

hassip = yes

host = 216.82.224.202

registeriax = no

registersip = no

usecallerid = yes

nat = no ;Testing

trunkname = Bandwidth.com (Sip)  ; GUI metadata

username =

secret =

disallow = all

allow = ulaw,alaw,g726



sip.conf

[general]

context = frombandwidth

;other variables, etc.



;Added according to Bandwidth.com's wiki entry. Changed to inband because we
were having DTMF issues.

[bandwidth.com_inbound]

host=216.82.224.202

port=5060

type=peer

disallow=all

allow=ulaw

dtmfmode=inband

canreinvite=no

reinvite=no

context=frombandwidth

nat=no



[bandwidth.com_outbound]

host=216.82.224.202

port=5060

type=peer

disallow=all

allow=ulaw

dtmfmode=rfc2833

nat=no

fromuser=11234567890



extensions.conf

[globals]

;…irrelevant stuff

trunk_1 = Dahdi/g1

trunk_2 = SIP/trunk_2

OUT_2 = SIP/bandwidth.com_outbound



;Took out the Set(GROUP()) because I moved it elsewhere to try and fix it
added all the phones when Asterisk calls agents on a Queue.

[frombandwidth]

;exten = _+1.,1,Set(GROUP()=SIPGROUP)

exten = _+1.,1,NoOp(FromCount=${GROUP_COUNT(SIPGROUP)})

exten = _+1.,n,Set(DID=${EXTEN:2})

exten = _+1.,n,Set(CALLERID(num)=${CALLERID(num):2})

exten = _+1.,n,Goto(DID_trunk_2,${DID},1)



;What we use to dialout. Try SIP trunks first, then Dahdi trunk as backup.

;This is where it breaks. I tried to make it so there can't be more than 2
calls on SIP channels at once.

;Since it counts the phone as a channel, and adds it to the group, I had to
use 4.

[internalphones]

exten = _1NXXNXXXXXX,1,Set(GROUP()=SIPGROUP)

exten = _1NXXNXXXXXX,n,GotoIf($[${GROUP_COUNT(SIPGROUP)} >= 4]?100)  ;If the
group has 2 or more calls, do not dial.

exten = _1NXXNXXXXXX,n,NoOp(1NCount = ${GROUP_COUNT(SIPGROUP)})

exten =
_1NXXNXXXXXX,n,Macro(trunkdial-failover-0.3,${trunk_2}/+${EXTEN:0},${trunk_1}/${EXTEN:0},trunk_1,trunk_2)

exten = _1NXXNXXXXXX,100,Playback(all-circuits-busy-now)

exten = _1NXXNXXXXXX,101,congestion()

exten = _1NXXNXXXXXX,102,busy()



;This is where incoming calls go to if I'm awake.

[DID_trunk_2_timeinterval_Awake]

exten = _NXXNXXXXXX,1,Set(GROUP()=SIPGROUP)

exten = _NXXNXXXXXX,n,NoOp(Open Count=${GROUP_COUNT(SIPGROUP)})

exten = _NXXNXXXXXX,n,Set(CALLERID(num)=1${CALLERID(num)})

exten = _NXXNXXXXXX,n,Goto(voicemenu-custom-1|s|1)



Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20081010/467c3002/attachment.htm 


More information about the asterisk-users mailing list