Custom Contexts. How do I get it to work?

Hi all,

I’m using FreePBX 2.7.0.0 with 5 working trunks and several extensions.
Now I would like to “bind” one of the extensions to one of the trunks.

Inbound is working fine (using an inbound route), but whatever I try I can not get the extension to work with the extension that I want it to use.

What I’ve done till now in Custom Contexts (v0.3.2) is I’ve Added a Contect named “test”, and set everything to Deny exept the trunk that I would like to use with it.
After this I’ve set in “Extensions” the extension that I want to use with this trunk tp “test”. After submiting, and reloading The “Custom Context” does show “test”

Problem is that when using this extensions I keep getting an error “Your call can not be completed as dialed”. Whatever option I try I keep getting this

Till now I used an Outbound Route “9|.” to select the trunk. Do I maybe need to remove this, or set it to something other?

there are some issues with custom-context and 2.7 right now. If you are just trying to get a particular extension to work with a particular trunk, try this:

extension number: 700

First create a route for that trunk and make sure it is placed prior to any route that was otherwise being used for the particular dial patterns.

In that route, assuming you want to dial just 10 digit NPA numbers, put the following in the dialpattern:

NXXNXXXXXX/700

and then choose the desired trunk.

After that should be your other route.

You can use this concept for simple cases, adding as many dialpattern lines as you need. Here would be another example for all extensions in the 7XX range for a few different dial patterns:

NXXXXXX/_7XX
NXXNXXXXXX/_7XX
1NXXNXXXXXX/_7XX
011X./_7XX

so for simple cases like that, it ma be easier just to use that. Otherwise, see the other thread wrt to Custom Context.

Thank you for the info.
I’m going to give your “info” a go.

I’ll report back.

I must be missing something here, as I can not get this simple thing to work :frowning:

Here we go. For extension (in my case 5003), I’ve only set the Display name (Kitchen), and the needed “This device uses sip technology.” like “secret, dtmfmode, canreinvite, context, host, type, nat, port, qualify, dial, mailbox, deny, permit”

I’ve created an Outbound Route named “test” with in the “Dial Patterns” NXXNXXXXXX/5003.
For this Outbound Route I’ve selected the Trunk Sequence that I would like to use for 5003

I’ve moved this new route named test to the top of all other routes. It’s now showing “0 test”

Now when I call with 5003, it’s still using my last route to dial out.
The last route (named: private) has as “Dial Patters” just a dot

I’m sure that I’m doing something wrong, or missing something, but what?

Thank you for any help/info on this.

it sounds right if it is extensions 5003 and you are dialing a 10 digit number, should take that route on 2.7???

Okay got it working.

I was dialing a 10 digit nr all the time, but I guess the “test” route did not see it this way, and so did not pick it up.

I’ve now set the Dial Patterns to “./5003” (no quotes),and this is working great!

Thank you for your help Philippe. Kudos to you.

[php]Otherwise, see the other thread wrt to Custom Context[/php]

Do you maybe have the link to this thread? I would love to follow this one.

http://www.freepbx.org/forum/freepbx/users/poll-do-you-use-the-custom-contexts-module-from-the-freepbx-add-ons-repository