AddTapi.NET Developer's Manual
NegotiateDeviceSpecificExtensionVersion Method (lowVersion, highVersion)
NamespacesTraysoft.AddTapiTapiLineNegotiateDeviceSpecificExtensionVersion(UInt32, UInt32)
Negotiates a version of the device specific extension to use with the line.
Declaration Syntax
C#Visual BasicVisual C++
public uint NegotiateDeviceSpecificExtensionVersion(
	uint lowVersion,
	uint highVersion
)
Public Function NegotiateDeviceSpecificExtensionVersion ( _
	lowVersion As UInteger, _
	highVersion As UInteger _
) As UInteger
public:
unsigned int NegotiateDeviceSpecificExtensionVersion(
	unsigned int lowVersion, 
	unsigned int highVersion
)
Parameters
lowVersion (UInt32)
Earliest extension version with which the application is compliant.
highVersion (UInt32)
Latest extension version with which the application is compliant.
Return Value
The extension version number that was negotiated. If negotiation succeeds, this number is in the range between lowVersion and highVersion.
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 your 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.

C#

            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);
            

VB.NET

            TapiApp.Initialize("MyApp")
            Dim objLine As TapiLine
            objLine = TapiApp.Lines(0)
            Dim extID As TapiDeviceSpecificExtensionID
            extID = objLine.DeviceSpecificExtensionID
            If extID.ID0 = &H8EBD6A50 And extID.ID1 = &H138011D2 And \
               extID.ID2 = &H905B0060 And extID.ID3 = &HB03DD275 Then
                ' 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
                Dim ciscoExtVersion As UInt32
                ciscoExtVersion = objLine.NegotiateDeviceSpecificExtensionVersion(&H30000, &H50000)
                Console.WriteLine("Line {0} supports Cisco extension {1}", objLine.Name, ciscoExtVersion)
            End If
            objLine.Open(True, AddressOf CallHandler)
            
Exceptions
ExceptionCondition
TapiExceptionNegotiateDeviceSpecificExtensionVersion failed because of Telephony API (TAPI) error.
See Also

Assembly: Traysoft.AddTapi (Module: Traysoft.AddTapi)