AsterNet Class Library (Sandcastle documentation)

| 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
System
Object
AsterNET.Manager.Action
ManagerAction
AsterNET.Manager.Action
ManagerActionEvent
AsterNET.Manager.Action
OriginateAction

Namespace: AsterNET.Manager.Action
Assembly: AsterNET (in AsterNET.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
C++
F#
Copy

    public class OriginateAction : ManagerActionEvent,
    	IActionVariable

    Public Class OriginateAction
    	Inherits ManagerActionEvent
    	Implements IActionVariable

    public ref class OriginateAction : public ManagerActionEvent,
    	IActionVariable

    type OriginateAction =
        class
            inherit ManagerActionEvent
            interface IActionVariable
        end

The OriginateAction type exposes the following members.

Constructors

| Name | Description
--- | --- | ---
| OriginateAction | Initializes a new instance of the OriginateAction class

Top
Methods

| Name | Description
--- | --- | ---
| ActionCompleteEventClass | (Overrides ManagerActionEvent ActionCompleteEventClass .)
| Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
| Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
| GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
| GetType | Gets the Type of the current instance. (Inherited from Object.)
| GetVariable | Gets a variable on the originated call. Replaces any existing variable with the same name.
| GetVariables | Get the variables dictionary to set on the originated call.
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.)
| SetVariable | Sets a variable dictionary on the originated call. Replaces any existing variable with the same name.
| SetVariables | Set the variables dictionary to set on the originated call.
| ToString | (Inherited from ManagerAction.)

Top
Properties

| Name | Description
--- | --- | ---
| Account | 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.
| Action | Get the name of this action, i.e. "Originate". (Overrides ManagerAction Action.)
| ActionId | (Inherited from ManagerAction.)
| Application | Get/Set Application to use on connect (use Data for parameters)
| Async | 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.
| CallerId | Get/Set the caller id to set on the outgoing channel.
| Channel | Get/Set Channel on which to originate the call (The same as you specify in the Dial application command) This property is required.
| Context | 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.
| Data | Get/Set the parameters to pass to the application. Data if Application parameter is user
| Exten | Get/Ser the extension to connect to. If you set the extension you also have to set the context and priority properties.
| Priority | 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.
| ProxyKey | You can use this as a simple authentication mechanism. Rather than have to login with a username & password, you can specify a ProxyKey that must be passed from a client before requests are processed. This is helpful in situations where you would like to authenticate and execute an action in a single step. (Inherited from ManagerAction.)
| Server | 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.)
| Timeout | 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.
| Variable | 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.Action Namespace
[!:AsterNET.Manager.Event.OriginateSuccessEvent]
[!:AsterNET.Manager.Event.OriginateFailureEvent]