[asterisk-users] Macro vs sub

Jonas Kellens jonas.kellens at telenet.be
Wed Jan 18 07:41:34 CST 2012


On 01/18/2012 01:51 PM, Matthew Jordan wrote:
>> Anyone else ? Maybe one of the developers can confirm this risk of
>> working with macros ?
> I don't think you need an Asterisk developer to tell you the risks of using macros in deeply nested situations.  Quoting the documentation of Macro:
>
> "Because of the way Macro is implemented (it executes the priorities contained within it via sub-engine), and a fixed per-thread memory stack allowance, macros are limited to 7 levels of nesting (macro calling macro calling macro, etc.); It may be possible that stack-intensive applications in deeply nested macros could cause asterisk to crash earlier than this limit. It is advised that if you need to deeply nest macro calls, that you use the Gosub application (now allows arguments like a Macro) with explict Return() calls instead."

How would I notice that this is really the case here ?

I should see the RAM-memory spike on the server ? I do not see this...

Webmin says : 3.83 GB total, 375.51 MB used


Kind regards,

Jonas.




More information about the asterisk-users mailing list