On Wed, 2007-09-05 at 12:57 -0400, James FitzGibbon wrote:
> On 9/5/07, Adrian Marsh <[EMAIL PROTECTED]> wrote:
> Many thanks for that!! I didn't know that the order worked
> quite like
> that but I see it now... Better go check the other contexts...
> (the [56][0-9] worked fine).
>
> You can also impose a finer level of control over the order extensions
> are searched in by putting them in different contexts and using
> "include" to pull them in in a specific order:
>
> [foo]
> exten => _017935201[56][0-9],1,Goto(local,${EXTEN:-3},1)
> include => bar
>
> [bar]
> exten => _0.,1,Set(CALLERID(num)=${PSTN_GLOBAL}${CALLERID(num):-3})
> exten => _0.,2,Dial(${TRUNK}/${EXTEN},,W)
>
> Dialing 01793520158 would match the longer pattern in this case. The
> search is done in the initial context, then in each included context
> in the order they were included.
>
> There's more info here:
>
> http://www.voip-info.org/wiki/index.php?page=Asterisk+config
> +extensions.conf+sorting
> James speaks the truth. Within a single context, the algorithm tries to match EVERY POSSIBLE extension. The one that scores the best wins. The more specific the pattern, the higher the score. So, _0. would lose to _017. if they both matched. If ANY pattern matches, the include path will not be followed. murf -- Steve Murphy Software Developer Digium
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Sign up now for AstriCon 2007! September 25-28th. http://www.astricon.net/ --Bandwidth and Colocation Provided by http://www.api-digital.com-- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
