[asterisk-users] Replacement of Macro() with Gosub()
Steve Davies
davies147 at gmail.com
Wed Apr 29 07:27:44 CDT 2009
Hi,
Is there some more thorough documentation of this change that has
happened in 1.6? The upgrade.txt and changes.txt files mention it, but
I have already seen details of this change that do not appear to be
documented except in conversations on the mailing list...
1) It appears that it is no longer legal to have:
[macro-contaxtA]
...stuff...
[contextA]
...stuff...
Is this true? Or have I misunderstood the post that I read?
2) The single most useful feature of a macro was auto-return on
unmatched goto. This feature reduces the size of my dialplan to about
30% of its previous size! How can this be implemented with a Gosub?
eg.
[macro-specialcases]
exten => s,1,Goto(c-${ARG1})
exten => c-special,1,NoOp(I am special)
The above would execute the NoOp if ARG1 is set to "special" but just
return otherwise. Perhaps a Gosub can use the 'i' extension to do the
same?
[macro-specialcases]
exten => s,1,Goto(c-${ARG1})
exten => c-special,1,NoOp(I am special)
exten => c-special,2,Return
exten => i,2,Return
Perhaps?
Thanks for any pointers.
Regards,
Steve
More information about the asterisk-users
mailing list