Tony Mountifield wrote:
> In article <[EMAIL PROTECTED]>, Eric Wieling <[EMAIL PROTECTED]> wrote:
>> No that will not work.  You would want three exten => lines, one for 
>> each area code.
> 
> And if you have a lot of common dialplan that you don't want to duplicate
> between the three extension patterns, put the common stuff up at a higher
> priority and use Goto to get there:
> 
> exten => _404NXXXXXX,1,Goto(200)
> exten => _770NXXXXXX,1,Goto(200)
> exten => _678NXXXXXX,1,Goto(200)
> 
> exten => _NXXNXXXXXX,200,NoOp(Start of common instructions)
> exten => _NXXNXXXXXX,n,etc....

Actually you can do this a lot more simply without using Goto (which
might mess with your CDR):

exten => _404NXXXXXX,1,NoOp
exten => _770NXXXXXX,1,NoOp
exten => _678NXXXXXX,1,NoOp

exten => _NXXNXXXXXX,2,NoOp(Start of common instructions)
exten => _NXXNXXXXXX,n,etc....

Since there is an implicit 'Goto' from priority 1 to priority 2 anyway,
you might as well take advantage of it :-)

-- 
Kevin P. Fleming
Director of Software Technologies
Digium, Inc. - "The Genuine Asterisk Experience" (TM)

_______________________________________________
-- 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