[Asterisk-Users] Extension Questions

Walker Haddock whaddock at datacrest.com
Fri Jan 30 15:17:05 MST 2004


> ;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
> 
Try this:

[us-out]
 _9001XXXXXXXXXX,1,Dial(IAX2/dornoch:xxxx at 10.xx.xx.xx/${EXTEN:1}@outbound)

[local-out]
 exten =>_9.,1,Dial(Zap/g1/${EXTEN:1})

[main]
include => us-out
include => local-out

You don't need the `switch` record unless you want to search extensions that are defined on the remote server.

>  
> 
> 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?
> 
>  
> 
> Kind Regards
> 
>  
> 
> Shad Mortazavi
> 
> ---------------------------------
> 
> US Technical Manager
> 
> Nexus Management
> 
>  
> 

-- 
********   DataCrest, Inc. -- Technically Superior   ******************
Walker Haddock                       http://www.datacrest.com
DataCrest, Inc.                    e-mail:  wh at datacrest.com
1634A Montgomery Hwy.    phone:  1-888-941-3282, 1-205-335-8589
Birmingham, AL 35216                  fax:  1-205-823-7838
***********************************************************************



More information about the asterisk-users mailing list