[Asterisk-Users] Extension Questions

Steven Critchfield critch at basesys.com
Fri Jan 30 13:15:07 MST 2004


On Fri, 2004-01-30 at 14:00, Shad Mortazavi wrote:
> Dear all,
> 
>  
> 
> I have the following lines in my extentions.conf file;
> 
>  
> ;All US Calls
> 
> exten =>
> _9001XXXXXXXXXX,1,Dial(IAX2/dornoch:xxxx at 10.xx.xx.xx/${EXTEN:1}@outbound)           
> 
> ;Dial 9 for outgoing numbers
> 
> exten =>_9.,1,Dial(Zap/g1/${EXTEN:1})
> 
>  
> ;include Brunswick
> 
> switch => IAX2/dornoch:xxxx at xx.xx.xx.xx/sip
> 
>  
> What I’m trying to do is to send any calls starting with 9001 out
> through my system in the USA and any number starting with a 9 through
> my local number.
> 
>  
> 
> However what ever the number I dial starting with a 9 goes out of the
> local interface. If I comment out the ‘exten
> =>_9.,1,Dial(Zap/g1/${EXTEN:1})’ then it works.
> 
>  
> 
> How can I make the line starting exten => _9001 take precedence over
> the line starting exten => _9001?

Well, you could define your _9. a little more clearly. Is it likely that
your other calls would have some digit other than a 0 following the 9?
If so then you should see the need to use wither a a N which is 2-9 or
maybe some other class in the regex. 
-- 
Steven Critchfield  <critch at basesys.com>




More information about the asterisk-users mailing list