net.sf.asterisk.manager
Class Originate

java.lang.Object
  extended by net.sf.asterisk.manager.Originate

public class Originate
extends java.lang.Object

Author:
Ben Hencke

Constructor Summary
Originate()
           
 
Method Summary
 java.lang.String getAccount()
          Returns the account code to use for the originated call.
 java.lang.String getApplication()
          Returns the name of the application to connect to.
 java.lang.String getCallerId()
          Returns the caller id to 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.
 java.lang.String getVariableString()
          Deprecated. This method is no longer needed and will be removed in the next version of Asterisk-Java.
 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 setCallerId(java.lang.String callerId)
          Sets the caller id to 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.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, a default value of 30000 is asumed meaning 30 seconds.
 void setVariable(java.lang.String name, java.lang.String value)
          Sets a variable on the originated call.
 void setVariables(java.util.Map variables)
          Sets the variables to set on the originated call.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Originate

public Originate()
Method Detail

getAccount

public java.lang.String getAccount()
Returns the account code to use for the originated call.


setAccount

public 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.


getCallerId

public java.lang.String getCallerId()
Returns the caller id to set on the outgoing channel.


setCallerId

public void setCallerId(java.lang.String callerId)
Sets the caller id to set on the outgoing channel.


getChannel

public java.lang.String getChannel()
Returns the name of the channel to connect to the outgoing call.


setChannel

public void setChannel(java.lang.String channel)
Sets the name of the channel to connect to the outgoing call.
This property is required.


getContext

public java.lang.String getContext()
Returns the name of the context of the extension to connect to.


setContext

public 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.


getExten

public java.lang.String getExten()
Returns the extension to connect to.


setExten

public 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.


getPriority

public java.lang.Integer getPriority()
Returns the priority of the extension to connect to.


setPriority

public void setPriority(java.lang.Integer priority)
Sets the priority of the extension to connect to. If you set the priority you also have to set the context and exten properties.


getApplication

public java.lang.String getApplication()
Returns the name of the application to connect to.


setApplication

public void setApplication(java.lang.String application)
Sets the name of the application to connect to.


getData

public java.lang.String getData()
Returns the parameters to pass to the application.


setData

public void setData(java.lang.String data)
Sets the parameters to pass to the application.


getTimeout

public java.lang.Long getTimeout()
Returns the timeout for the origination.


setTimeout

public 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, a default value of 30000 is asumed meaning 30 seconds.


getVariables

public java.util.Map getVariables()
Returns the variables to set on the originated call.


setVariables

public void setVariables(java.util.Map variables)
Sets the variables to set on the originated call.


setVariable

public void setVariable(java.lang.String name,
                        java.lang.String value)
Sets a variable on the originated call. Replaces any existing variable with the same name.


getVariableString

public java.lang.String getVariableString()
Deprecated. This method is no longer needed and will be removed in the next version of Asterisk-Java.

Returns the variables to set on the originated call in native asterisk format.
Example: "VAR1=abc|VAR2=def".



Copyright © 2004-2005 Stefan Reuter. All Rights Reserved.