Click or drag to resize
OriginateAction Class
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.
Inheritance Hierarchy

Namespace: AsterNET.Manager.Action
Assembly: AsterNET (in AsterNET.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public class OriginateAction : ManagerActionEvent, 
	IActionVariable

The OriginateAction type exposes the following members.

Constructors
  NameDescription
Public methodOriginateAction
Initializes a new instance of the OriginateAction class
Top
Methods
  NameDescription
Public methodActionCompleteEventClass (Overrides ManagerActionEventActionCompleteEventClass.)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetVariable
Gets a variable on the originated call. Replaces any existing variable with the same name.
Public methodGetVariables
Get the variables dictionary to set on the originated call.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodSetVariable
Sets a variable dictionary on the originated call. Replaces any existing variable with the same name.
Public methodSetVariables
Set the variables dictionary to set on the originated call.
Public methodToString (Inherited from ManagerAction.)
Top
Properties
  NameDescription
Public propertyAccount
Get/Set 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.
Public propertyAction
Get the name of this action, i.e. "Originate".
(Overrides ManagerActionAction.)
Public propertyActionId (Inherited from ManagerAction.)
Public propertyApplication
Get/Set Application to use on connect (use Data for parameters)
Public propertyAsync
Get/Set true if this is a fast origination.
For the origination to be asynchronous (allows multiple calls to be generated without waiting for a response).
Will send OriginateSuccess- and OriginateFailureEvents.
Public propertyCallerId
Get/Set the caller id to set on the outgoing channel.
Public propertyChannel
Get/Set Channel on which to originate the call (The same as you specify in the Dial application command)
This property is required.
Public propertyContext
Get/Set 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.
Public propertyData
Get/Set the parameters to pass to the application. Data if Application parameter is user
Public propertyExten
Get/Ser the extension to connect to. If you set the extension you also have to set the context and priority properties.
Public propertyPriority
Get /Set the priority of the extension to connect to. If you set the priority you also have to set the context and exten properties.
Public propertyProxyKey (Inherited from ManagerAction.)
Public propertyServer
Specify a server to which to send your commands (x.x.x.x or hostname).
This should match the server name specified in your config file's "host" entry. If you do not specify a server, the proxy will pick the first one it finds -- fine in single-server configurations.
(Inherited from ManagerAction.)
Public propertyTimeout
Get/Set the timeout for the origination in milliseconds.
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.
Public propertyVariable Obsolete.
Get/Set the variables to set on the originated call.
Variable assignments are of the form "VARNAME=VALUE". You can specify multiple variable assignments separated by the '|' character.
Example: "VAR1=abc|VAR2=def" sets the channel variables VAR1 to "abc" and VAR2 to "def".
Top
See Also

Reference

[!:AsterNET.Manager.Event.OriginateSuccessEvent]
[!:AsterNET.Manager.Event.OriginateFailureEvent]