GenericCSTAp2 Class Reference

Inheritance diagram for GenericCSTAp2:
SiemensHipath3000p2 IETF_CSTAp2 Alcatel4400 AlcatelOXE

List of all members.

Public Member Functions

virtual CSTAResponseInfo AnswerCall (ConnectionID callToAnswer, string deviceToLift)
virtual CSTAResponseInfo AnswerCall (ConnectionID callToAnswer)
virtual CSTAResponseInfo AnswerCall (string deviceToLift)
virtual CSTAResponseInfo ClearConnection (ConnectionID connToClear)
virtual CSTAResponseInfo ClearDoNotDisturb (string targetDevice)
virtual CSTAResponseInfo ClearMessageWaiting (string targetDevice)
virtual CSTAResponseInfo ConsultationCall (ConnectionID existingCall, string targetDevice)
virtual CSTAResponseInfo DivertCall (string divertFrom, string divertTo)
int EncodeROSERequestHeader (CSTAResponseInfo response, Asn1BerEncodeBuffer encodeBuffer, Phase2Opcodes.Opcodes opcode)
 GenericCSTAp2 (PBXSession sessionObject)
 GenericCSTAp2 (string pbxSystem, int port)
virtual CSTAResponseInfo MakeACSEAssociation ()
virtual CSTAResponseInfo MakeCall (string callingDevice, string calledDevice)
virtual CSTAResponseInfo MonitorStart (ConnectionID callToMonitor)
virtual CSTAResponseInfo MonitorStart (string deviceToMonitor)
virtual CSTAResponseInfo MonitorStop (string monitoredDevice)
virtual CSTAResponseInfo MonitorStop (MonitorCrossRefID crossRefID)
virtual CSTAResponseInfo MonitorStop (int crossRefInt)
virtual CSTAResponseInfo QueryDevice (string deviceToQuery)
virtual CSTAResponseInfo ReleaseACSEAssociation ()
virtual CSTAResponseInfo RetrieveCall (ConnectionID callToRetrieve)
virtual CSTAResponseInfo SetDoNotDisturb (string targetDevice)
virtual CSTAResponseInfo SetMessageWaiting (string targetDevice)
virtual CSTAResponseInfo SnapshotDevice (string deviceToSnapshot)
virtual CSTAResponseInfo TransferCall (string heldDevice, string connectedDevice)
virtual CSTAResponseInfo TransferCall (ConnectionID initiatedCall, ConnectionID originalCall)

Protected Member Functions

virtual int EncodeACSEConnectionRequest (CSTAResponseInfo response, Asn1BerEncodeBuffer encodeBuffer)
virtual int EncodeACSEReleaseRequest (CSTAResponseInfo response, Asn1BerEncodeBuffer encodeBuffer)
virtual int EncodeAnswerCallRequest (CSTAResponseInfo response, Asn1BerEncodeBuffer encodeBuffer, ConnectionID callToAnswer, string deviceToLift)
virtual int EncodeAnswerCallRequest (CSTAResponseInfo response, Asn1BerEncodeBuffer encodeBuffer, ConnectionID callToAnswer)
virtual int EncodeAnswerCallRequest (CSTAResponseInfo response, Asn1BerEncodeBuffer encodeBuffer, string deviceToLift)
virtual int EncodeClearConnectionRequest (CSTAResponseInfo response, Asn1BerEncodeBuffer encodeBuffer, ConnectionID connToClear)
virtual int EncodeConsultationCallRequest (CSTAResponseInfo response, Asn1BerEncodeBuffer encodeBuffer, ConnectionID existingCall, string targetDevice)
virtual int EncodeDivertCallRequest (CSTAResponseInfo response, Asn1BerEncodeBuffer encodeBuffer, string divertFrom, string divertTo)
virtual int EncodeMakeCallRequest (CSTAResponseInfo response, Asn1BerEncodeBuffer encodeBuffer, string callingDevice, string calledDevice)
virtual int EncodeMonitorStartRequest (CSTAResponseInfo response, Asn1BerEncodeBuffer encodeBuffer, ConnectionID callToMonitor)
virtual int EncodeMonitorStartRequest (CSTAResponseInfo response, Asn1BerEncodeBuffer encodeBuffer, string deviceToMonitor)
virtual int EncodeMonitorStopRequest (CSTAResponseInfo response, Asn1BerEncodeBuffer encodeBuffer, MonitorCrossRefID crossRefObj)
virtual int EncodeMonitorStopRequest (CSTAResponseInfo response, Asn1BerEncodeBuffer encodeBuffer, int crossRefInt, out MonitorCrossRefID crossRefID)
virtual int EncodeQueryDeviceRequest (CSTAResponseInfo response, Asn1BerEncodeBuffer encodeBuffer, string deviceToQuery)
virtual int EncodeRetrieveCallRequest (CSTAResponseInfo response, Asn1BerEncodeBuffer encodeBuffer, ConnectionID callToRetrieve)
virtual int EncodeSetOrClearDNDRequest (CSTAResponseInfo response, Asn1BerEncodeBuffer encodeBuffer, string targetDevice, bool dndOn)
virtual int EncodeSetOrClearMWRequest (CSTAResponseInfo response, Asn1BerEncodeBuffer encodeBuffer, string targetDevice, bool indicatorOn)
virtual int EncodeSnapshotDeviceRequest (CSTAResponseInfo response, Asn1BerEncodeBuffer encodeBuffer, string deviceToSnapshot)
virtual int EncodeTransferCallRequest (CSTAResponseInfo response, Asn1BerEncodeBuffer encodeBuffer, string heldDevice, string connectedDevice)
virtual int EncodeTransferCallRequest (CSTAResponseInfo response, Asn1BerEncodeBuffer encodeBuffer, ConnectionID initiatedCall, ConnectionID originalCall)

Properties

PBXSession SessionObject [get]
CSTAContext ThreadContext [get]

Detailed Description

Implements CSTA phase 2 operations using BER. Note that most PBXes don't support all CSTA messages, so some methods in this class may result in an error status being returned by your PBX.


Constructor & Destructor Documentation

GenericCSTAp2 ( string  pbxSystem,
int  port 
)

Constructs an instance associated with the given PBX identifier and port.

Parameters:
pbxSystem Well-known name or IP address of the PBX.
port Port on which the PBX listens for CSTA messages.
GenericCSTAp2 ( PBXSession  sessionObject  ) 

Constructs an instance associated with the given PBXSession object.

Parameters:
sessionObject A PBXSession object.

Member Function Documentation

virtual CSTAResponseInfo AnswerCall ( ConnectionID  callToAnswer,
string  deviceToLift 
) [virtual]

Answers a call.

Parameters:
callToAnswer The connection id of the call to answer.
deviceToLift The device (e.g., extension number) that is to answer the call.
Returns:
A CSTAResponseInfo object.
virtual CSTAResponseInfo AnswerCall ( ConnectionID  callToAnswer  )  [virtual]

Answers a call.

Parameters:
callToAnswer The ConnectionID of the call to answer.
Returns:
A CSTAResponseInfo object.
virtual CSTAResponseInfo AnswerCall ( string  deviceToLift  )  [virtual]

Answers a call.

Parameters:
deviceToLift The identification (e.g., phone number) of the device to answer.
Returns:
A CSTAResponseInfo object.
virtual CSTAResponseInfo ClearConnection ( ConnectionID  connToClear  )  [virtual]

Clears a connection.

Parameters:
connToClear The ConnectionID of the connection to clear.
Returns:
A CSTAResponseInfo object.
virtual CSTAResponseInfo ClearDoNotDisturb ( string  targetDevice  )  [virtual]

Turns off the Do Not Disturb functionality for a phone.

Parameters:
targetDevice The device for which the Do Not Disturb functionality is to be turned off.
Returns:
A CSTAResponseInfo object.
virtual CSTAResponseInfo ClearMessageWaiting ( string  targetDevice  )  [virtual]

Turns off the message waiting indicator on a device's display.

Parameters:
targetDevice The device for which the indicator is to be turned off.
Returns:
A CSTAResponseInfo object.
virtual CSTAResponseInfo ConsultationCall ( ConnectionID  existingCall,
string  targetDevice 
) [virtual]

Instruct the PBX to do a consultation call.

Parameters:
existingCall The connection id of the call for which the consultation call will be made.
targetDevice Identifier (e.g., phone number) of the device that is the target of the consultation call.
Returns:
A CSTAResponseInfo object.
virtual CSTAResponseInfo DivertCall ( string  divertFrom,
string  divertTo 
) [virtual]

Diverts a call from a source to a destination.

Parameters:
divertFrom Identifier (e.g., phone number) of the device from which the call is to be diverted.
divertTo Identifier (e.g., phone number) of the device to which the call is to be diverted.
Returns:
A CSTAResponseInfo object.
virtual int EncodeACSEConnectionRequest ( CSTAResponseInfo  response,
Asn1BerEncodeBuffer  encodeBuffer 
) [protected, virtual]

Encodes an ACSE Association Request message.

Parameters:
response A CSTA ResponseInfo object.
encodeBuffer An encode buffer object into which the message will be encoded.
Returns:
The length of the encoded message, or -1 if an error occurred.

Reimplemented in Alcatel4400.

virtual int EncodeACSEReleaseRequest ( CSTAResponseInfo  response,
Asn1BerEncodeBuffer  encodeBuffer 
) [protected, virtual]

Encodes an ACSE Release Request message.

Parameters:
response A CSTA ResponseInfo object.
encodeBuffer An encode buffer object into which the message will be encoded.
Returns:
The length of the encoded message, or -1 if an error occurred.
virtual int EncodeAnswerCallRequest ( CSTAResponseInfo  response,
Asn1BerEncodeBuffer  encodeBuffer,
ConnectionID  callToAnswer,
string  deviceToLift 
) [protected, virtual]

Encodes an AnswerCall message.

Parameters:
response A CSTA ResponseInfo object.
encodeBuffer An encode buffer object into which the message will be encoded.
callToAnswer The ConnectionID of the call to answer.
deviceToLift The identification (e.g., phone number) of the device to answer.
Returns:
The length of the encoded message, or -1 if an error occurred.
virtual int EncodeAnswerCallRequest ( CSTAResponseInfo  response,
Asn1BerEncodeBuffer  encodeBuffer,
ConnectionID  callToAnswer 
) [protected, virtual]

Encodes an AnswerCall message.

Parameters:
response A CSTA ResponseInfo object.
encodeBuffer An encode buffer object into which the message will be encoded.
callToAnswer The ConnectionID of the call to answer.
Returns:
The length of the encoded message, or -1 if an error occurred.
virtual int EncodeAnswerCallRequest ( CSTAResponseInfo  response,
Asn1BerEncodeBuffer  encodeBuffer,
string  deviceToLift 
) [protected, virtual]

Encodes an AnswerCall message.

Parameters:
response A CSTA ResponseInfo object.
encodeBuffer An encode buffer object into which the message will be encoded.
deviceToLift The identification (e.g., phone number) of the device to answer.
Returns:
The length of the encoded message, or -1 if an error occurred.
virtual int EncodeClearConnectionRequest ( CSTAResponseInfo  response,
Asn1BerEncodeBuffer  encodeBuffer,
ConnectionID  connToClear 
) [protected, virtual]

Encodes a ClearConnection message.

Parameters:
response A CSTA ResponseInfo object.
encodeBuffer An encode buffer object into which the message will be encoded.
connToClear The ConnectionID of the connection to clear.
Returns:
The length of the encoded message, or -1 if an error occurred.
virtual int EncodeConsultationCallRequest ( CSTAResponseInfo  response,
Asn1BerEncodeBuffer  encodeBuffer,
ConnectionID  existingCall,
string  targetDevice 
) [protected, virtual]

Encodes a ConsultationCall message.

Parameters:
response A CSTA ResponseInfo object.
encodeBuffer An encode buffer object into which the message will be encoded.
existingCall The connection id of the call for which the consultation call will be made.
targetDevice Identifier (e.g., phone number) of the device that is the target of the consultation call.
Returns:
The length of the encoded message, or -1 if an error occurred.
virtual int EncodeDivertCallRequest ( CSTAResponseInfo  response,
Asn1BerEncodeBuffer  encodeBuffer,
string  divertFrom,
string  divertTo 
) [protected, virtual]

Encodes a DivertCall message.

Parameters:
response A CSTA ResponseInfo object.
encodeBuffer An encode buffer object into which the message will be encoded.
divertFrom Identifier (e.g., phone number) of the device from which the call is to be diverted.
divertTo Identifier (e.g., phone number) of the device to which the call is to be diverted.
Returns:
The length of the encoded message, or -1 if an error occurred.
virtual int EncodeMakeCallRequest ( CSTAResponseInfo  response,
Asn1BerEncodeBuffer  encodeBuffer,
string  callingDevice,
string  calledDevice 
) [protected, virtual]

Encodes a MakeCall message.

Parameters:
response A CSTA ResponseInfo object.
encodeBuffer An encode buffer object into which the message will be encoded.
callingDevice Identifier (e.g., phone number) of the device making the call.
calledDevice Identifier (e.g., phone number) of the device being called.
Returns:
The length of the encoded message, or -1 if an error occurred.

Reimplemented in Alcatel4400.

virtual int EncodeMonitorStartRequest ( CSTAResponseInfo  response,
Asn1BerEncodeBuffer  encodeBuffer,
ConnectionID  callToMonitor 
) [protected, virtual]

Encodes a MonitorStart message to monitor a call.

Parameters:
response A CSTA ResponseInfo object.
encodeBuffer An encode buffer object into which the message will be encoded.
callToMonitor The call to monitor.
Returns:
The length of the encoded message, or -1 if an error occurred.
virtual int EncodeMonitorStartRequest ( CSTAResponseInfo  response,
Asn1BerEncodeBuffer  encodeBuffer,
string  deviceToMonitor 
) [protected, virtual]

Encodes a MonitorStart message to monitor a device.

Parameters:
response A CSTA ResponseInfo object.
encodeBuffer An encode buffer object into which the message will be encoded.
deviceToMonitor Identifier (e.g., telephone number) of the device to monitor.
Returns:
The length of the encoded message, or -1 if an error occurred.
virtual int EncodeMonitorStopRequest ( CSTAResponseInfo  response,
Asn1BerEncodeBuffer  encodeBuffer,
MonitorCrossRefID  crossRefObj 
) [protected, virtual]

Encodes a MonitorStop message.

Parameters:
response A CSTA ResponseInfo object.
encodeBuffer An encode buffer object into which the message will be encoded.
crossRefObj The cross reference id of the monitor request as a MonitorCrossRefID object.
Returns:
The length of the encoded message, or -1 if an error occurred.
virtual int EncodeMonitorStopRequest ( CSTAResponseInfo  response,
Asn1BerEncodeBuffer  encodeBuffer,
int  crossRefInt,
out MonitorCrossRefID  crossRefID 
) [protected, virtual]

Encodes a MonitorStop message.

Parameters:
response A CSTA ResponseInfo object.
encodeBuffer An encode buffer object into which the message will be encoded.
crossRefInt The cross reference id of the monitor request as an integer.
crossRefID A reference to a variable of type MonitorCrossRefID that will be populated with a MonitorCrossRefID object that corresponds to the specified integer cross reference id.
Returns:
The length of the encoded message, or -1 if an error occurred.
virtual int EncodeQueryDeviceRequest ( CSTAResponseInfo  response,
Asn1BerEncodeBuffer  encodeBuffer,
string  deviceToQuery 
) [protected, virtual]

Encodes a QueryDevice message.

Parameters:
response A CSTA ResponseInfo object.
encodeBuffer An encode buffer object into which the message will be encoded.
deviceToQuery The identification (e.g., phone number) of the device to query.
Returns:
The length of the encoded message, or -1 if an error occurred.
virtual int EncodeRetrieveCallRequest ( CSTAResponseInfo  response,
Asn1BerEncodeBuffer  encodeBuffer,
ConnectionID  callToRetrieve 
) [protected, virtual]

Encodes a RetrieveCall message.

Parameters:
response A CSTA ResponseInfo object.
encodeBuffer An encode buffer object into which the message will be encoded.
callToRetrieve The ConnectionID of the call to retrieve.
Returns:
The length of the encoded message, or -1 if an error occurred.
int EncodeROSERequestHeader ( CSTAResponseInfo  response,
Asn1BerEncodeBuffer  encodeBuffer,
Phase2Opcodes.Opcodes  opcode 
)

This method prepends a ROSE header to an already encoded phase 2 CSTA message.

Parameters:
response A CSTAResponseInfo object, used to communicate any exception information back to the caller.
encodeBuffer An Asn1BerEncodeBuffer instance containing the already encoded CSTA message.
opcode The opcode enumeration for the operation that the encoded CSTA message describes.
Returns:
The length of the encoded message, including both the CSTA message and the ROSE header, or -1 if the encoding fails.
virtual int EncodeSetOrClearDNDRequest ( CSTAResponseInfo  response,
Asn1BerEncodeBuffer  encodeBuffer,
string  targetDevice,
bool  dndOn 
) [protected, virtual]

Encodes a SetFeature message.

Parameters:
response A CSTA ResponseInfo object.
encodeBuffer An encode buffer object into which the message will be encoded.
targetDevice The device for which Do Not Disturb is to be set or cleared.
dndOn If true, DoNotDisturb will be turned on. If false, DoNotDisturb will be turned off.
Returns:
The length of the encoded message, or -1 if an error occurred.
virtual int EncodeSetOrClearMWRequest ( CSTAResponseInfo  response,
Asn1BerEncodeBuffer  encodeBuffer,
string  targetDevice,
bool  indicatorOn 
) [protected, virtual]

Encodes a SetFeature message.

Parameters:
response A CSTA ResponseInfo object.
encodeBuffer An encode buffer object into which the message will be encoded.
targetDevice The device for which the indicator is to be turned on or off.
indicatorOn If true, the message waiting indicator is turned on. If false, the message waiting indicator is turned off.
Returns:
The length of the encoded message, or -1 if an error occurred.
virtual int EncodeSnapshotDeviceRequest ( CSTAResponseInfo  response,
Asn1BerEncodeBuffer  encodeBuffer,
string  deviceToSnapshot 
) [protected, virtual]

Encodes a SnapshotDevice message.

Parameters:
response A CSTA ResponseInfo object.
encodeBuffer An encode buffer object into which the message will be encoded.
deviceToSnapshot Identifier (e.g., phone number) of the device for which the snapshot is desired.
Returns:
The length of the encoded message, or -1 if an error occurred.
virtual int EncodeTransferCallRequest ( CSTAResponseInfo  response,
Asn1BerEncodeBuffer  encodeBuffer,
string  heldDevice,
string  connectedDevice 
) [protected, virtual]

Encodes a TransferCall message.

Parameters:
response A CSTA ResponseInfo object.
encodeBuffer An encode buffer object into which the message will be encoded.
heldDevice Identifier (e.g., phone number) of the device from which the call is transferred.
connectedDevice Identifier (e.g., phone number) of the device to which the call is transferred.
Returns:
The length of the encoded message, or -1 if an error occurred.
virtual int EncodeTransferCallRequest ( CSTAResponseInfo  response,
Asn1BerEncodeBuffer  encodeBuffer,
ConnectionID  initiatedCall,
ConnectionID  originalCall 
) [protected, virtual]

Encodes a TransferCall message.

Parameters:
response A CSTA ResponseInfo object.
encodeBuffer An encode buffer object into which the message will be encoded.
initiatedCall ConnectionID of the new call initiated by the consultation call. The initiatedCall member of the ConsultationCallResult class, for example, contains this ConnectionID.
originalCall ConnectionID of the original call. The somewhat confusingly named callingDevice member of the MakeCallResult class contains this ConnectionID, as does the establishedConnection member of the EstablishedEvent class.
Returns:
The length of the encoded message, or -1 if an error occurred.
virtual CSTAResponseInfo MakeACSEAssociation (  )  [virtual]

Establish an ACSE association with the PBX.

Returns:
A CSTAResponseInfo object.

Reimplemented in Alcatel4400.

virtual CSTAResponseInfo MakeCall ( string  callingDevice,
string  calledDevice 
) [virtual]

Instruct the PBX to place a call.

Parameters:
callingDevice Identifier (e.g., phone number) of the device making the call.
calledDevice Identifier (e.g., phone number) of the device being called.
Returns:
A CSTAResponseInfo object.
virtual CSTAResponseInfo MonitorStart ( ConnectionID  callToMonitor  )  [virtual]

Issues a MonitorStart request to the PBX to monitor a call.

Parameters:
callToMonitor The call to monitor.
Returns:
A CSTAResponseInfo object.
virtual CSTAResponseInfo MonitorStart ( string  deviceToMonitor  )  [virtual]

Issues a MonitorStart request to the PBX to monitor a device.

Parameters:
deviceToMonitor Identifier (e.g., telephone number) of the device to monitor.
Returns:
A CSTAResponseInfo object.
virtual CSTAResponseInfo MonitorStop ( string  monitoredDevice  )  [virtual]

This method stops all monitors active against the indicated device, regardless of what thread started the monitor. The method will only stop monitors started through the MonitorStart() method.

Parameters:
monitoredDevice The monitored device (e.g., extension).
Returns:
If no problems are encountered, the method returns a CSTAResponseInfo object containing the response from the PBX for the LAST Monitor Stop message.
If any problems are encountered, the method returns a CSTAResponseInfo object containing information about the error, including any response from the PBX for the problematic Monitor Stop message.
virtual CSTAResponseInfo MonitorStop ( MonitorCrossRefID  crossRefID  )  [virtual]

Stop a previously started PBX monitor request.

Parameters:
crossRefID The cross reference id of the monitor request as a MonitorCrossRefID object.
Returns:
A CSTAResponseInfo object.
virtual CSTAResponseInfo MonitorStop ( int  crossRefInt  )  [virtual]

Stop a previously started PBX monitor request.

Parameters:
crossRefInt The cross reference id of the monitor request as an integer.
Returns:
A CSTAResponseInfo object.
virtual CSTAResponseInfo QueryDevice ( string  deviceToQuery  )  [virtual]

Queries a device.

Parameters:
deviceToQuery The identification (e.g., phone number) of the device to query.
Returns:
A CSTAResponseInfo object.
virtual CSTAResponseInfo ReleaseACSEAssociation (  )  [virtual]

Releases an ACSE association with a PBX device.

Returns:
A CSTAResponseInfo object. For this message the connection with the PBX is closed, so null is returned.
virtual CSTAResponseInfo RetrieveCall ( ConnectionID  callToRetrieve  )  [virtual]

Retrieves a held call.

Parameters:
callToRetrieve The ConnectionID of the call to retrieve.
Returns:
A CSTAResponseInfo object.
virtual CSTAResponseInfo SetDoNotDisturb ( string  targetDevice  )  [virtual]

Sets the Do Not Disturb feature for a phone.

Parameters:
targetDevice The device for which Do Not Disturb is to be set.
Returns:
A CSTAResponseInfo object.
virtual CSTAResponseInfo SetMessageWaiting ( string  targetDevice  )  [virtual]

Turns on the message waiting indicator on a device's display.

Parameters:
targetDevice The device for which the indicator is to be turned on.
Returns:
A CSTAResponseInfo object.
virtual CSTAResponseInfo SnapshotDevice ( string  deviceToSnapshot  )  [virtual]

Instruct the PBX to take a snapshot of calls active at a device.

Parameters:
deviceToSnapshot Identifier (e.g., phone number) of the device for which the snapshot is desired.
Returns:
A CSTAResponseInfo object.
virtual CSTAResponseInfo TransferCall ( string  heldDevice,
string  connectedDevice 
) [virtual]

Transfers a call from one device to another.

Parameters:
heldDevice Identifier (e.g., phone number) of the device from which the call is transferred.
connectedDevice Identifier (e.g., phone number) of the device to which the call is transferred.
Returns:
A CSTAResponseInfo object.
virtual CSTAResponseInfo TransferCall ( ConnectionID  initiatedCall,
ConnectionID  originalCall 
) [virtual]

Transfers a call. A consultation call must be done before calling this method.

Parameters:
initiatedCall ConnectionID of the new call initiated by the consultation call. The initiatedCall member of the ConsultationCallResult class, for example, contains this ConnectionID.
originalCall ConnectionID of the original call. The somewhat confusingly named callingDevice member of the MakeCallResult class contains this ConnectionID, as does the establishedConnection member of the EstablishedEvent class.
Returns:
A CSTAResponseInfo object.

Property Documentation

PBXSession SessionObject [get]

The PBXSession object associated with this instance.

CSTAContext ThreadContext [get]

The CSTAContext structure for this thread.