Bandwidth.com trunks - random one way audio (They can hear us, we can't hear them)

I was running Asterisk 1.4.22 on FC9 at first and we constantly had dropped audio. I switched to FreePBX because of the trunk limiting feature, which seems to work, sort of. We have 2 trunks with Bandwidth.com and if both trunks are in use and someone makes a call out, it will deny them but also cut off the audio of the last person to receive a call. Is my configuration incorrect?

Trunk: SIP/bw_outbound

Max Channels: 2
Dial rules: 1NXXNXXXXXX
Prefix: +

Trunk name: bw_outbound
Outgoing settings:
host=216.82.224.202
port=5060
type=peer
disallow=all
allow=ulaw
dtmfmode=rfc2833
nat=no
canreinvite=no
fromuser=+18005551212

Incoming settings:
User context: from-trunk-sip-bw_outbound
User settings:
host=216.82.224.202
port=5060
type=peer
disallow=all
allow=ulaw
dtmfmode=rfc2833
reinvite=no
canreinvite=no
nat=no

That’s it. Anything that I didn’t include is blank. I’m at a complete loss and it seems I’m the only one with this issue as I can’t find a whole lot of relevant posts on this. We are behind a Sonicwall with SIP Translation enabled. Everything works fine until a 3rd person attempts to dial out.

have you engaged Bandwidth.com support. It sounds like you can easily reproduce the problem so you should be able to work with them to resolved it?

They offer no support on configuring Asterisk. They told me to contact the distributor, and since I’m building it from scratch, that’s me. Their support is utterly useless.

that’s surprising, I have worked with Bandwidth.com in conjunction with other customer situations when it appeared that there were issues with their service (which is what this sounds like) and did not get that response? Of course, you mentioned the Sonicwall + SIP translation which might be what the issue was? I am not familiar with Sonicwall’s “SIP Translation” but from my experience, most “SIP ALGs” that I have run into create more problems then they help, if that is what that is. (My normal response is to turn off the ALG and properly port forward the ports).

One suggestion having just re-read your issue though. The trunk limiting feature in FreePBX only counts outbound calls and not inbound calls. If you want to count inbound calls, you need to utilize a specially generated context that is associated with the given trunk. If you look at the tool tip associated with the Max Channels you can see what that context is.

If you have already created a custom context (to deal with the +'s) then have a look at the auto-generated context and import the extra code into yours.

I used that autogenerated context in the User Context. Is that where it goes or do I need to make a context= inside the User Settings box? I have a [from-pstn-custom]:

[from-pstn-custom]
exten = _+1.,1,Set(DID=${EXTEN:2})
exten = _+1.,2,Set(CALLERID(num)=${CALLERID(num):1})
exten = _+1.,3,Goto(from-trunk-sip-bw_outbound,${DID},1)

I think I’m doing it right. Thanks.

Just found out that if someone dials our SIP trunk directly (555-1234) and we answer and start talking, everything is fine. But if one of us tries to dial out (we have it set to use SIP first then failover to DAHDI), we get one-way audio (we cannot hear them). I made a ticket with Bandwidth.com and will post more when I get more information. This is quite odd that this would happen and Bandwidth.com wouldn’t hunt properly.

For clarification, here’s our phone number setup:

Verizon Analog -> Verizon Analog -> Bandwidth.com
-> SIP Trunk 1
-> SIP Trunk 2

One would think that if SIP Trunk 1 was busy, it would use SIP Trunk 2 to dial out of, but this appears not to be the case.

Edit: Just found out that this happens on ANY SIP trunk. Each trunk has it’s own number and if that one was dialed in, we get 1-way audio.