Click or drag to resize
ManagerConnection Class
Default implemention of the ManagerConnection interface.
Inheritance Hierarchy
SystemObject
  AsterNET.ManagerManagerConnection

Namespace: AsterNET.Manager
Assembly: AsterNET (in AsterNET.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public class ManagerConnection

The ManagerConnection type exposes the following members.

Constructors
  NameDescription
Public methodManagerConnection
Creates a new instance.
Public methodManagerConnection(String, Int32, String, String)
Creates a new instance with the given connection parameters.
Public methodManagerConnection(String, Int32, String, String, Encoding)
Creates a new instance with the given connection parameters.
Top
Methods
  NameDescription
Public methodBuildAction(ManagerAction)
Public methodBuildAction(ManagerAction, String)
Protected methodconnect
Protected methoddetermineVersion
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 methodGetProtocolIdentifier
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodIsConnected
Returns true if there is a socket connection to the asterisk server, false otherwise.
Public methodLogin
Logs in to the Asterisk manager using asterisk's MD5 based challenge/response protocol. The login is delayed until the protocol identifier has been received by the reader.
Public methodLogin(Int32)
Log in to the Asterisk manager using asterisk's MD5 based challenge/response protocol. The login is delayed until the protocol identifier has been received by the reader.
Public methodLogoff
Sends a LogoffAction and disconnects from the server.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodRegisterUserEventClass
Register User Event Class
Public methodSendAction(ManagerAction)
Send Action with default timeout.
Public methodSendAction(ManagerAction, ResponseHandler)
Public methodSendAction(ManagerAction, Int32)
Send action ans with timeout (milliseconds)
Public methodSendEventGeneratingAction(ManagerActionEvent)
Public methodSendEventGeneratingAction(ManagerActionEvent, Int32)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Fields
  NameDescription
Public fieldUseASyncEvents
Allows you to specifiy how events are fired. If false (default) then events will be fired in order. Otherwise events will be fired as they arrive and control logic in your application will need to handle synchronization.
Public fieldVAR_DELIMITER
Top
Properties
  NameDescription
Public propertyAsteriskVersion
Public propertyDefaultEventTimeout
Sets the time in milliseconds the synchronous method will wait for a response and the last response event before throwing a TimeoutException.
Default is 5000.
Public propertyDefaultResponseTimeout
Sets the time in milliseconds the synchronous method will wait for a response before throwing a TimeoutException.
Default is 2000.
Public propertyFireAllEvents
If this property set to true then ManagerConnection send all unassigned events to UnhandledEvent handler,
if set to false then all unassgned events lost and send only UnhandledEvent.
Default: false
Public propertyHostname
Sets the hostname of the asterisk server to connect to.
Default is localhost.
Public propertyKeepAlive
Should we attempt to reconnect when the connection is lost?
This is set to true after successful login and to false after logoff or after an authentication failure when keepAliveAfterAuthenticationFailure is false.
Public propertyKeepAliveAfterAuthenticationFailure
Set to true to try reconnecting to ther asterisk serve even if the reconnection attempt threw an AuthenticationFailedException.
Default is false.
Public propertyPassword
Sets the password to use to connect to the asterisk server. This is the password specified in asterisk's manager.conf file.
Public propertyPingInterval
Timeout from Ping to Pong. If no Pong received send Disconnect event. Set to zero to disable.
Public propertyPort
Sets the port to use to connect to the asterisk server. This is the port specified in asterisk's manager.conf file.
Default is 5038.
Public propertyReconnectIntervalFast
Default Fast Reconnect interval in milliseconds.
Public propertyReconnectIntervalMax
Default Slow Reconnect interval in milliseconds.
Public propertyReconnectRetryFast
Default Fast Reconnect retry counter.
Public propertyReconnectRetryMax
Default Maximum Reconnect retry counter.
Public propertySleepTime
Sets the time in milliseconds the synchronous methods SendAction(Action.ManagerAction) and SendAction(Action.ManagerAction, long) will sleep between two checks for the arrival of a response. This value should be rather small.
The sleepTime attribute is also used when checking for the protocol identifer.
Default is 50.
Public propertySocketEncoding
Socket Encoding - default ASCII
Public propertyUsername
Sets the username to use to connect to the asterisk server. This is the username specified in asterisk's manager.conf file.
Public propertyVersion
Top
See Also