[asterisk-users] AEL Variable Warning Messages

Benoit maverick at maverick.eu.org
Mon Jan 5 15:30:04 CST 2009


Brent Davidson a écrit :
> Watkins, Bradley wrote:
>> ...
>>> 	Well, before I file a bug I have another question...  In AEL,
>>>     
>> what is the correct syntax?  Do all variable references still need to be
>> wrapped in ${} or not?  If they do, then the documentation on
>> voip-info.org needs to be changed to reflect that.
>>
>> Yes, variable references need to be wrapped in ${}.  Where on the wiki
>> do you see an example that is otherwise?  I just looked at the main
>> documentation for AEL, and I didn't see any instances of it.  Certainly
>> they can and should be fixed if they are there.
>> ..

> I see the line about using the old Set syntax, but the examples and
> the rest of the notes imply that that you could just do x=5; rather
> than ${x}=5; and get the same result either way.
Well, the process of declaring/assigning a value to a variable isn't the
same a refering a variable.
And the wiki example are correct, you can assign a value with "x=0;",
but to display this value
(by referring to the variable) you have to do "NoOp(${x});".


> Another question along these lines...  If I set a Global called
> "TRUNK" in the globals section and later assign do a TRUNK=whatever it
> appears that a local variable called TRUNK is created instead of using
> the global.  You must explicitly use the Set(GLOBAL(TRUNK)=whatever)
> syntax to alter the global.
And the question is ?





More information about the asterisk-users mailing list