[asterisk-dev] Gosub and Macro

Atis Lezdins atis at iq-labs.net
Mon Jun 2 14:33:34 CDT 2008


On Fri, May 30, 2008 at 4:54 AM, Tilghman Lesher
<tilghman at mail.jeffandtilghman.com> wrote:
> On Thursday 29 May 2008 17:57:44 Tim Ringenbach wrote:
>> On Mon, May 26, 2008 at 11:36 PM, Tilghman Lesher wrote:
>> > There are several ways in which Gosub and Macro differ in behavior, and
>> > these differences are extremely difficult to emulate.
>>
>> One other difference (and correct me if I'm wrong, I haven't played
>> with Gosub all that much), is that if you exec application Macro from
>> an AGI, you can run some dialplan code and then return to the AGI.
>> Believe with Gosub, nothing happens except changing where execution
>> continuing after exiting the AGI.
>
> That is a really good point, and I think you had a good expectation that it
> should have worked, and even though you understand why it didn't, I think it
> was a bug that it didn't work.
>
> If you have some time to look at this, I have a prospective patch that should
> take care of this (implemented as a native command).
>
> http://bugs.digium.com/view.php?id=12760
>
> --
> Tilghman
>

And again, this leads me to question - how about Macro's? So, it comes
point that macros defined in AEL are unusable from anywhere except
AEL, right? And as there is no argument support for GoSub in 1.4 there
is no way how it's possible to upgrade from 1.4 to 1.6 without any
configuration change. Now I see that app_macro_wrapper should probably
include handling of AGI MACRO call, and I start to doubt is that the
correct way. Maybe another compatibility switch for AEL parser to not
use GoSub's internally. So people could upgrade to 1.6, and update
configs later.

No offense, but this just breaks statement i heard some days ago about
"Using non-deprecated functionality should not require changing config
between major versions".

Regards,
Atis

-- 
Atis Lezdins,
VoIP Project Manager / Developer,
atis at iq-labs.net
Skype: atis.lezdins
Cell Phone: +371 28806004
Cell Phone: +1 800 7300689
Work phone: +1 800 7502835



More information about the asterisk-dev mailing list