Click or drag to resize
TapiLineNegotiateDeviceSpecificExtensionVersion Method
Negotiates a version of the device specific extension to use with the line.

Namespace: Traysoft.AddTapi
Assembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 6.0.0.1110
Syntax
public uint NegotiateDeviceSpecificExtensionVersion(
	uint lowVersion,
	uint highVersion
)

Parameters

lowVersion
Type: SystemUInt32
Earliest extension version with which the application is compliant.
highVersion
Type: SystemUInt32
Latest extension version with which the application is compliant.

Return Value

Type: UInt32
The extension version number that was negotiated. If negotiation succeeds, this number is in the range between lowVersion and highVersion.
Exceptions
ExceptionCondition
TapiExceptionNegotiateDeviceSpecificExtensionVersion failed because of Telephony API (TAPI) error.
Remarks

The high-order word is the major version number; the low-order word is the minor version number. For example, version 2.1 is represented as 0x00020001 (hex 20001).

Many TSPs provide functionality specific to the telephony system using device specific extensions. In order to use device specific extension on the line, the application must negotiate a version of the extension using NegotiateDeviceSpecificExtensionVersion before opening the line with Open(Boolean, TapiCallHandler).

Please refer to the TAPI documentation for the telephony hardware to find out about device specific functionality supported by the telephony service provider.

Examples
The following code shows how to negotiate an extension version. Error handling has been omitted for clarity.
TapiApp.Initialize("MyApp");
TapiLine line = TapiApp.Lines[0];
TapiDeviceSpecificExtensionID extID = line.DeviceSpecificExtensionID;
if (extID.ID0 == 0x8EBD6A50 && extID.ID1 == 0x138011D2 &&
    extID.ID2 == 0x905B0060 && extID.ID3 == 0xB03DD275)
{
    // This line supports Cisco Unified TSP extension
    // Our application knows how to work with versions 3.0 - 5.0
    // Negotiate to find out which version is supported
    uint ciscoExtVersion = line.NegotiateDeviceSpecificExtensionVersion(0x30000, 0x50000);
    Console.WriteLine("Line {0} supports Cisco extension {1}", line.Name, ciscoExtVersion);
}
line.Open(true, CallHandler);
See Also