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

-- 
j.
_______________________________________________

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

Reply via email to