public class GetVariableCommand extends AbstractAgiCommand
Since Asterisk 1.2 you can also use this command to use custom Asterisk functions. Syntax is "func(args)".
Returns 0 if the variable is not set. Returns 1 if the variable is set and returns the variable in parenthesis.
Example return code: 200 result=1 (testvariable)
| Constructor and Description |
|---|
GetVariableCommand(String variable)
Creates a new GetVariableCommand.
|
| Modifier and Type | Method and Description |
|---|---|
String |
buildCommand()
Returns a string suitable to be sent to asterisk.
|
String |
getVariable()
Returns the name of the variable to retrieve.
|
void |
setVariable(String variable)
Sets the name of the variable to retrieve.
|
escapeAndQuote, escapeAndQuote, setAsteriskVersion, toStringpublic GetVariableCommand(String variable)
variable - the name of the variable to retrieve.public String getVariable()
public void setVariable(String variable)
Since Asterisk 1.2 you can also use custom dialplan functions (like "func(args)") as variable.
variable - the name of the variable to retrieve.public String buildCommand()
AgiCommandbuildCommand in interface AgiCommandbuildCommand in class AbstractAgiCommandCopyright © 2004–2021. All rights reserved.