Custom Contexts and Custom Extensions

Hello, I have directly edited the extensions_custom.conf file to create custom extensions. I have also installed the Custom Context module but cannot figure out how to provide extensions access to some of those dialplans I created in extensions_custom.conf. Any suggestions?

Custom contexts doesn’t have anything to do with user written contexts. It was an effort before the class of service module was out.

Anyway, how do you want your custom code to be accessed? Do you want the user to dial and extension that goes to your code? Did you write you code re-entrant to the FreePBX dial plan?

Maybe you need your code to execute before or after a call?

Provide more detail and we can help.

Thanks. Yes, I have a lot of custom extension and dialplans that get executed based on users dialing certain codes or by users calling into the server. I would like to have certain extensions have access to the dialplans and other extensions not have access to those dialplans. Does that make sense?

Yes, that’s not what custom context module is for.

You can register custom destinations in FreePBX that will assign patters to your custom extensions. I find it easier just to assign the dialing patters in the custom extensions themselves.

As far as running codes at different FreePBX events check the developer wiki for a list of assignable user macros. Some may not be documented. If you look at the log on a FreePBX reload you will see the empty contexts. The ones with the word “custom” in them are for user extensions.

Hi, if i understand your q correctly…

If you want to include custom dialplans within the default (from-internal), all the context must be included inside the context from-internal-custom, have you tried this?

e.g., if i have a custom dialplan like this

[dialplan_1]
exten => _X.,1,NoOp(Do nothing)
same => n,Hangup()

It should be included like below;

[from-internal-custom]
include => dialplan_1

Or as mentioned, use the custom extensions module …

Are these things that cannot be implemented through FreePBX modules?
The general purpose of FreePBX is to not have to manage dialplans and config files.

The custom files are typically for injection of small niche things.

Most folks either Use FreePBX or write dial plans. It is typically better to do one or the other unless you are putting dial plans in module form so they properly tie in.

HI
I have custom contexts module . I want to create intercom dial plan and I want to allow some user can make EXT to EXT call.
How can I make dial plan using custom contexts module

Did this. now how to set this context for an extension?