[asterisk-users] LCR in Asterisk

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Sun Feb 17 09:52:05 CST 2008


On Sunday 17 February 2008 03:41:09 Thomas Kenyon wrote:
> Tilghman Lesher wrote:
> > Macros are deprecated.  Gosubs are the way forward, and yes, they have
> > local variables.  Simply define them once as Set(LOCAL(foo)=bar) and foo
> > will be gone when the innermost stack is removed (either by Return or
> > StackPop).
>
> Yeah, but I like macros.
> <stamps feet>.

Not that I would ever encourage such dialplan abuse, but Gosub will permit
going far deeper, even in recursion than Macro.  With Macro, you are limited
from anywhere from 5 to 10 levels deep, because it exhausts the call stack,
whereas Gosub will permit something like 100,000 nested calls deep.

> Still nice to know that the , | () nonesense is being cleaned up.

Thank you.  I realize this is going to be painful initially, but it's quite
necessary to build even more complexity into the dialplan in the future.

-- 
Tilghman



More information about the asterisk-users mailing list