Dear all, I have the following lines in my extentions.conf file; ;All US Calls exten => _9001XXXXXXXXXX,1,Dial(IAX2/dornoch:xxxx@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@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? Kind Regards Shad Mortazavi --------------------------------- US Technical Manager Nexus Management -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20040130/a0c785fc/attachment.htm
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@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@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@basesys.com>
> ;All US Calls > > exten => > _9001XXXXXXXXXX,1,Dial(IAX2/dornoch:xxxx@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@xx.xx.xx.xx/sip >Try this: [us-out] _9001XXXXXXXXXX,1,Dial(IAX2/dornoch:xxxx@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@datacrest.com 1634A Montgomery Hwy. phone: 1-888-941-3282, 1-205-335-8589 Birmingham, AL 35216 fax: 1-205-823-7838 ***********************************************************************