[asterisk-dev] extensions.conf included contexts priorities

Andrew Kohlsmith akohlsmith-asterisk at benshaw.com
Wed Apr 25 05:18:30 MST 2007


On Tuesday 24 April 2007 8:26 pm, Jared Smith wrote:
> Here's just one example of the many ways I use the current behavior.
>
> [long-distance]
> exten => _1NXXNXXXXXX,1,Dial(IAX2/${UPSTREAM}/${EXTEN})
> include => local
>
> [local]
> exten => _NXXXXXX,1,Dial(IAX2/${LOCALPROVIDER}/${EXTEN})
> exten => _1NXXNXXXXXX,1,Dial(no-permissions-to-make-this-type-of-call)

In this case, however, you could not dial locally if your context includes 
longdistance!

i.e. don't you use something like this?

[international]
exten => _011.,1,Dial(...)
include => longdistance

[longdistance]
exten => _1NXXNXXXXXX,1,Dial(...)
include => local

[local]
exten => _NXXNXXXXXX,1,Dial(...)
exten => _NXXXXXX,1,Goto(519${EXTEN},1)

[trusted]
include => nine11
include => internal
include => international

[polycom]
include => hints
include => trusted

sip.conf:
[221]
context = polycom

??  In that case, putting a _1NXXNXXXXXX,1,Dial(...) in local will never get 
executed, since the wildcard match in longdistance will always hit first.  In 
what I thought it should be, your local will override since wildcards are 
lowest-priority, and the local wildcard will match before the LD wildcard 
since includes of a context are searched before wildcards of the context.

-A.


More information about the asterisk-dev mailing list