Dial Plan prefix/prepend help

Forum Members -

I’m wondering if it would be possible to use the prefix/prepend functions of the dial plan to do the following:

A user dials a 5 digit extension ( ie 55512)
Asterisk/Freepbx would then remove the leading 5 and replace it with 1-123-(final 4 digits)

My end goal is to set up a 5 digit dialing system for a remote office, and the users in the remote office won’t have to dial 1-123 when trying to call people back at the main office.

Thanks for any help or suggestions you might have.


prefix = 5 prepend = 1123

in my case, I have to add the # at the number you wish to call.
i.e. 999543211
call to #999543211