AddTapi.NET Developer's Manual
DeviceSpecific Method (inputStruct, address, call, outputStructType)
NamespacesTraysoft.AddTapiTapiLineDeviceSpecific(Object, TapiAddress, TapiCall, Type)
Provides access to device specific functionality.
Declaration Syntax
C#Visual BasicVisual C++
public Object DeviceSpecific(
	Object inputStruct,
	TapiAddress address,
	TapiCall call,
	Type outputStructType
)
Public Function DeviceSpecific ( _
	inputStruct As Object, _
	address As TapiAddress, _
	call As TapiCall, _
	outputStructType As Type _
) As Object
public:
Object^ DeviceSpecific(
	Object^ inputStruct, 
	TapiAddress^ address, 
	TapiCall^ call, 
	Type^ outputStructType
)
Parameters
inputStruct (Object)
A structure that contains input data.
address (TapiAddress)
An address on the line (if required for the specific function). Set to null reference (Nothing in Visual Basic) if not required.
call (TapiCall)
A call on the line (if required for the specific function). Set to null reference (Nothing in Visual Basic) if not required.
outputStructType (Type)
A type of the structure that will contain output data. Set to null reference (Nothing in Visual Basic) if specific function does not return any data.
Return Value
An object of type outputStructType that contains output data or null reference (Nothing in Visual Basic) if there is no output data.
Remarks

Many TSPs provide functionality specific to the telephony system using device specific extensions. Please refer to the TAPI documentation for your telephony hardware to find out about device specific functionality supported by the telephony service provider.

DeviceSpecific method allows the application to access device specific functions implemented by the TSP. Input and output parameters for device specific functions are usualy described as C structures in TAPI documentation for your telephony hardware. You have to define similar structures/classes in your code and use them to pass input and output parameters to DeviceSpecific method. Please see the code snapshot below for more details.

The application has to negotiate a version of the extension supported by the line device using NegotiateDeviceSpecificExtensionVersion(UInt32, UInt32) before opening the line in order to use DeviceSpecific method.

Note:
This method should be used when device specific function has fixed size structures as input and output data. Use DeviceSpecific(array<Byte>[]()[], TapiAddress, TapiCall, Int32) when input or output data have variable length. Please feel free to contact us and we will gladly help with more complex scenarios.
Examples
The following code shows how to use Cisco device specific function that turns on message waiting light.

C#

            // Define a structure that holds parameters for Cisco MsgWaiting function
            struct CiscoLineDevSpecificMsgWaiting
            {
                public int MsgType;
                public int BlinkRate;
            }
            ...
            // Turn on message waiting light on Cisco phone
            CiscoLineDevSpecificMsgWaiting msgWaiting;
            msgWaiting.MsgType = SLDST_MSG_WAITING;
            msgWaiting.BlinkRate = PHONELAMPMODE_STEADY;
            line.DeviceSpecific(msgWaiting, null, null, null);
            

VB.NET

            ' Define a structure that holds parameters for Cisco MsgWaiting function
            Structure CiscoLineDevSpecificMsgWaiting
                Public MsgType As Integer
                Public BlinkRate As Integer
            End Structure
            ...
            ' Turn on message waiting light on Cisco phone
            Dim msgWaiting As CiscoLineDevSpecificMsgWaiting
            msgWaiting.MsgType = SLDST_MSG_WAITING
            msgWaiting.BlinkRate = PHONELAMPMODE_STEADY
            objLine.DeviceSpecific(msgWaiting, Nothing, Nothing, Nothing)
            
Exceptions
ExceptionCondition
TapiExceptionDeviceSpecific failed because of Telephony API (TAPI) error.
See Also

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