public interface ManagerAction extends Serializable
Instances of this class represent a command sent to Asterisk via Manager API, requesting a particular Action be performed. The number of actions available to the client are determined by the modules presently loaded in the Asterisk engine.
There is one conrete subclass of ManagerAction per each supported Asterisk Action.
Modifier and Type | Method and Description |
---|---|
String |
getAction()
Returns the name of the action for example "Hangup".
|
String |
getActionId()
Returns the action id.
|
void |
setActionId(String actionId)
Sets the action id.
|
String getAction()
String getActionId()
void setActionId(String actionId)
If the action id is set and sent to the asterisk server any response returned by the Asterisk server will include the same id. This way the action id can be used to track actions and their corresponding responses and response events.
Note that Asterisk-Java uses its own internal action id to match actions with the corresponding responses and events. Though the internal action is never exposed to the application code. So if you want to handle reponses or response events on your own your application must set a unique action id using this method otherwise the action id of the reponse and response event objects passed to your application will be null.
actionId
- the user provided action id to set.ManagerResponse.getActionId()
,
ResponseEvent.getActionId()
Copyright © 2004–2017. All rights reserved.