[asterisk-dev] extensions.conf included contexts priorities

Steve Murphy murf at digium.com
Wed Apr 25 16:26:49 MST 2007


On Wed, 2007-04-25 at 14:26 -0400, Jared Smith wrote:
> 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.
> 
> [untrused]
> include => nine11
> include => local
> include => wildcard
> 
> [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.)
> 
> -Jared

Excellent thinking, Jared!

And, why is using the 'i' extension so nasty, Andrew? It gives the same
effect 
as if you specified said wildcard...

murf

-- 
Steve Murphy
Software Developer
Digium
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3227 bytes
Desc: not available
Url : http://lists.digium.com/pipermail/asterisk-dev/attachments/20070425/be839aaa/smime-0001.bin


More information about the asterisk-dev mailing list