[asterisk-dev] Gosub and Macro

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


On Mon, Jun 2, 2008 at 11:55 PM, Tilghman Lesher
<tilghman at mail.jeffandtilghman.com> wrote:
> On Monday 02 June 2008 14:33, Atis Lezdins wrote:
>> 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
>>
>> 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".
>
> Doing what you're doing isn't deprecated because doing what you're doing
> was never supported in the first place.  It's fine that it works for you, but
> you're on your own in terms of supporting that.

So You're saying that AEL is not compatible with Realtime and AGI?
Perhaps everyone should migrate to .conf dialplan, as that has much
more official functionality.

>
> And I honestly don't see how your wrapper would be anything close to what
> I would consider a supported functionality.  It works in a VERY limited
> fashion for your own purposes, and it's great that it works for you, but I
> don't see it as something that we'd EVER want to support ourselves.  At least
> not until you've found a way to work around the limitations that I've
> considered to be difficult (impossible) to address.
>

Well, I was offering different options, and wrapper is just one, that
seemed the best at that point. However now that I realized that there
will be the same problem with AGI, I think something better can be
done.

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