How to change a dialed, outbound number to an extension? SOLVED

I have one PBX running multiple offices, A and B. When a user at office A calls office B, they use the “outside” number. I want to force these calls to use the internal extension of office B.

For example, user dials 555-2525 to reach an office instead of dialing extension 400. I want to change 555-2525 to extension 400 on the PBX.

info:
Current Asterisk Version: 11.7.0
FreePBX 13.0.95

1 Like

Does 555-2525 always go to the same extension, or will 555-2525 map to several extensions in the remote office?

I user ring groups for the inbound routes to those offices, so sending 555-2525 to a ringgroup would work.

Misc Application. You may need a Misc Destination to go with it depending on your config.

1 Like

Thanks, that was easy.

1 Like

The first thing to try is to add a new outbound route (make it first in the list) to rewrite the remote office phone number to your ring group. Set the trunk for this route to your inter-office trunk that of configured to only allow extensions. If you are already passing extensions this way, you can just add the rewrite rule to that route.

Once the outbound route rewrites the number, the inter-office trunk should pick the number up.

Failing that, it should be simple enough to put together a context that rewrites the number for you before it gets processed by the outgoing route.