Route DID on one PBX to extension on 2nd PBX

I am trying to get inbound call form a DID on my PRI on my old PBX to be routed to an extension on a new PBX. I also want the

Old PBX
FreePBX 2.9, Asterisk 1.4, hand built

New PBX
FreePBX Distro 5.211

I have an IAX2 trunk setup between the 2 PBX boxes. I have an inbound route for one of my DIDs on the old PBX xxxxxx4331 pointing to the IAX trunk.

I am not quite understanding what the following lob from the old PBX is indicating as to why the circuit is busy.

    -- Accepting call from 'xxxxxx6063' to 'xxxxxx4331' on channel 0/1, span 1     -- Executing [[email protected]:1] Set("Zap/1-1", "__FROM_DID=xxxxxx4331") in new stack     -- Executing [[email protected]:2] Gosub("Zap/1-1", "app-blacklist-check|s|1") in new stack     -- Executing [[email protected]:1] LookupBlacklist("Zap/1-1", "") in new stack     -- Executing [[email protected]:2] GotoIf("Zap/1-1", "0?blacklisted") in new stack     -- Executing [[email protected]:3] Set("Zap/1-1", "CALLED_BLACKLIST=1") in new stack     -- Executing [[email protected]:4] Return("Zap/1-1", "") in new stack     -- Executing [[email protected]:3] ExecIf("Zap/1-1", "1 |Set|CALLERID(name)=xxxxxx6063") in new stack     -- Executing [[email protected]:4] Set("Zap/1-1", "__CALLINGPRES_SV=allowed") in new stack     -- Executing [[email protected]:5] SetCallerPres("Zap/1-1", "allowed_not_screened") in new stack     -- Executing [[email protected]:6] Goto("Zap/1-1", "ext-trunk|2|1") in new stack     -- Goto (ext-trunk,2,1)     -- Executing [[email protected]:1] Set("Zap/1-1", "TDIAL_STRING=IAX2/NewPBX") in new stack     -- Executing [[email protected]:2] Set("Zap/1-1", "DIAL_TRUNK=2") in new stack     -- Executing [[email protected]:3] Goto("Zap/1-1", "ext-trunk|tdial|1") in new stack     -- Goto (ext-trunk,tdial,1)     -- Executing [[email protected]:1] Set("Zap/1-1", "OUTBOUND_GROUP=OUT_2") in new stack     -- Executing [[email protected]:2] GotoIf("Zap/1-1", "1?nomax") in new stack     -- Goto (ext-trunk,tdial,4)     -- Executing [[email protected]:4] ExecIf("Zap/1-1", "1|SetCallerPres|allowed") in new stack     -- Executing [[email protected]:5] Set("Zap/1-1", "DIAL_NUMBER=xxxxxx4331") in new stack     -- Executing [[email protected]:6] GosubIf("Zap/1-1", "1?sub-flp-2|s|1") in new stack     -- Executing [[email protected]:1] ExecIf("Zap/1-1", "0|Set|TARGET_FLP_2=3099294331294331") in new stack     -- Executing [[email protected]:2] GotoIf("Zap/1-1", "0?match") in new stack     -- Executing [[email protected]:3] Return("Zap/1-1", "") in new stack     -- Executing [[email protected]:7] Set("Zap/1-1", "OUTNUM=xxxxxx4331") in new stack     -- Executing [[email protected]:8] Dial("Zap/1-1", "IAX2/NewPBX/xxxxxx4331|300|") in new stack     -- Called NewPBX/xxxxxx4331     -- Call accepted by 10.20.24.2 (format ulaw)     -- Format for call is ulaw     -- IAX2/NewPBX-16384 is making progress passing it to Zap/1-1     -- IAX2/NewPBX-16384 is circuit-busy     -- Hungup 'IAX2/NewPBX-16384'   == Everyone is busy/congested at this time (1:0/1/0)     -- Executing [[email protected]:9] Set("Zap/1-1", "CALLERID(number)=xxxxxx6063") in new stack     -- Executing [[email protected]:10] Set("Zap/1-1", "CALLERID(name)=xxxxxx6063") in new stack     -- Executing [[email protected]:11] Hangup("Zap/1-1", "") in new stack   == Spawn extension (ext-trunk, tdial, 11) exited non-zero on 'Zap/1-1'     -- Hungup 'Zap/1-1'

The trunks on the other side needs to be in from internal context

Scott

Thanks for the suggestion.

I ended up creating a custom destination and context on the main server side that sends the call into the DID over the IAX2 trunk. I set the inbound route for that DID to the custom destination.

On the new server I set the context of the IAX2 trunk to from_trunk. I did this because I wanted the DID to go through the normal inbound routing on the new server. The new PBX is a replacement for the old PBX and I need to test all the queues, IVRs call routing etc. before I go into production.

My default route on the new PBX is to the IAX2 trunk and IAX2 the trunk on the old PBX is set to from_internal.

I am not sure if there is a better way to do this but it is just for testing before I roll out the new PBX. I would be interested in your thought on how this might be achieved using only the GUI if possible.