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
But GET FULL VARIABLE just returns the NAME of the variable
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)
3 thoughts on - AGI: “Get Variable” Returns Variable VALUE Vs “Get Full Variable” Returns Variable NAME – Bug Or My Misunderstanding?
I believe the syntax you are looking for is:
GET FULL VARIABLE ${myVar}
Kind regards, Sean
—
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!
These wiki pages are automatically generated from the source code[1], so the best place would be the Asterisk Issues Tracker[2]. Even better would be to attach a patch to the issue you create which beefs up the documentation to your liking.
Kind regards, Sean
[1] https://github.com/asterisk/asterisk/blob/17/res/res_agi.c#L321-L341
[2] https://issues.asterisk.org/
—