[asterisk-users] priority problem

Steve Davies davies147 at gmail.com
Thu Jul 13 01:28:08 MST 2006


On 7/13/06, unplug <maillisting at gmail.com> wrote:
> In dial plan, we can set the priority.  However, I find that the
> priority count is a global value.  It will continue to increment no
> matter in different context.  Below is what I have tried.

This is exactly how it is designed, and is a very useful feature.

You need to understand the matching order properly to appreciate to
power of this type of evaluation, but I believe the solution to your
particular question is Goto, and not include.

 [testflow]
exten => _X.,1,NoOp(testflow,1=${CALLERID(NUM)})
exten => _X.,2,NoOp(testflow,2=${CALLERID(NUM)})
exten => _X.,3,Goto(testflow1,${EXTEN},1)
...

Each context has its own "exten =>" lines checked first, and then each
"include =>" is checked in the order specified after that. Consider
using Macros too, they will often shorten a dialplan.

Cheers,
Steve



More information about the asterisk-users mailing list