|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.asterisk.manager.action.AbstractManagerAction net.sf.asterisk.manager.action.OriginateAction
public class OriginateAction
The OriginateAction generates an outgoing call to the extension in the given
context with the given priority or to a given application with optional
parameters.
If you want to connect to an extension use the properties context, exten and
priority. If you want to connect to an application use the properties
application and data if needed. Note that no call detail record will be
written when directly connecting to an application, so it may be better to
connect to an extension that starts the application you wish to connect to.
The response to this action is sent when the channel has been answered and
asterisk starts connecting it to the given extension. So be careful not to
choose a too short timeout when waiting for the response.
If you set async to true
Asterisk reports an OriginateSuccess-
and OriginateFailureEvents. The action id of these events equals the action
id of this OriginateAction.
OriginateSuccessEvent
,
OriginateFailureEvent
,
Serialized FormConstructor Summary | |
---|---|
OriginateAction()
|
Method Summary | |
---|---|
java.lang.String |
getAccount()
Returns the account code to use for the originated call. |
java.lang.String |
getAction()
Returns the name of this action, i.e. |
java.lang.Class |
getActionCompleteEventClass()
Returns the event type that indicates that Asterisk is finished sending response events for this action. |
java.lang.String |
getApplication()
Returns the name of the application to connect to. |
java.lang.Boolean |
getAsync()
Returns true if this is a fast origination. |
java.lang.String |
getCallerId()
Returns the caller id to set on the outgoing channel. |
java.lang.Boolean |
getCallingPres()
Returns true if Caller ID presentation is set on the
outgoing channel. |
java.lang.String |
getChannel()
Returns the name of the channel to connect to the outgoing call. |
java.lang.String |
getContext()
Returns the name of the context of the extension to connect to. |
java.lang.String |
getData()
Returns the parameters to pass to the application. |
java.lang.String |
getExten()
Returns the extension to connect to. |
java.lang.Integer |
getPriority()
Returns the priority of the extension to connect to. |
java.lang.Long |
getTimeout()
Returns the timeout for the origination. |
java.util.Map |
getVariables()
Returns the variables to set on the originated call. |
void |
setAccount(java.lang.String account)
Sets the account code to use for the originated call. The account code is included in the call detail record generated for this call and will be used for billing. |
void |
setApplication(java.lang.String application)
Sets the name of the application to connect to. |
void |
setAsync(java.lang.Boolean async)
Set to true for fast origination. |
void |
setCallerId(java.lang.String callerId)
Sets the caller id to set on the outgoing channel. |
void |
setCallingPres(java.lang.Boolean callingPres)
Set to true if you want Caller ID presentation to be set
on the outgoing channel. |
void |
setChannel(java.lang.String channel)
Sets the name of the channel to connect to the outgoing call. This property is required. |
void |
setContext(java.lang.String context)
Sets the name of the context of the extension to connect to. If you set the context you also have to set the exten and priority properties. |
void |
setData(java.lang.String data)
Sets the parameters to pass to the application. |
void |
setExten(java.lang.String exten)
Sets the extension to connect to. If you set the extension you also have to set the context and priority properties. |
void |
setPriority(java.lang.Integer priority)
Sets the priority of the extension to connect to. |
void |
setTimeout(java.lang.Integer timeout)
Deprecated. use setTimeout(Long) instead. |
void |
setTimeout(java.lang.Long timeout)
Sets the timeout (in milliseconds) for the origination. The channel must be answered within this time, otherwise the origination is considered to have failed and an OriginateFailureEvent is generated. If not set, Asterisk assumes a default value of 30000 meaning 30 seconds. |
void |
setVariable(java.lang.String variable)
Deprecated. use setVariables(Map) instead. |
void |
setVariables(java.util.Map variables)
Sets the variables to set on the originated call. |
Methods inherited from class net.sf.asterisk.manager.action.AbstractManagerAction |
---|
getActionId, setActionId, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface net.sf.asterisk.manager.action.ManagerAction |
---|
getActionId, setActionId |
Constructor Detail |
---|
public OriginateAction()
Method Detail |
---|
public java.lang.String getAction()
getAction
in interface ManagerAction
getAction
in class AbstractManagerAction
public java.lang.String getAccount()
public void setAccount(java.lang.String account)
public java.lang.String getCallerId()
public void setCallerId(java.lang.String callerId)
public java.lang.Boolean getCallingPres()
true
if Caller ID presentation is set on the
outgoing channel.
public void setCallingPres(java.lang.Boolean callingPres)
true
if you want Caller ID presentation to be set
on the outgoing channel.
public java.lang.String getChannel()
public void setChannel(java.lang.String channel)
public java.lang.String getContext()
public void setContext(java.lang.String context)
public java.lang.String getExten()
public void setExten(java.lang.String exten)
public java.lang.Integer getPriority()
public void setPriority(java.lang.Integer priority)
public java.lang.String getApplication()
public void setApplication(java.lang.String application)
public java.lang.String getData()
public void setData(java.lang.String data)
public java.lang.Long getTimeout()
public void setTimeout(java.lang.Integer timeout)
setTimeout(Long)
instead.
timeout
- the timeout in millisecondspublic void setTimeout(java.lang.Long timeout)
timeout
- the timeout in millisecondspublic void setVariable(java.lang.String variable)
setVariables(Map)
instead.
public java.util.Map getVariables()
variables
- a Map containing the variable names as key and their
values as value.public void setVariables(java.util.Map variables)
variables
- a Map containing the variable names as key and their
values as value.public java.lang.Boolean getAsync()
public void setAsync(java.lang.Boolean async)
public java.lang.Class getActionCompleteEventClass()
EventGeneratingAction
getActionCompleteEventClass
in interface EventGeneratingAction
ResponseEvent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |