How do I refer to a 'custom extension' within FreePBX

I have created a dial plan for a custom extension which I have put in extensions_custom.conf in the ext-local-custom context:

[ext-local-custom]
exten => 123,1,Set(CALLERID(all)=456)
exten => 123,n,Goto(789,1)

In this specific case it simply sets the caller id to fake a call from a different number.

I now want to use the extension as the destination for an inbound route.

I’ve tried creating a “custom extension” for the extension I have define, but it does appear in either the extension list or the custom destination list. I’ve also tried using “custom Destinations” and “Virtual Extensions”. But Custom destinations won’t let me use the ext-local context. And Virtual Extensions causes FreePBX to create its own dial plan for the extension.

How do I refer a extension defined in the ext-local-custom context from within FreePBX?
Do anyone know how to tell FreePBX about a my custom extension and allow it to be used as a destination?

Basically, you’re probably doing it wrong for what you want to achieve. If all you want to do is change the caller ID, then use the Set Caller ID module:

http://www.freepbx.org/support/documentation/module-documentation/third-party-unsupported-modules/set-callerid

And make the Caller ID instance the destination for your inbound route (you’ll understand this better if you install the module and try to use it).

If for some reason you MUST do it the way you’re trying to do it, try using s instead of the extension number:

[ext-local-custom]
exten => s,1,Set(CALLERID(all)=456)
exten => s,n,Goto(789,1)

Then make your custom destination point to it:
ext-local-custom,s,1

Then make the custom destination the target of your inbound route (no extension needed). And if for some reason you feel you MUST create an extension, make a Misc. Application and use the extension number as the feature code.

Thanks for the pointer to the “Set Caller ID” module sir_sip. I’ll have a look into that.

However While “Set Caller ID” might address the specific case of changing the callerid. I’m more interesting in how to use the ext-local-custom context to add custom local extensions.

Unfortunately the custom destination method you suggested means the call has to be directed to another context, and then it really doesn’t matter what context name I use.

The whole point of placing a dial-plan in the ext-local-custom context is that it becomes part of the ext-local context. Which works fine by the way. Its just I cannot figure out how to tell FreePBX about the extension I have defined.

Another small point I don’t want to us the ‘s’ extensions as I may have dialplans for several specific extension numbers that I want to include.

Thanks for your feedback though sir_sip. Much appreciated.

Andrew.

What about the custom extensions module under the tools tab.

BF

I’ve tried using the custom extension module (that was the logical place I thought).
Unless I’m not using it correctly (although it looks rather self explanatory, there is very little documentation for it), all it seems to do is stop me creating an extension within FreePBX using the extension number I have defined as custom.

As I said the FreePBX “custom extension” does not appear in any of the destination list options for either in-bound routes, queues, IVRs, etc.

I just feel like there’s something I’m not ‘getting’ here. It would seem logical to me that the main reason for creating a custom extension is so that I can use it within FreePBX.

Andrew.

I realize this thread is old, but it’s one of the first results on Google and still has no solution posted.

-Go to the “Tools” tab on the left menu
-Click on “Custom Destinations”
-Under “Custom Destination” enter the custom context, extension, priority.

Example from above: ext-local-custom,123,1

-Enter a brief description and any notes.

Now when you choose a destination, “Custom Destinations” will be an option.

Hope this helps someone else,
Mike