<br><br><div class="gmail_quote">On Wed, Feb 2, 2011 at 4:04 PM, Kirill Katsnelson <span dir="ltr">&lt;<a href="mailto:kkm@adaptiveai.com">kkm@adaptiveai.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Steve,<br>
<br>
Thank you very much for your answer, but I think it misses the point somewhat.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
In the beginning, we implemented macros with macros. But, there is a limit<br>
of about 7 levels, and then you crash. So I changed AEL to<br>
implement macros with gosubs instead. Now you can use recursion to your<br>
heart&#39;s content.<br>
</blockquote>
<br></div>
This I understand. In fact, I am using  DIALPLAN_EXISTS() and GoSub(), if you noted in the code sample I shown, which will not even work with the old-style Macro macros:<div class="im"><br>
<br>
&gt;&gt;    if (${DIALPLAN_EXISTS(&quot;setup-${CUSTAPP}&quot;,s,1)}) {<br>
&gt;&gt;      GoSub(setup-${CUSTAPP},s,1);<br>
&gt;&gt;    }<br>
<br>
</div><div class="im"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
My advise: don&#39;t mix AEL macro calls with gosubs.<br>
Really, there should be little to no need. It&#39;ll only complicate things.<br>
</blockquote>
<br></div>
Unfortunately, we have couple hundred of applications here, but only a handful requires custom set-up macros (I am using the word &quot;macro&quot; *strictly* in AEL sense).<br>
<br>
Requiring that every application had a set up macro would certainly complicate things. We already run about 2 thousand lines of AEL code, and adding 200 empty macros to it would not make it less complicated, with added fun of maintaining it. This is something that I am using only as an override to the default flow.<br>

<br>
Besides, AEL lacks capability to call a macro by name: the macro invocation `&amp; IDENTIFIER&#39; requires IDENTIFIER be visible as a macro name at compile time.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Need to use routines in extensions.conf? Take a few minutes and rewrite them<br>
into AEL.<br>
</blockquote>
<br></div>
I never wrote extension.conf. We went AEL from the very start few years ago.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
If you need to do some real low-level tweaks in extensions.conf, then mimic<br>
the conventions of AEL there. (Look at the code AEL generates for macros as<br>
an example).<br>
</blockquote>
<br></div>
That was my whole point. AEL lacks the capability to check if a macro with a run time produced name exists, and, if it is, to call it.</blockquote><div><br>Sounds like a bug to me! Tell you what, you report this as a bug, and I&#39;ll attach a patch to the bug<br>
that fixes the problem. Is it a deal?<br><br>murf <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><div></div><div class="h5">
<br><br></div></div></blockquote></div>-- <br><div><span style="font-size: 13.3px; font-family: Verdana,Arial,Helvetica,sans-serif;"><div style="margin: 0pt 0pt 8px;"><p style="margin: 0pt;"><span style="font-family: comic sans ms,sans-serif; font-size: medium;">Steve Murphy</span></p>

<p style="margin: 0pt;"><span style="font-family: comic sans ms,sans-serif; font-size: medium;">ParseTree Corporation<br></span></p>
<p style="margin: 0pt;">57 Lane 17</p>
<p style="margin: 0pt;">Cody, WY 82414</p><br>
</div></span></div>