Bandwidth.com and freepbx 2.4

I cannot make outgoing calls with them using freepbx 2.4. On my other server (in my SAME network), which uses freepbx 2.3, outgoing calls are successful. bandwidth.com does not provide sip registration- they verify via IP adress. This may be the issue. This is part of what the CLI says:

-- Executing [[email protected]:20] Dial("SIP/216-09873f00", "SIP/Bandwi         dth2/+1213xxxxxxx|300|") in new stack
-- Couldn't call Bandwidth2/+1213xxxxxxx

== Everyone is busy/congested at this time (0:0/0/0)
– Executing [[email protected]:21] Goto(“SIP/216-09873f00”, “s-CHANUNAV AIL|1”) in new stack

Please advise
Thanks

heres trunk setup
(Outbound dial prefix: +)

allow=ulaw
canreinvite=no
disallow=all
dtmfmode=rfc2833
host=216.82.225.202
nat=yes
port=5060
type=peer

never mind
looks like it’s just on this particular system
anyone know whats wrong?

Looks like Codec to me …
If you do a sip debug on the call you will probably see it …
if your config above is verbatim …

allow=ulaw #allow ulaw
canreinvite=no
disallow=all #disallow all codecs even the one I just allowed
dtmfmode=rfc2833
host=216.82.225.202
nat=yes
port=5060
type=peer

no more codecs allowed … swap them around and see if that fixes it … if not do a sip debug and check the logs …

This is actually a freePBX issue, not a trixbox issue. This worked with the same settings on a different box. I took that box- backed up FreePBX and restored it on the other server. SAME results. here’s the CLI with asterisk 1.4.17

Verbosity is at least 3
– Executing [[email protected]:1] Macro(“SIP/215-0834b2d8”, “user-callerid|SKIPTTL|”) in new stack
– Executing [[email protected]:1] NoOp(“SIP/215-0834b2d8”, “user-callerid: device 215”) in new stack
– Executing [[email protected]:2] Set(“SIP/215-0834b2d8”, “AMPUSER=215”) in new stack
– Executing [[email protected]:3] GotoIf(“SIP/215-0834b2d8”, “0?report”) in new stack
– Executing [[email protected]:4] ExecIf(“SIP/215-0834b2d8”, “1|Set|REALCALLERIDNUM=215”) in new stack
– Executing [[email protected]:5] NoOp(“SIP/215-0834b2d8”, “REALCALLERIDNUM is 215”) in new stack
– Executing [[email protected]:6] Set(“SIP/215-0834b2d8”, “AMPUSER=”) in new stack
– Executing [[email protected]:7] Set(“SIP/215-0834b2d8”, “AMPUSERCIDNAME=”) in new stack
– Executing [[email protected]:8] GotoIf(“SIP/215-0834b2d8”, “1?report”) in new stack
– Goto (macro-user-callerid,s,13)
– Executing [[email protected]:13] NoOp(“SIP/215-0834b2d8”, “TTL: ARG1: SKIPTTL”) in new stack
– Executing [[email protected]:14] GotoIf(“SIP/215-0834b2d8”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,23)
– Executing [[email protected]:23] NoOp(“SIP/215-0834b2d8”, “Using CallerID “device” <215>”) in new stack
– Executing [[email protected]:2] Set(“SIP/215-0834b2d8”, “_NODEST=”) in new stack
– Executing [[email protected]:3] Macro(“SIP/215-0834b2d8”, “record-enable||OUT|”) in new stack
– Executing [[email protected]:1] GotoIf(“SIP/215-0834b2d8”, “0?2:4”) in new stack
– Goto (macro-record-enable,s,4)
– Executing [[email protected]:4] DeadAGI(“SIP/215-0834b2d8”, “recordingcheck|20080131-215042|1201834242.4”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck
recordingcheck|20080131-215042|1201834242.4: No AMPUSER db entry for . Not recording
– AGI Script recordingcheck completed, returning 0
– Executing [[email protected]:5] NoOp(“SIP/215-0834b2d8”, “No recording needed”) in new stack
– Executing [[email protected]:4] Macro(“SIP/215-0834b2d8”, “dialout-trunk|9|17186371062||”) in new stack
– Executing [[email protected]:1] Set(“SIP/215-0834b2d8”, “DIAL_TRUNK=9”) in new stack
– Executing [[email protected]:2] ExecIf(“SIP/215-0834b2d8”, “0|Authenticate|”) in new stack
– Executing [[email protected]:3] GotoIf(“SIP/215-0834b2d8”, “0?disabletrunk|1”) in new stack
– Executing [[email protected]:4] Set(“SIP/215-0834b2d8”, “DIAL_NUMBER=17186371062”) in new stack
– Executing [[email protected]:5] Set(“SIP/215-0834b2d8”, “DIAL_TRUNK_OPTIONS=tr”) in new stack
– Executing [[email protected]:6] Set(“SIP/215-0834b2d8”, “GROUP()=OUT_9”) in new stack
– Executing [[email protected]:7] GotoIf(“SIP/215-0834b2d8”, “0?nomax”) in new stack
– Executing [[email protected]:8] GotoIf(“SIP/215-0834b2d8”, “0?chanfull”) in new stack
– Executing [[email protected]:9] GotoIf(“SIP/215-0834b2d8”, “0?skipoutcid”) in new stack
– Executing [[email protected]:10] Set(“SIP/215-0834b2d8”, “DIAL_TRUNK_OPTIONS=”) in new stack
– Executing [[email protected]:11] Macro(“SIP/215-0834b2d8”, “outbound-callerid|9”) in new stack
– Executing [[email protected]:1] GotoIf(“SIP/215-0834b2d8”, “1?start”) in new stack
– Goto (macro-outbound-callerid,s,3)
– Executing [[email protected]:3] NoOp(“SIP/215-0834b2d8”, “REALCALLERIDNUM is 215”) in new stack
– Executing [[email protected]:4] GotoIf(“SIP/215-0834b2d8”, “1?normcid”) in new stack
– Goto (macro-outbound-callerid,s,9)
– Executing [[email protected]:9] Set(“SIP/215-0834b2d8”, “USEROUTCID=”) in new stack
– Executing [[email protected]:10] Set(“SIP/215-0834b2d8”, “EMERGENCYCID=”) in new stack
– Executing [[email protected]:11] Set(“SIP/215-0834b2d8”, “TRUNKOUTCID=17183031060”) in new stack
– Executing [[email protected]:12] GotoIf(“SIP/215-0834b2d8”, “1?trunkcid”) in new stack
– Goto (macro-outbound-callerid,s,16)
– Executing [[email protected]:16] GotoIf(“SIP/215-0834b2d8”, “0?usercid”) in new stack
– Executing [[email protected]:17] Set(“SIP/215-0834b2d8”, “CALLERID(all)=17183031060”) in new stack
– Executing [[email protected]:18] GotoIf(“SIP/215-0834b2d8”, “1?report”) in new stack
– Goto (macro-outbound-callerid,s,22)
– Executing [[email protected]:22] NoOp(“SIP/215-0834b2d8”, “CallerID set to “” <17183031060>”) in new stack
– Executing [[email protected]:12] AGI(“SIP/215-0834b2d8”, “fixlocalprefix”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/fixlocalprefix
– AGI Script fixlocalprefix completed, returning 0
– Executing [[email protected]:13] Set(“SIP/215-0834b2d8”, “OUTNUM=+17186371062”) in new stack
– Executing [[email protected]:14] Set(“SIP/215-0834b2d8”, “custom=SIP/Bandwidth2”) in new stack
– Executing [[email protected]:15] GotoIf(“SIP/215-0834b2d8”, “1?gocall”) in new stack
– Goto (macro-dialout-trunk,s,17)
– Executing [[email protected]:17] Macro(“SIP/215-0834b2d8”, “dialout-trunk-predial-hook|”) in new stack
– Executing [[email protected]:18] GotoIf(“SIP/215-0834b2d8”, “0?bypass|1”) in new stack
– Executing [[email protected]:19] GotoIf(“SIP/215-0834b2d8”, “0?customtrunk”) in new stack
– Executing [[email protected]:20] Dial(“SIP/215-0834b2d8”, “SIP/Bandwidth2/+17186371062|300|”) in new stack
– Couldn’t call Bandwidth2/+17186371062
== Everyone is busy/congested at this time (0:0/0/0)
– Executing [[email protected]:21] Goto(“SIP/215-0834b2d8”, “s-CHANUNAVAIL|1”) in new stack
– Goto (macro-dialout-trunk,s-CHANUNAVAIL,1)
– Executing [[email protected]:1] GotoIf(“SIP/215-0834b2d8”, “1?noreport”) in new stack
– Goto (macro-dialout-trunk,s-CHANUNAVAIL,3)
– Executing [[email protected]:3] NoOp(“SIP/215-0834b2d8”, “TRUNK Dial failed due to CHANUNAVAIL - failing through to other trunks”) in new stack
– Executing [[email protected]:5] Macro(“SIP/215-0834b2d8”, “dialout-trunk|8|17186371062||”) in new stack
– Executing [[email protected]:1] Set(“SIP/215-0834b2d8”, “DIAL_TRUNK=8”) in new stack
– Executing [[email protected]:2] ExecIf(“SIP/215-0834b2d8”, “0|Authenticate|”) in new stack
– Executing [[email protected]:3] GotoIf(“SIP/215-0834b2d8”, “0?disabletrunk|1”) in new stack
– Executing [[email protected]:4] Set(“SIP/215-0834b2d8”, “DIAL_NUMBER=17186371062”) in new stack
– Executing [[email protected]:5] Set(“SIP/215-0834b2d8”, “DIAL_TRUNK_OPTIONS=tr”) in new stack
– Executing [[email protected]:6] Set(“SIP/215-0834b2d8”, “GROUP()=OUT_8”) in new stack
– Executing [[email protected]:7] GotoIf(“SIP/215-0834b2d8”, “1?nomax”) in new stack
– Goto (macro-dialout-trunk,s,9)
– Executing [[email protected]:9] GotoIf(“SIP/215-0834b2d8”, “0?skipoutcid”) in new stack
– Executing [[email protected]:10] Set(“SIP/215-0834b2d8”, “DIAL_TRUNK_OPTIONS=”) in new stack
– Executing [[email protected]:11] Macro(“SIP/215-0834b2d8”, “outbound-callerid|8”) in new stack
– Executing [[email protected]:1] GotoIf(“SIP/215-0834b2d8”, “1?start”) in new stack
– Goto (macro-outbound-callerid,s,3)
– Executing [[email protected]:3] NoOp(“SIP/215-0834b2d8”, “REALCALLERIDNUM is 215”) in new stack
– Executing [[email protected]:4] GotoIf(“SIP/215-0834b2d8”, “1?normcid”) in new stack
– Goto (macro-outbound-callerid,s,9)
– Executing [[email protected]:9] Set(“SIP/215-0834b2d8”, “USEROUTCID=”) in new stack
– Executing [[email protected]:10] Set(“SIP/215-0834b2d8”, “EMERGENCYCID=”) in new stack
– Executing [[email protected]:11] Set(“SIP/215-0834b2d8”, “TRUNKOUTCID=17183031060”) in new stack
– Executing [[email protected]:12] GotoIf(“SIP/215-0834b2d8”, “1?trunkcid”) in new stack
– Goto (macro-outbound-callerid,s,16)
– Executing [[email protected]:16] GotoIf(“SIP/215-0834b2d8”, “0?usercid”) in new stack
– Executing [[email protected]:17] Set(“SIP/215-0834b2d8”, “CALLERID(all)=17183031060”) in new stack
– Executing [[email protected]:18] GotoIf(“SIP/215-0834b2d8”, “1?report”) in new stack
– Goto (macro-outbound-callerid,s,22)
– Executing [[email protected]:22] NoOp(“SIP/215-0834b2d8”, “CallerID set to “” <17183031060>”) in new stack
– Executing [[email protected]:12] AGI(“SIP/215-0834b2d8”, “fixlocalprefix”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/fixlocalprefix
– AGI Script fixlocalprefix completed, returning 0
– Executing [[email protected]:13] Set(“SIP/215-0834b2d8”, “OUTNUM=+17186371062”) in new stack
– Executing [[email protected]:14] Set(“SIP/215-0834b2d8”, “custom=SIP/Bandwidth”) in new stack
– Executing [[email protected]:15] GotoIf(“SIP/215-0834b2d8”, “1?gocall”) in new stack
– Goto (macro-dialout-trunk,s,17)
– Executing [[email protected]:17] Macro(“SIP/215-0834b2d8”, “dialout-trunk-predial-hook|”) in new stack
– Executing [[email protected]:18] GotoIf(“SIP/215-0834b2d8”, “0?bypass|1”) in new stack
– Executing [[email protected]:19] GotoIf(“SIP/215-0834b2d8”, “0?customtrunk”) in new stack
– Executing [[email protected]:20] Dial(“SIP/215-0834b2d8”, “SIP/Bandwidth/+17186371062|300|”) in new stack
– Couldn’t call Bandwidth/+17186371062
== Everyone is busy/congested at this time (0:0/0/0)
– Executing [[email protected]:21] Goto(“SIP/215-0834b2d8”, “s-CHANUNAVAIL|1”) in new stack
– Goto (macro-dialout-trunk,s-CHANUNAVAIL,1)
– Executing [[email protected]:1] GotoIf(“SIP/215-0834b2d8”, “1?noreport”) in new stack
– Goto (macro-dialout-trunk,s-CHANUNAVAIL,3)
– Executing [[email protected]:3] NoOp(“SIP/215-0834b2d8”, “TRUNK Dial failed due to CHANUNAVAIL - failing through to other trunks”) in new stack
– Executing [[email protected]:6] Macro(“SIP/215-0834b2d8”, “outisbusy|”) in new stack
– Executing [[email protected]:1] Playback(“SIP/215-0834b2d8”, “all-circuits-busy-now|noanswer”) in new stack
– <SIP/215-0834b2d8> Playing ‘all-circuits-busy-now’ (language ‘en’)
== Spawn extension (macro-outisbusy, s, 1) exited non-zero on ‘SIP/215-0834b2d8’ in macro ‘outisbusy’
== Spawn extension (macro-outisbusy, s, 1) exi

I was wondering if anyone has been able to get Bandwidth.com service to work on FreePBX 2.4 or later? I’m using 2.5 and I’m having the same problem.

I’m using the exact same Peer line:
allow=ulaw
canreinvite=no
disallow=all
dtmfmode=rfc2833
host=216.82.225.202
nat=yes
port=5060
type=peer

and I get the same “busy/congested” error.

– Executing [[email protected]:20] Dial(“SIP/7906-09873f00”, “SIP/Bandwi dth2/+1713xxxxxxx|300|”) in new stack
– Couldn’t call Bandwidth2/+1713xxxxxxx
== Everyone is busy/congested at this time (0:0/0/0)
– Executing [[email protected]:21] Goto(“SIP/7906-09873f00”, “s-CHANUNAV AIL|1”) in new stack

Bandwidth.com says they don’t offer support for this but it seems to me like they don’t offer compatibility. Has anyone been able to get bandwidth.com working with FreePBX 2.5?

Thanks,
Kenn

Try this:

disallow=all
type=peer
port=5060
nat=yes
insecure=very
host=ip_address_provided_by_bandwidth
dtmfmode=auto
context=from-pstn
allow=ulaw
qualify=yes

Kenn,

I use bandwidth.com and FreePBX 2.5 without problems. My outbound trunk looks like:

type=peer
host=216.82.224.202
dtmfmode=rfc2833
disallow=all
allow=ulaw&alaw

But I’m going to go out on a limb and say I don’t think that is where your problem is. My guess is that you have more than one external IP and your default outbound IP is being used instead of the one you registered with bandwidth.

What you can do to test this is from your FreePBX box type:

wget http://www.exceptionalit.com/externalip.php

and then look at the file that gets returned to determine if you are appearing to bandwidth as the IP you registered with them.

Thanks for the help but it’s still not working. I only have 1 public IP address and the externalip.php does display that IP when I run it.

What is scary is that Bandwidth.com is using SIP provisioning and as soon as I gave them my public IP address I had instant incoming calls available. The DID’s ring my PBX and I never even did the Inbound setup. That makes me a little nervous about the security though. Plausibly anyone could get your public IP and provision your system. I know that would most likely never happen but still. Security hole or Feature? LOL!

Anyway, I’ve tried both setting for the Outbound Trunk but the results are the same. This is so frustrating!

Can you tell anything from the output?

Executing [[email protected]:2] ResetCDR(“SIP/7901-b7806708”, “”) in new stack
Executed application: ResetCDR
Executing [[email protected]:3] Return(“SIP/7901-b7806708”, “”) in new stack
Executed application: Return
Decrementing gosub_level
Executing [[email protected]:3] GotoIf(“SIP/7901-b7806708”, “0?disabletrunk|1”) in new stack
Executed application: GotoIf
Executing [[email protected]:4] Set(“SIP/7901-b7806708”, “DIAL_NUMBER=7132271010”) in new stack
Executed application: Set
Executing [[email protected]:5] Set(“SIP/7901-b7806708”, “DIAL_TRUNK_OPTIONS=tr”) in new stack
Executed application: Set
Executing [[email protected]:6] Set(“SIP/7901-b7806708”, “OUTBOUND_GROUP=OUT_2”) in new stack
Executed application: Set
Executing [[email protected]:7] GotoIf(“SIP/7901-b7806708”, “1?nomax”) in new stack
Goto (macro-dialout-trunk,s,9)
Executed application: GotoIf
Executing [[email protected]:9] GotoIf(“SIP/7901-b7806708”, “0?skipoutcid”) in new stack
Executed application: GotoIf
Executing [[email protected]:10] Set(“SIP/7901-b7806708”, “DIAL_TRUNK_OPTIONS=”) in new stack
Executed application: Set
Executing [[email protected]:11] Macro(“SIP/7901-b7806708”, “outbound-callerid|2”) in new stack
Executing [[email protected]:1] ExecIf(“SIP/7901-b7806708”, “0|SetCallerPres|”) in new stack
Executed application: ExecIf
Executing [[email protected]:2] ExecIf(“SIP/7901-b7806708”, “0|Set|REALCALLERIDNUM=7901”) in new stack
Executed application: ExecIf
Executing [[email protected]:3] GotoIf(“SIP/7901-b7806708”, “1?normcid”) in new stack
Goto (macro-outbound-callerid,s,6)
Executed application: GotoIf
Executing [[email protected]:6] Set(“SIP/7901-b7806708”, “USEROUTCID=”) in new stack
Executed application: Set
DEVICE/7901/emergency_cid not found in database.
Executing [[email protected]:7] Set(“SIP/7901-b7806708”, “EMERGENCYCID=”) in new stack
Executed application: Set
Executing [[email protected]:8] Set(“SIP/7901-b7806708”, “TRUNKOUTCID=”) in new stack
Executed application: Set
Executing [[email protected]:9] GotoIf(“SIP/7901-b7806708”, “1?trunkcid”) in new stack
Goto (macro-outbound-callerid,s,12)
Executed application: GotoIf
Executing [[email protected]:12] ExecIf(“SIP/7901-b7806708”, “0|Set|CALLERID(all)=”) in new stack
Executed application: ExecIf
Executing [[email protected]:13] ExecIf(“SIP/7901-b7806708”, “0|Set|CALLERID(all)=”) in new stack
Executed application: ExecIf
Executing [[email protected]:14] ExecIf(“SIP/7901-b7806708”, “0|SetCallerPres|prohib_passed_screen”) in new stack
Executed application: ExecIf
Executed application: Macro
Executing [[email protected]:12] ExecIf(“SIP/7901-b7806708”, “0|AGI|fixlocalprefix”) in new stack
Executed application: ExecIf
Executing [[email protected]:13] Set(“SIP/7901-b7806708”, “OUTNUM=7132271010”) in new stack
Executed application: Set
Executing [[email protected]:14] Set(“SIP/7901-b7806708”, “custom=SIP/Bandwidth”) in new stack
Executed application: Set
Executing [[email protected]:15] ExecIf(“SIP/7901-b7806708”, “0|Set|DIAL_TRUNK_OPTIONS=M(setmusic^)”) in new stack
Executed application: ExecIf
Executing [[email protected]:16] Macro(“SIP/7901-b7806708”, “dialout-trunk-predial-hook|”) in new stack
Executing [[email protected]:1] MacroExit(“SIP/7901-b7806708”, “”) in new stack
Executed application: Macro
Executing [[email protected]:17] GotoIf(“SIP/7901-b7806708”, “0?bypass|1”) in new stack
Executed application: GotoIf
Executing [[email protected]:18] GotoIf(“SIP/7901-b7806708”, “0?customtrunk”) in new stack
Executed application: GotoIf
Executing [[email protected]:19] Dial(“SIP/7901-b7806708”, “SIP/Bandwidth/7132271010|300|”) in new stack
Unable to set TOS to 184
Called Bandwidth/7132271010
SIP/Bandwidth-0945a770 is circuit-busy
Everyone is busy/congested at this time (1:0/1/0)
Executed application: Dial
Executing [[email protected]:20] Goto(“SIP/7901-b7806708”, “s-CONGESTION|1”) in new stack
Goto (macro-dialout-trunk,s-CONGESTION,1)
Executed application: Goto
Executing [[email protected]:1] GotoIf(“SIP/7901-b7806708”, “1?noreport”) in new stack
Goto (macro-dialout-trunk,s-CONGESTION,3)
Executed application: GotoIf
Executing [[email protected]:3] NoOp(“SIP/7901-b7806708”, “TRUNK Dial failed due to CONGESTION - failing through to other trunks”) in new stack
Executed application: Noop
Executing [[email protected]:5] Macro(“SIP/7901-b7806708”, “outisbusy|”) in new stack
Executing [[email protected]:1] Playback(“SIP/7901-b7806708”, “all-circuits-busy-now|noanswer”) in new stack
<SIP/7901-b7806708> Playing ‘all-circuits-busy-now’ (language ‘en’)
Executed application: Playback
Executing [[email protected]:2] Playback(“SIP/7901-b7806708”, “pls-try-call-later|noanswer”) in new stack
<SIP/7901-b7806708> Playing ‘pls-try-call-later’ (language ‘en’)
Spawn extension (macro-outisbusy, s, 2) exited non-zero on ‘SIP/7901-b7806708’ in macro 'outisbusy’
Spawn extension (macro-outisbusy, s, 2) exited non-zero on ‘SIP/7901-b7806708’

Any help would be appreciated.

Thanks,
Kenn

Aha! I think I see your problem. Bandwidth wants numbers to be prefixed with a +.

So in your trunk settings set the outbound dial prefix to: +

OMG you are so great! Thank you, that worked perfectly…
I can’t believe I had all this frustration because of a plus sign.

It’s running sweet now! :slight_smile: