public class AgiAction extends AbstractManagerAction implements EventGeneratingAction
It will append the application to the specified channel's queue. If the channel is not inside Async AGI application it will return an error.
It is implemented in res/res_agi.c
Available since Asterisk 1.6
AsyncAgiEvent
,
Serialized FormConstructor and Description |
---|
AgiAction()
Creates a new empty AgiAction.
|
AgiAction(String channel,
String command)
Creates a new AgiAction with channel and command.
|
AgiAction(String channel,
String command,
String commandId)
Creates a new AgiAction with channel, command and commandId.
|
Modifier and Type | Method and Description |
---|---|
String |
getAction()
Returns the name of this action.
|
Class<? extends ResponseEvent> |
getActionCompleteEventClass()
Returns the event type that indicates that Asterisk is finished sending
response events for this action.
|
String |
getChannel()
Returns the name of the channel to execute the AGI command on.
|
String |
getCommand()
Returns the AGI command to execute.
|
String |
getCommandId()
Returns the command id to track execution progress.
|
void |
setChannel(String channel)
Sets the name of the channel to execute the AGI command on.
|
void |
setCommand(String command)
Sets the AGI command to execute.
|
void |
setCommandId(String commandId)
Sets the command id to track execution progress.
|
getActionId, setActionId, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getActionId, setActionId
public AgiAction()
public AgiAction(String channel, String command)
channel
- the name of the channel to execute the AGI command on.command
- the AGI command to execute.public AgiAction(String channel, String command, String commandId)
channel
- the name of the channel to execute the AGI command on.command
- the AGI command to execute.commandId
- the command id to track execution progress.public String getAction()
getAction
in interface ManagerAction
getAction
in class AbstractManagerAction
public Class<? extends ResponseEvent> getActionCompleteEventClass()
EventGeneratingAction
getActionCompleteEventClass
in interface EventGeneratingAction
ResponseEvent
public String getChannel()
public void setChannel(String channel)
The channel must be running the Async AGI application "AGI(agi:async)".
This property is required.
channel
- the name of the channel to execute the AGI command on.public String getCommand()
public void setCommand(String command)
This property is required.
command
- the AGI command to execute.public String getCommandId()
public void setCommandId(String commandId)
This value will be sent back in the CommandID header of AsyncAGI exec event notifications.
commandId
- the command id to track execution progress.Copyright © 2004–2020. All rights reserved.