<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
&nbsp;&nbsp;&nbsp; A couple of days ago we decide to test 1.6 branch, we are using 1.4
in our production environments, and to my surprise, when ported parts
of our dialplan, I found that any macro declaration in the AEL
dialplan, we use them a lot for subroutines, was ported as gosub when
compiled.<br>
&nbsp;&nbsp;&nbsp; We are now checking the rest of the changes made in 1.6, but this
one it quite useful if any of you do AEL.<br>
<br>
LTenorio<br>
<br>
Tilghman Lesher wrote:
<blockquote
 cite="mid:200904291247.21366.tilghman@mail.jeffandtilghman.com"
 type="cite">
  <pre wrap="">On Wednesday 29 April 2009 11:45:13 Steve Davies wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">2009/4/29 Tilghman Lesher <a class="moz-txt-link-rfc2396E" href="mailto:tilghman@mail.jeffandtilghman.com">&lt;tilghman@mail.jeffandtilghman.com&gt;</a>:
    </pre>
    <blockquote type="cite">
      <pre wrap="">Let's also be clear about what Gosub is replacing. &nbsp;Gosub replaces Macro
for AEL2. &nbsp;The side effects of this are relatively unfelt, unless you're
doing something unusual like defining subroutines in AEL and calling them
from extensions.conf. &nbsp;The big gain in this is the ability to have
infinite depths of subroutines, as opposed to a maximum of about 7 in
1.4's AEL.

Macro is not going away. &nbsp;If you want to continue to use Macro, it's
there for you to use, warts and all. &nbsp;Macro continues to have the depth
limit of 7 levels deep, and that won't change. &nbsp;It's a fundamental limit
of the application, which is one of the reasons why its functionality has
been replaced in AEL with Gosub. &nbsp;Also, I think Gosub is a bit easier to
learn, and its behavior is more straightforward. &nbsp;There aren't corner
cases and special behaviors that you have to learn about Gosub; it just
works like a subroutine.
      </pre>
    </blockquote>
    <pre wrap="">Many thanks for the clarification - I do use both Macro() and Gosub()
at present, and understand the difference ( I try to tell myself I do
;-) ). I do not use AEL dialplans.

I had misunderstood the description on the changelog, and I had not
noticed that it was an AEL change, rather than a generic dialplan
change. There is clearly more of a difference between extensions.ael
usage and extensions.conf usage than I realised. I can see now that
AEL2 parses Macro (&amp;) as a builtin, whereas extensions.conf will treat
it as an application, and they have little in common.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
Well, Macro is officially deprecated, but not in the "it's going away" sense
of deprecated, merely in the way that we encourage new users to use
Gosub, when they implement dialplan subroutines.

  </pre>
</blockquote>
</body>
</html>