Divert outbound calls to a single number

Hi. I’ve been asked for a rather peculiar and urgent requirement. An elevator that had a maintenance contract to company X is now changed to a new maintenance contract with company Y. There will be a city hall inspection tomorrow afternoon and it will likely fail because the emergency phone on the elevator is still programmed to dial the old company’s Emergency Center, and it should be the new one. But due to complications, the re-programming on the elevator won’t be possible on time.

This might leave the elevator prohibited from functioning, and we’ll be seeing 80-year olds with heart problems going up and down staircases for weeks :scream:

I know I can connect the elevator phone through my FreePBX, my question is: how should I go about intercepting outbound calls to a number, say, 123456789, and send them to 987654321 instead? This would get me through the inspection tomorrow and then I could more quietly get it properly fixed.

Please help. I’ve been going through docs and forum threads but I don’t have much time to be pursuing dead ends, and I would really value some help to start my work directly in the right configuration screens/concepts.

Thank you!

create an outbound route that absorbs the old number and inserts the new

1 Like

You probably don’t need to create a new route, if calls to 123456789 and 987654321 would use the same Outbound Route.

On the Dial Patterns tab for that route, add an entry with
prepend: 987654321
prefix: 123456789
match pattern: (leave blank)
CallerID: (leave blank)

This assumes that the ‘regular’ pattern matching 123456789 does not have a prepend or prefix entry. If not, post details.

Submit, Apply Config, test.


On preliminary testing with my mobile number, this seems to work! Great, simpler than I thought it would be :tada:

It’s late now, but tomorrow I’ll try the test with the elevator phone. Thanks to both of you for the quick help.

Test was successful.

Let me document the solution in a bit more detail:

I started by placing a call and watching the logs in rasterisk, to remind myself of the Outbound route that was being used for my external calls.

Then I saw what was the name of the Trunk used for that route. The solution is done in Connectivity / Trunk settings, in a tab called Dialed Number Manipulation Rules.

The text explains the logic of the rules, I’ve highlighted the relevant bit.

Place the Old number in the prefix box; and the New number in the Prepend box.

Submit, apply, test :wink:

The ailing hearts of elderly people are now appropriately lifted. Success. Thanks!

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