public class AgiReplyImpl extends Object implements AgiReply
SC_DEAD_CHANNEL, SC_INVALID_COMMAND_SYNTAX, SC_INVALID_OR_UNKNOWN_COMMAND, SC_SUCCESS, SC_TRYING| Modifier and Type | Method and Description |
|---|---|
String |
getAttribute(String name)
Returns an additional attribute contained in the reply.
|
protected Map<String,String> |
getAttributes() |
String |
getExtra()
Returns the text in parenthesis contained in this reply.
|
String |
getFirstLine()
Returns the first line of the raw reply.
|
List<String> |
getLines()
Returns a List containing the lines of the raw reply.
|
String |
getResult()
Returns the result, that is the part directly following the "result="
string.
|
int |
getResultCode()
Returns the return code (the result as int).
|
char |
getResultCodeAsChar()
Returns the return code as character.
|
int |
getStatus()
Returns the status code.
|
String |
getSynopsis()
Returns the synopsis of the command sent if Asterisk expected a different
syntax (getStatus() == SC_INVALID_COMMAND_SYNTAX).
|
String |
getUsage()
Returns the usage of the command sent if Asterisk expected a different
syntax (getStatus() == SC_INVALID_COMMAND_SYNTAX).
|
String |
toString() |
public String getFirstLine()
AgiReplygetFirstLine in interface AgiReplypublic List<String> getLines()
AgiReplypublic int getResultCode()
AgiReplygetResultCode in interface AgiReplypublic char getResultCodeAsChar()
AgiReplygetResultCodeAsChar in interface AgiReplypublic String getResult()
AgiReplypublic int getStatus()
AgiReplySupported status codes are:
getStatus in interface AgiReplyAgiReply.SC_TRYING,
AgiReply.SC_SUCCESS,
AgiReply.SC_INVALID_OR_UNKNOWN_COMMAND,
AgiReply.SC_DEAD_CHANNEL,
AgiReply.SC_INVALID_COMMAND_SYNTAXpublic String getAttribute(String name)
AgiReplyFor example the reply to the StreamFileCommand contains an additional endpos attribute indicating the frame where the playback was stopped. This can be retrieved by calling getAttribute("endpos") on the corresponding reply.
getAttribute in interface AgiReplyname - the name of the attribute to retrieve. The name is case
insensitive.null if it is not
set.public String getExtra()
AgiReplyThe meaning of this property depends on the command sent. Sometimes it contains a flag like "timeout" or "hangup" or - in case of the GetVariableCommand - the value of the variable.
public String getSynopsis()
AgiReplygetSynopsis in interface AgiReplynull if there
were no syntax errors.public String getUsage()
Copyright © 2004–2021. All rights reserved.