How to remove a prefix on a dialed extension?

Hi,
I’m fairly new to FreePBX, but I have a need to remove four digits from a dialed extension in order for it to be a valid extension and although I can do this simply in outbound routes, I’m confused on how to do that with internal extensions.

First, the reason I had phones adding a prefix is in order to determine the physical location of the phone and therefor the outbound DID and the correct physical address (for E911). We have a public login system where users can log in to their phone with their extension and passcode, at any phone, at any location, and so the phone itself, not the extension, needs to determine location using the prefix.

I’ve just enacted this setup in order to deal with the new E911 rules, which as I say works wonderfully for outbound calls, but unexpectedly broke the internal calls. I should also add that the four digital prefix is obviously going to change depending on the location, so the prefix removal needs to be wildcard for at least one of the digits.

Help anyone?

Would you mind explaining how you add the 4 digits (location ID) automatically? On the phone level or routing level?

1 Like

I don’t know what the OP did, but doing it at the phone level is an excellent idea, because you could just rewrite 911 (and 933 or whatever your emergency test number is).

We are using these inexpensive Grandstream 1625 phones (linux OS I believe) that have the option of adding a prefix to the dialed number, under each line’s call features (two lines on this model). It is the only way I can think of to get the location of the phone itself because of the hotdesking we are doing and the fact that they log in at multiple locations, which need their own E911 address now.

UPDATE: I’ve created a custom context that allows ALL and set all extensions to use it. This way I was able to remove the 4 digit prefix on internal calls and let the call continue normally to the correct extension. There may be issues with this that I’m not yet aware of, but fingers crossed, so far it seems to be working as expected.

So, for now, this issue is RESOLVED.

Grandstream 16xx phones have Dial Plan options that can easily be set to add a prefix to (for example) only 911 and 933, which may be simpler to implement.

Also, prefixing all calls may have issues such as unwanted appearance in CDR records or other logs.

Ah, yes, you are correct, there is indeed an option for dial plan in addition to prefix! - I could use this to create a rule that adds the prefix to 911 only and therefore leave local extensions untouched and I can dispense with the custom context. Much simpler, thanks! :slight_smile:

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