[asterisk-dev] Depth of macros limited to 7 in app_macro.c

Kevin P. Fleming kpfleming at digium.com
Fri Mar 31 07:03:18 MST 2006


Ramon Peek wrote:

> Now I know I'm really not doing anything really out of this world, I'm
> just using a large macro.
> So a maximum macro-depth of 7 is quite shallow to me, is there any
> special reason why this depth is set to 7?

Macro depth of more than 6 is certainly 'out of this world' :-)

The reason the limit is in place is that going any deeper than that will
usually cause the call thread to run out of stack space.

A better solution for you would be to use Gosub/Return, since they don't
use stack space at all.



More information about the asterisk-dev mailing list