Having issue Trunking 3 *NOW servers together with IAX2

Hello All,

I have three *NOW server. Server A & B are FreePBX 2.5.1.5 and Server C is FreePBX 2.5.2.2.

Sever A and server B are fine. Calls to extensions between these servers have no problem via the IAX2 trunks.

Sever A and Server C has one issue. Server C can call extensions on Server A via an IAX2 trunk but when Server A calls an extension on server C I get all circuits are busy now.

Server B and C are not connected and don’t need to call each other.

Here is a copy of my iax_additional.conf on Server A

[BGBuser]
type=user
secret=secret
host=192.168.2.12
context=from-internal

[toServerC]
username=BV00user
type=peer
secret=secret
qualify=yes
host=192.168.2.8
context=from-internal

[BV01user]
type=user
secret=secret
host=192.168.2.8
context=from-internal

[toServerB]
username=freePBXuser
type=peer
secret=secret
qualify=yes
host=192.168.2.12
context=from-internal


Server C’s iax_additonal.conf

[toServerA]
username=BV01user
type=peer
secret=secret
qualify=yes
host=10.101.8.2
context=from-internal

[BV00user]
type=user
secret=secret
host=10.101.8.2
context=from-internal


I have Outbound routes set up on each server using the respective trunks.


Here is the CLI output of Server A’s ext 194 calling Server C’s ext 149.

-- Executing [149@from-internal:1] Macro("SIP/194-b6235e60", "user-callerid|SKIPTTL|") in new stack
-- Executing [s@macro-user-callerid:1] Set("SIP/194-b6235e60", "AMPUSER=194") in new stack
-- Executing [s@macro-user-callerid:2] GotoIf("SIP/194-b6235e60", "0?report") in new stack
-- Executing [s@macro-user-callerid:3] ExecIf("SIP/194-b6235e60", "1|Set|REALCALLERIDNUM=194") in new stack
-- Executing [s@macro-user-callerid:4] Set("SIP/194-b6235e60", "AMPUSER=194") in new stack
-- Executing [s@macro-user-callerid:5] Set("SIP/194-b6235e60", "AMPUSERCIDNAME=David Roth") in new stack
-- Executing [s@macro-user-callerid:6] GotoIf("SIP/194-b6235e60", "0?report") in new stack
-- Executing [s@macro-user-callerid:7] Set("SIP/194-b6235e60", "AMPUSERCID=194") in new stack
-- Executing [s@macro-user-callerid:8] Set("SIP/194-b6235e60", "CALLERID(all)="David Roth" <194>") in new stack
-- Executing [s@macro-user-callerid:9] Set("SIP/194-b6235e60", "REALCALLERIDNUM=194") in new stack
-- Executing [s@macro-user-callerid:10] ExecIf("SIP/194-b6235e60", "0|Set|CHANNEL(language)=") in new stack
-- Executing [s@macro-user-callerid:11] GotoIf("SIP/194-b6235e60", "1?continue") in new stack
-- Goto (macro-user-callerid,s,20)
-- Executing [s@macro-user-callerid:20] NoOp("SIP/194-b6235e60", "Using CallerID "David Roth" <194>") in new stack
-- Executing [149@from-internal:2] Set("SIP/194-b6235e60", "_NODEST=") in new stack
-- Executing [149@from-internal:3] Macro("SIP/194-b6235e60", "record-enable|194|OUT|") in new stack
-- Executing [s@macro-record-enable:1] GotoIf("SIP/194-b6235e60", "1?check") in new stack
-- Goto (macro-record-enable,s,4)
-- Executing [s@macro-record-enable:4] AGI("SIP/194-b6235e60", "recordingcheck|20100218-101032|1266516632.43246") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck

recordingcheck|20100218-101032|1266516632.43246: Outbound recording not enabled
– AGI Script recordingcheck completed, returning 0
– Executing [s@macro-record-enable:5] MacroExit(“SIP/194-b6235e60”, “”) in new stack
– Executing [149@from-internal:4] Macro(“SIP/194-b6235e60”, “dialout-trunk|7|149||”) in new stack
– Executing [s@macro-dialout-trunk:1] Set(“SIP/194-b6235e60”, “DIAL_TRUNK=7”) in new stack
– Executing [s@macro-dialout-trunk:2] GosubIf(“SIP/194-b6235e60”, “0?sub-pincheck|s|1”) in new stack
– Executing [s@macro-dialout-trunk:3] GotoIf(“SIP/194-b6235e60”, “0?disabletrunk|1”) in new stack
– Executing [s@macro-dialout-trunk:4] Set(“SIP/194-b6235e60”, “DIAL_NUMBER=149”) in new stack
– Executing [s@macro-dialout-trunk:5] Set(“SIP/194-b6235e60”, “DIAL_TRUNK_OPTIONS=tr”) in new stack
– Executing [s@macro-dialout-trunk:6] Set(“SIP/194-b6235e60”, “OUTBOUND_GROUP=OUT_7”) in new stack
– Executing [s@macro-dialout-trunk:7] GotoIf(“SIP/194-b6235e60”, “1?nomax”) in new stack
– Goto (macro-dialout-trunk,s,9)
– Executing [s@macro-dialout-trunk:9] GotoIf(“SIP/194-b6235e60”, “0?skipoutcid”) in new stack
– Executing [s@macro-dialout-trunk:10] Set(“SIP/194-b6235e60”, “DIAL_TRUNK_OPTIONS=”) in new stack
– Executing [s@macro-dialout-trunk:11] Macro(“SIP/194-b6235e60”, “outbound-callerid|7”) in new stack
– Executing [s@macro-outbound-callerid:1] ExecIf(“SIP/194-b6235e60”, “0|SetCallerPres|”) in new stack
– Executing [s@macro-outbound-callerid:2] ExecIf(“SIP/194-b6235e60”, “0|Set|REALCALLERIDNUM=194”) in new stack
– Executing [s@macro-outbound-callerid:3] GotoIf(“SIP/194-b6235e60”, “1?normcid”) in new stack
– Goto (macro-outbound-callerid,s,6)
– Executing [s@macro-outbound-callerid:6] Set(“SIP/194-b6235e60”, “USEROUTCID=6193902194”) in new stack
– Executing [s@macro-outbound-callerid:7] Set(“SIP/194-b6235e60”, “EMERGENCYCID=”) in new stack
– Executing [s@macro-outbound-callerid:8] Set(“SIP/194-b6235e60”, “TRUNKOUTCID=”) in new stack
– Executing [s@macro-outbound-callerid:9] GotoIf(“SIP/194-b6235e60”, “1?trunkcid”) in new stack
– Goto (macro-outbound-callerid,s,12)
– Executing [s@macro-outbound-callerid:12] ExecIf(“SIP/194-b6235e60”, “0|Set|CALLERID(all)=”) in new stack
– Executing [s@macro-outbound-callerid:13] ExecIf(“SIP/194-b6235e60”, “1|Set|CALLERID(all)=6193902194”) in new stack
– Executing [s@macro-outbound-callerid:14] ExecIf(“SIP/194-b6235e60”, “0|SetCallerPres|prohib_passed_screen”) in new stack
– Executing [s@macro-dialout-trunk:12] ExecIf(“SIP/194-b6235e60”, “1|AGI|fixlocalprefix”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/fixlocalprefix
– AGI Script fixlocalprefix completed, returning 0
– Executing [s@macro-dialout-trunk:13] Set(“SIP/194-b6235e60”, “OUTNUM=149”) in new stack
– Executing [s@macro-dialout-trunk:14] Set(“SIP/194-b6235e60”, “custom=IAX2/BV01”) in new stack
– Executing [s@macro-dialout-trunk:15] ExecIf(“SIP/194-b6235e60”, “0|Set|DIAL_TRUNK_OPTIONS=M(setmusic^)”) in new stack
– Executing [s@macro-dialout-trunk:16] Macro(“SIP/194-b6235e60”, “dialout-trunk-predial-hook|”) in new stack
– Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit(“SIP/194-b6235e60”, “”) in new stack
– Executing [s@macro-dialout-trunk:17] GotoIf(“SIP/194-b6235e60”, “0?bypass|1”) in new stack
– Executing [s@macro-dialout-trunk:18] GotoIf(“SIP/194-b6235e60”, “0?customtrunk”) in new stack
– Executing [s@macro-dialout-trunk:19] Dial(“SIP/194-b6235e60”, “IAX2/BV01/149|300|”) in new stack
– Called BV01/149
– Hungup ‘IAX2/BV01-14882’
== Everyone is busy/congested at this time (1:0/0/1)
– Executing [s@macro-dialout-trunk:20] Goto(“SIP/194-b6235e60”, “s-CHANUNAVAIL|1”) in new stack
– Goto (macro-dialout-trunk,s-CHANUNAVAIL,1)
– Executing [s-CHANUNAVAIL@macro-dialout-trunk:1] GotoIf(“SIP/194-b6235e60”, “1?noreport”) in new stack
– Goto (macro-dialout-trunk,s-CHANUNAVAIL,3)
– Executing [s-CHANUNAVAIL@macro-dialout-trunk:3] NoOp(“SIP/194-b6235e60”, “TRUNK Dial failed due to CHANUNAVAIL (hangupcause: 0) - failing through to other trunks”) in new stack
– Executing [149@from-internal:5] Macro(“SIP/194-b6235e60”, “outisbusy|”) in new stack
– Executing [s@macro-outisbusy:1] Playback(“SIP/194-b6235e60”, “all-circuits-busy-now|noanswer”) in new stack
– <SIP/194-b6235e60> Playing ‘all-circuits-busy-now’ (language ‘en’)
– Executing [s@macro-outisbusy:2] Playback(“SIP/194-b6235e60”, “pls-try-call-later|noanswer”) in new stack
– <SIP/194-b6235e60> Playing ‘pls-try-call-later’ (language ‘en’)
– Executing [s@macro-outisbusy:3] Macro(“SIP/194-b6235e60”, “hangupcall”) in new stack
– Executing [s@macro-hangupcall:1] ResetCDR(“SIP/194-b6235e60”, “vw”) in new stack
– Executing [s@macro-hangupcall:2] NoCDR(“SIP/194-b6235e60”, “”) in new stack
– Executing [s@macro-hangupcall:3] GotoIf(“SIP/194-b6235e60”, “1?skiprg”) in new stack
– Goto (macro-hangupcall,s,6)
– Executing [s@macro-hangupcall:6] GotoIf(“SIP/194-b6235e60”, “1?skipblkvm”) in new stack
– Goto (macro-hangupcall,s,9)
– Executing [s@macro-hangupcall:9] GotoIf(“SIP/194-b6235e60”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,11)
– Executing [s@macro-hangupcall:11] Hangup(“SIP/194-b6235e60”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 11) exited non-zero on ‘SIP/194-b6235e60’ in macro ‘hangupcall’
== Spawn extension (macro-outisbusy, s, 3) exited non-zero on ‘SIP/194-b6235e60’ in macro ‘outisbusy’
== Spawn extension (from-internal, 149, 5) exited non-zero on ‘SIP/194-b6235e60’
– Executing [h@from-internal:1] Macro(“SIP/194-b6235e60”, “hangupcall”) in new stack
– Executing [s@macro-hangupcall:1] ResetCDR(“SIP/194-b6235e60”, “vw”) in new stack
– Executing [s@macro-hangupcall:2] NoCDR(“SIP/194-b6235e60”, “”) in new stack
– Executing [s@macro-hangupcall:3] GotoIf(“SIP/194-b6235e60”, “1?skiprg”) in new stack
– Goto (macro-hangupcall,s,6)
– Executing [s@macro-hangupcall:6] GotoIf(“SIP/194-b6235e60”, “1?skipblkvm”) in new stack
– Goto (macro-hangupcall,s,9)
– Executing [s@macro-hangupcall:9] GotoIf(“SIP/194-b6235e60”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,11)
– Executing [s@macro-hangupcall:11] Hangup(“SIP/194-b6235e60”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 11) exited non-zero on ‘SIP/194-b6235e60’ in macro ‘hangupcall’
== Spawn extension (from-internal, h, 1) exited non-zero on ‘SIP/194-b6235e60’

Any additional help would be great.

Thanks in advance and it was fun talking to the FreePBX dudes at the last Astricon in Phoenix

The user accounts “type=user” are created to provide a user to authenticate to that is coming in from the IAX trunk. So the context should be from-trunk