I have quite a few of these to create, are there any cli commands or API/DB fu to help with this? Momma always said if you have to do it more than three times, write a script.
I see some of the definitions in /etc/asterisk/extensions_additional.conf, but there’s a big mean warning about voiding the warranty if I change that file.
TL;DR;
Trying to send old extensions native to old PBX to avoid user confusion. Old extensions have to mapped to DID to be sent to gateway/analog PBX.
I’ve got an old PBX sitting behind a Vega gateway. I’m in that ugly area transitioning to the IP PBX. I’ve trying to make it to where users on the IP PBX can dial the 3 digit extensions they know and love to get back to the old PBX.
For example, phone number 111-123-4567 comes in to teleco, that gets sent to vega gateway as 567. Dial plan on gateway sends any unknown 3 digit extensions to old PBX. On gateway I have dial plan for any non emergency 3 digit extension from SIP interface to be sent to old PBX interface. On old PBX extension that maps to 567 is 853…they don’t match up…I didn’t set that up .
On freepbx I setup a misc application with feature code of 853 to be sent to misc destination with a definition that dials 567. I have an outbound route defined for non-emergency 3 digit extensions to be sent to the Vega. I setup two of them so far.
It works…but ick. I’m new here, so feel free to yell at me and tell me I’m doing it wrong, this is just what I have found to work. I’m really trying to not make any changes on old Toshiba Strata. I don’t know that system and the sooner I decommission it and toss it into the dumpster fire the better.
Offhand I think you could put these in /etc/asterisk/extensions_custom.conf which (as is a custom file) will not be overwritten by FPBX. For each extension (i.e. 853) make the dialplan lines to dial the number on the old toshiba pbx (i.e. 567).
This is prob a good application for custom dialplan. If you want to redirect the dial strings 853 to 567, the dialplan in extensions_custom.conf to do that looks like:
you can just add additional lines as required updating the digits as appropriate. There are two potential problems with this approach of which you’ll want to be aware:
future admins will not know you’ve done the custom dialplan and will run into issues when they create extension 853 and get unpredictable results
if you are not disciplined with your dialplan you could get an infinite loop
This is done with RPID, remote party ID. If your remote PBX supports it, and the trunk is configured to accept RPID and the dialing extension is configured on the pbx with rpid enabled and the dialing device supports and is configured to display rpid, then the caller ID name of the remote party is displayed when they answer.
As this setup only has one trunk that goes to a Vega, and then to the old PBX or the PSTN, is there a way to set the RPID for one thing going to the old PBX and a different value for the PSTN?
Or, being that I know what numbers will be routed to the old PBX, can I match on that and rewrite the CID on the FreePBX before it heads out to the Vega?