Need advice - all calls through one FreePBX to other FreePBX

Here’s the situation we’re about to face:

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

EXAMPLES
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)

Thanks in advance,
Jason

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.

Thanks for that.

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.

Are using the from-internal context for your tie-line?

For the office-to-office calls I have a different IAX trunk with context=from-internal for both the outgoing and incoming. It’s worked great for years.

To get the outside calls to flow from the main office to the branch office the IAX context=from-trunk for both outgoing and incoming on both main and branch office configs.

Originally for the outside call flow I had it set differently

  • main office > branch = context from-trunk
  • main office < branch = context from-internal
    which didn’t work as expected.

Now it looks like this:

  • main office > branch = context from-trunk
  • main office < branch = context from-trunk

and at the main office I have two inbound routes

  • inbound from branch , DID any CID 444-8888 DESTINATION sip trunk
  • inbound from outside, DID 444-8888 CID any DESTINATION branch office iax trunk

This seems to be working OK. Though I’m unsure if it’s the “proper” method.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.