Jonathan H
2019-Dec-27 19:24 UTC
[asterisk-users] AGI: "Get variable" returns variable VALUE vs "Get full variable" returns variable NAME - bug or my misunderstanding?
Just trying out a node agi package (https://github.com/sergey12313/ts-agi/ , and it wasn't behaving as I expected, but when turning on agi debug, it looks like it might be Asterisk (using 17.1.0) This works as expected <Local/1000 at default-00000020;2>AGI Rx << SET VARIABLE myVar "Hello World!!!" <Local/1000 at default-00000020;2>AGI Tx >> 200 result=1 <Local/1000 at default-00000020;2>AGI Rx << GET VARIABLE myVar <Local/1000 at default-00000020;2>AGI Tx >> 200 result=1 (Hello World!!!) But GET FULL VARIABLE just returns the NAME of the variable <Local/1000 at default-0000001f;2>AGI Rx << SET VARIABLE myVar "Hello World!!!" <Local/1000 at default-0000001f;2>AGI Tx >> 200 result=1 <Local/1000 at default-0000001f;2>AGI Rx << GET FULL VARIABLE myVar <Local/1000 at default-0000001f;2>AGI Tx >> 200 result=1 (myVar) Is this a bug, poor documentation, or my poor understanding of them? https://wiki.asterisk.org/wiki/display/AST/Asterisk+17+AGICommand_get+full+variable GET FULL VARIABLE VARIABLENAME CHANNEL NAME Example return code: 200 result=1 (testvariable) https://wiki.asterisk.org/wiki/display/AST/Asterisk+17+AGICommand_get+variable GET VARIABLE VARIABLENAME Example return code: 200 result=1 (testvariable) -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20191227/2e571643/attachment.html>
Sean Bright
2019-Dec-27 19:35 UTC
[asterisk-users] AGI: "Get variable" returns variable VALUE vs "Get full variable" returns variable NAME - bug or my misunderstanding?
On 12/27/2019 2:24 PM, Jonathan H wrote:> <Local/1000 at default-0000001f;2>AGI Rx << SET VARIABLE myVar "Hello > World!!!" > <Local/1000 at default-0000001f;2>AGI Tx >> 200 result=1 > <Local/1000 at default-0000001f;2>AGI Rx << GET FULL VARIABLE myVar > <Local/1000 at default-0000001f;2>AGI Tx >> 200 result=1 (myVar) > > Is this a bug, poor documentation, or my poor understanding of them?I believe the syntax you are looking for is: GET FULL VARIABLE ${myVar} Kind regards, Sean
Jonathan H
2019-Dec-27 19:56 UTC
[asterisk-users] AGI: "Get variable" returns variable VALUE vs "Get full variable" returns variable NAME - bug or my misunderstanding?
OK, that works - looks like a documentation bug? (Also very confusing!) Should I report it on the page at https://wiki.asterisk.org/wiki/display/AST/Asterisk+17+AGICommand_get+full+variable or on the main tracker? Many thanks - couldn't figure out what was wrong! On Fri, 27 Dec 2019 at 19:36, Sean Bright <sean.bright at gmail.com> wrote:> On 12/27/2019 2:24 PM, Jonathan H wrote: > > <Local/1000 at default-0000001f;2>AGI Rx << SET VARIABLE myVar "Hello > > World!!!" > > <Local/1000 at default-0000001f;2>AGI Tx >> 200 result=1 > > <Local/1000 at default-0000001f;2>AGI Rx << GET FULL VARIABLE myVar > > <Local/1000 at default-0000001f;2>AGI Tx >> 200 result=1 (myVar) > > > > Is this a bug, poor documentation, or my poor understanding of them? > > I believe the syntax you are looking for is: > > GET FULL VARIABLE ${myVar} > > Kind regards, > Sean > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > Check out the new Asterisk community forum at: > https://community.asterisk.org/ > > New to Asterisk? Start here: > https://wiki.asterisk.org/wiki/display/AST/Getting+Started > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20191227/4c50894c/attachment.html>
Reasonably Related Threads
- AGI: "Get variable" returns variable VALUE vs "Get full variable" returns variable NAME - bug or my misunderstanding?
- AGI: "Get variable" returns variable VALUE vs "Get full variable" returns variable NAME - bug or my misunderstanding?
- How can I use the "GET VARIABLE variablename" in AGI
- Combining all possible values of variables into a new...
- svychisq using two frames