CSTADLL

2.2.2

The CSTADLL product is a Microsoft .NET 4.5 DLL that allows client code to use a single library to communicate with a PBX device, regardless of what CSTA phase that device uses.

The DLL uses the following namespaces:



The Com.Objsys.Csta.Common namespace contains classes that are common to all CSTA phases.

The Com.Objsys.Csta.Devices namespace contains classes that allow a caller to use specific PBX devices.

The Com.Objsys.Csta.Phase(n) namespaces contain classes that are specific to the indicated phase. Most of these classes are generated by ASN1C from the CSTA and ACSE ASN.1 specifications. These generated classes are not documented here, but you can consult the ASN1C C# User Guide for information about how ASN.1 constructions are translated into C# classes.

The Com.Objsys.Csta.Xml namespace contains classes that are specific to using XML CSTA (edition 3, or ed3). Most of these classes are generated by XBinder from the CSTA and session management (ECMA-354) XML schema specifications. These generated classes are not documented here, but you can consult the XBinder Java/C# User Guide for information about how XML schema constructions are translated into C# classes.

Each namespace also contains several classes that are not generated by ASN1C. These classes are the ones documented in this manual.

A typical way to use the DLL is to use the PBXSession class to set up the communication to the PBX system via the constructor. If the PBX will be sending asynchronous data, such as monitor packets, to the client, the ClientCallback or XMLClientCallback property can be used to define a callback method to receive the asynchronous data. If no callback method is defined, asynchronous data will be ignored.

The CSTADLL kit includes some samples to guide you in writing your own code. The samples are evenly split between those implemented in C# and those implemented in Visual BASIC. Each language has samples for communicating with PBX devices that use BER CSTA and with PBX devices that use XML CSTA.

The classes and methods exposed by the all-phases DLL within the CSTADLL package are probably sufficient to handle operations for most PBX devices. But if needed, you can write a class of your own to handle operations for a PBX device that the CSTADLL software doesn't explicitly support. The sample NewPBX shows how this might be accomplished. This sample contains code for a small separate DLL that could be used to support a fictitious PBX device. The assumption in the sample is that this device uses standard messages for all operations except for the initial association messages. These messages are the ones that are most commonly different from one PBX to the next. The NewPBX sample shows how the EncodeACSEConnectionRequest() method within the GenericCSTAp2 class (for BER PBX devices) or the EncodeStartSession() method within the GenericXML class (for XML PBX devices) can be overridden in a class that you can write. The override implementation handles the details that are specific to the device.

The all-phases DLL can log message traffic between a client program and the PBX device if so desired. The logging is controlled by the LoggingEnabled property with the PBXSessionHelper class. The logging is off by default. Both of the provided sample clients enable the logging. The log file used is named cstadll_<program>.log, where <program> is the name of the executable image that is using the DLL. The location of the log file is the folder where the executable image resides. If the log file grows to more than 5 Mb, it is copied to cstadll_<program>.backup.log, and a new log file is opened. If there is already a file with the backup file name, it is overwritten.