All inbound calls flow into the main office
Some inbound calls are redirected to other FreePBX at other branch offices based upon DID
^^^ this is working OK
The branch office outgoing calls need to flow through the main office but retain their own outgoing CID specific to that branch
^^^ this is where I’m running into trouble, maybe I’m right at the answer but missing something simple
main office 444-1111
branch office 444-9999
Incoming to branch office
Incoming call to 444-9999 reaches main office
Inbound route for DID 444-9999 pushes the call to the remote branch office FreePBX
Outbound from branch office
Outgoing call from phone at 444-9999 to the outside world
Outbound route at branch office routes the call to the main office FreePBX using CID 444-9999
The main office FreePBX accepts the call but sees the DID 444-9999 and captures the call
The call never reaches the outside world
I’m looking for suggestions on how to best configure this situation.
(and, of course, this is a system change that needs to happen in 24 hours)
Is the Inbound Route set up with the CID set to 4449999?
If what you’re saying is true, the DID should be set to the callee’s DID and the CID should be set. The Inbound DID wouldn’t enter into the issue.
Make sure your ITSP allows “foreign” CID to be routed through your connection. This shouldn’t be a problem, since your ITSP is routing calls to that DID from the world.
Also, you need to make sure that the context for the incoming calls from your other PBX have access to the outbound trunks (from-local, for example). If the context that being used by the pass-through call is “from-sip” or “from-trunk” (common inbound contexts) then the outbound routes will never be accessed and the call will die like you are describing.
At the main office I didn’t have any inbound route that checked for incoming CID that would match the branch office. There was only the Any/Any catch-all at the main office, thus it was answering the branch office call instead of passing it out through a Trunk.
At the main office I’ve added an Inbound Route that looks for CID 444-9999
It’s destination is our SIP Trunk which does not override the outbound CID so the branch CID 444-9999 is being allowed through without trouble.
So I’ve got it working - just not as I originally expected.
My original expectation is that I could use an IAX trunk with context=from-internal where the branch office would reach the main office, the main office would see the CID of the branch office and know to route the call through an Outbound Route.
I hadn’t considered the main office starts by seeing the incoming call as an Inbound Route and act accordingly. I’ve only used site-to-site IAX with context=from-internal up until today. This is some new complexity.