[asterisk-dev] Reverse Inheritance

Atis Lezdins atis at iq-labs.net
Thu Nov 13 09:43:39 CST 2008


On Thu, Nov 13, 2008 at 5:23 PM, Tilghman Lesher
<tilghman at mail.jeffandtilghman.com> wrote:
> On Thursday 13 November 2008 03:19:11 Trevor Peirce wrote:
>> Atis Lezdins wrote:
>> > I'm not very much insisting, however as i recall - main argument for
>> > introducing SHARED() function was that those variables could change at
>> > any time, so users must take extra care when accessing their value.
>> > With + or ^ it would be the same - you modify variable in child
>> > channel with special prefix, but access in parent channel as regular
>> > variable which shouldn't be used in loop statement etc directly, but
>> > copied first.
>>
>> This certainly would be cleaner than using variable name prefixes. Using
>> a function certainly has my vote now that you mention it!
>
> The only issue with using the SHARED() dialplan variable is that you have to
> know the name of the original channel before you can set its SHARED()
> variables.
>

So i can set SHARED() variable for any channel, not only parent?

Then i would return to my first proposal - adding PARENT() function
which would set SHARED() variable for all channels up (effectively -
reverse inheritance).

I just wonder how those variables would propagate against sibling channels..

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