[Asterisk-Users] switch => priority in the dialplan.. (probably an issue for Mark)

Karl Putland karl at putland.linux-site.net
Fri Jul 4 07:39:09 MST 2003


On Fri, 2003-07-04 at 02:01, WipeOut . wrote:
> Hi,
> 
> It seems that the "switch" parameter has a priority in the dialplan
> that is higher than the wildcard extensions.. This I am finding to be
> a problem..
> 

switches are actually searched after the local dialplan.
The problem is that _90027. is a can_match not exact_match so *
continues to search the switch for an exact match until the digit
timeout or until you're done dialing at which point it uses the local
match of _90027..

After dialing take a look at iax2 show cache to see the results of the
lookups against the switch.

--Karl

> My setup..
> 
> UA1--[AST1]--{IAX}--[AST2]--UA2
>        |              |
>      PSTN1          PSTN2
> 
> I use switch on AST1 to connect to AST2... As you can see I have PSTN
> connections on both and also the IAX connection is not permanent..
> 
> I have wildcard extensions that define which PSTN line to use when
> dialing out..
> 
> For example I have the following on AST1 in extensions.conf..
> 
> [extensions]
> switch => IAX2/user:password at AST2/extensions
> and my local extensions are in this context..
> 
> [dialout-uk]
> exten =>
> _90044[1-9].,1,Dial(IAX2/user:password at AST2/${EXTEN}@dialout-uk)
> 
> [dialout-int]
> exten => _90027.,1,Dial(Zap/1/${EXTEN})
> and some other country definitions..
> 
> What is happeneing is that when I break the IAX connection(this way I
> can see the errors) and I dial 90027315555555 from UA1, AST1 tries to
> look for extension 9 on AST2 via "switch" and times out then tries
> extention 90 on AST2 then 900 then 9002 then 90027 etc... you get the
> idea.. Only once it has tried every number will it move to the _90027.
> definition and use the PSTN line attached to AST1 as it is supposed
> to.. This whole sequence takes a while to run through and by then you
> would have hung up the phone and tried again..
> 
> I have tried moving things around in the extensions.conf file but it
> seems that "switch" has a higher priority than local wildcard
> extension definitions..
> 
> Surely ALL local definitions (static or wildcard) should take priority
> over "switch"ing to the remote Asterisk box?? so "switch should be the
> last thing to try when all else has failed... or am I missing
> somthing??
> 
> Later..
-- 
Karl Putland <karl at putland.linux-site.net>




More information about the asterisk-users mailing list