[asterisk-bugs] [JIRA] (ASTERISK-21178) Improve documentation for manager command Getvar, Setvar

Rusty Newton (JIRA) noreply at issues.asterisk.org
Wed Feb 27 15:02:19 CST 2013


     [ https://issues.asterisk.org/jira/browse/ASTERISK-21178?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rusty Newton updated ASTERISK-21178:
------------------------------------

    Description: 
Manager help text for command "Getvar" needs additional clarification on whether and how it accepts expressions and function calls.

{noformat}
14:40 <ra21vi> newtonr: :) I am using GetVar in AGI, and it returns val already set
14:40 <ra21vi> in AMI do getvar process any expression before returning the result?
14:43 <newtonr> ra21vi: yeah it should
14:47 <newtonr> ra21vi: but not sure about AGI, I don't use it much
14:47 <coreyf1513> ra21vi: no, in AMI getvar does not accept an expression as input, it accepts a variable name or a function call, so SHA1(junk) works for getvar, not ${SHA1(junk)}
14:48 -!- nickfennell [~nickfenne at unaffiliated/nickfennell] has joined #asterisk
14:49 <coreyf1513> oops, looks like it does process expressions but it expects the result of those expressions to be a variable name or function call
{noformat}

Current text is:

{noformat}
[Syntax]
Action: Getvar
[ActionID:] <value>
[Channel:] <value>
Variable: <value>

[Synopsis]
Gets a channel variable. 

[Description]
Get the value of a global or local channel variable.
NOTE: If a channel name is not provided then the variable is global.

[Arguments]
ActionID
    ActionID for this transaction. Will be returned.
Channel
    Channel to read variable from.
Variable
    Variable name.

[See Also]
Not available
{noformat}

Setvar needs the same.

  was:
Manager help text for command "Getvar" needs additional clarification on whether and how it accepts expressions and function calls.

{noformat}
14:40 <ra21vi> newtonr: :) I am using GetVar in AGI, and it returns val already set
14:40 <ra21vi> in AMI do getvar process any expression before returning the result?
14:43 <newtonr> ra21vi: yeah it should
14:47 <newtonr> ra21vi: but not sure about AGI, I don't use it much
14:47 <coreyf1513> ra21vi: no, in AMI getvar does not accept an expression as input, it accepts a variable name or a function call, so SHA1(junk) works for getvar, not ${SHA1(junk)}
14:48 -!- nickfennell [~nickfenne at unaffiliated/nickfennell] has joined #asterisk
14:49 <coreyf1513> oops, looks like it does process expressions but it expects the result of those expressions to be a variable name or function call
{noformat}

Current text is:

{noformat}
[Syntax]
Action: Getvar
[ActionID:] <value>
[Channel:] <value>
Variable: <value>

[Synopsis]
Gets a channel variable. 

[Description]
Get the value of a global or local channel variable.
NOTE: If a channel name is not provided then the variable is global.

[Arguments]
ActionID
    ActionID for this transaction. Will be returned.
Channel
    Channel to read variable from.
Variable
    Variable name.

[See Also]
Not available
{noformat}

    
> Improve documentation for manager command Getvar, Setvar
> --------------------------------------------------------
>
>                 Key: ASTERISK-21178
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-21178
>             Project: Asterisk
>          Issue Type: Improvement
>      Security Level: None
>          Components: Core/ManagerInterface
>    Affects Versions: 1.8.20.1, 11.2.1
>            Reporter: Rusty Newton
>            Severity: Trivial
>
> Manager help text for command "Getvar" needs additional clarification on whether and how it accepts expressions and function calls.
> {noformat}
> 14:40 <ra21vi> newtonr: :) I am using GetVar in AGI, and it returns val already set
> 14:40 <ra21vi> in AMI do getvar process any expression before returning the result?
> 14:43 <newtonr> ra21vi: yeah it should
> 14:47 <newtonr> ra21vi: but not sure about AGI, I don't use it much
> 14:47 <coreyf1513> ra21vi: no, in AMI getvar does not accept an expression as input, it accepts a variable name or a function call, so SHA1(junk) works for getvar, not ${SHA1(junk)}
> 14:48 -!- nickfennell [~nickfenne at unaffiliated/nickfennell] has joined #asterisk
> 14:49 <coreyf1513> oops, looks like it does process expressions but it expects the result of those expressions to be a variable name or function call
> {noformat}
> Current text is:
> {noformat}
> [Syntax]
> Action: Getvar
> [ActionID:] <value>
> [Channel:] <value>
> Variable: <value>
> [Synopsis]
> Gets a channel variable. 
> [Description]
> Get the value of a global or local channel variable.
> NOTE: If a channel name is not provided then the variable is global.
> [Arguments]
> ActionID
>     ActionID for this transaction. Will be returned.
> Channel
>     Channel to read variable from.
> Variable
>     Variable name.
> [See Also]
> Not available
> {noformat}
> Setvar needs the same.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list