Dialplan customization

Hello. Is it possible to customize the dial plan used by freepbx during file auto-generation so that I don’t need to manually add a block of code in extensions_override_freepbx.conf everytime I create a new extension or edit it?


I actually don’t think there is a way to customize the dial plan (other than adding code in the various extensions_*.conf files intended for that purpose), but sometimes there are workarounds available depending on what you are trying to do. For example, if you are trying to do some additional call processing on outgoing calls from an extension, you may be able to redirect the extension context to some code you have placed in extensions_custom.conf.

The thing I would actually like to see is a way to insert a bit of custom dial plan just before an extension is rung on an incoming call, and as far as I know right now there’s no easy way to do that (I use a hack involving Follow-Me but it’s not exactly pretty) Anyway, I’m just suggesting that if you would be more specific about what you are trying to do, someone might be able to suggest a better way to do it.

I need, before dialing, to check (through a DB query) where the user (whom the extension that is being called belongs) is at the moment and redirect the call to the extension closer to him. For now I’ve been manually adding a custom code for each extension. Although the code is very similar between extensions it creates an unnecessary complexity into creating/modifying an extension.

If there’s no way of changing I’m thinking in creating a script that will rewrite the custom .conf file every time the extensions.conf is changed, I think that should work, although a way to customize freepbx dial plan for all extensions would certainly be better.

Sorry for the late response, and thanks again.

I don’t know if this will resolve your problem, but it sounds like you want some sort of hot-desking. If so, go into the amportal.conf file and change FreePBX to the device and user mode (deviceanduser). This separates the device from the user and the user will log in when he sits at a desk. He will have to log out of the phone when he leaves.