[asterisk-dev] extensions.conf included contexts priorities

Jared Smith jaredsmith at jaredsmith.net
Wed Apr 25 11:26:30 MST 2007

On 4/25/07, Andrew Kohlsmith <akohlsmith-asterisk at benshaw.com> wrote:
> Very close.  sip.conf is pretty much identical to how I'd do it, but untrusted
> would look like this:
> [untrusted]
> include => nine11
> include => local
> exten => _X.,1,Playback(invalid)
> which, of course, doesn't work under this system, since _X. will match before
> anything that is included.  I'd have to have this:

If you want the _X. pattern to match *after* the other includes,
simply put it in its own context.

include => nine11
include => local
include => wildcard

exten => _X.,1,Playback(invalid)

Once you understand the rules of "extensions, then switches, then
contexts", it's not so hard to get the patterns matched in the order
you want.  (I will admit, however, that it means having more contexts
than you'd imagine in the beginning.)


More information about the asterisk-dev mailing list