public class GetFullVariableCommand extends AbstractAgiCommand
Evaluates the given expression against the channel specified by channelname, or the current channel if channelname is not provided.
Unlike GET VARIABLE, the expression is processed in a manner similar to dialplan evaluation,
allowing complex and built-in variables to be accessed, e.g. The time is ${EPOCH}
Returns 0 if no channel matching channelname exists, 1 otherwise.
Example return code: 200 result=1 (testvariable)
| Constructor and Description |
|---|
GetFullVariableCommand(String variable)
Creates a new GetFullVariableCommand.
|
GetFullVariableCommand(String variable,
String channel)
Creates a new GetFullVariableCommand.
|
| Modifier and Type | Method and Description |
|---|---|
String |
buildCommand()
Returns a string suitable to be sent to asterisk.
|
String |
getChannel()
Returns the name of the channel.
|
String |
getVariable()
Returns the name of the variable to retrieve.
|
void |
setChannel(String channel)
Sets the name of the channel.
|
void |
setVariable(String variable)
Sets the name of the variable to retrieve.
|
escapeAndQuote, escapeAndQuote, setAsteriskVersion, toStringpublic GetFullVariableCommand(String variable)
variable - the name of the variable to retrieve.public String getVariable()
public void setVariable(String variable)
You can also use custom dialplan functions (like "func(args)") as variable.
variable - the name of the variable to retrieve.public String getChannel()
public void setChannel(String channel)
channel - the name of the channel.public String buildCommand()
AgiCommandbuildCommand in interface AgiCommandbuildCommand in class AbstractAgiCommandCopyright © 2004–2024. All rights reserved.