[Asterisk-Dev] Marco and Realtime Extension Problem

Kevin P. Fleming kpfleming at digium.com
Thu Jul 21 06:20:11 MST 2005


> Below is my default context:
> 
> [default]
> exten => _X.,1,Macro(stdexten,${EXTEN},${CALLERIDNUM})
> ;Realtime Routing from MySQL
> switch => Realtime/default at extensions

(this is not a development question, in the future please post questions 
of this type to asterisk-users)

You have completely misunderstood 'switch'. It is not _next in the 
sequence_, even though you have placed it there in the file. 'switch' 
provides complete extensions to the dialplan itself, they are not 
intermixed with extensions written directly in extensions.conf.

If you want it to behave the way you described, you will need to do 
something like this:

[default]
exten => _X.,1,Macro(....)
exten => _X.,n,Goto(default-switch|${EXTEN}|1)

[default-switch]
switch => Realtime/default at extensions



More information about the asterisk-dev mailing list