- inputStruct (Object)
- A structure that contains input data.
- feature (UInt32)
- The parameter value uniquely identifies the feature to invoke on the device.
- 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.
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.
DeviceSpecificFeature method allows the application to access device specific features 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 DeviceSpecificFeature method.
| This method should be used when device specific feature has fixed size structures as input and output data. Use DeviceSpecificFeature(array<Byte>[]()[], UInt32, Int32) when input or output data have variable length. Please feel free to contact us and we will gladly help with more complex scenarios. |
C#
// Define a structure that holds parameters for Cisco DoNotDisturb feature
struct CCiscoLineDevSpecificFeature_DoNotDisturb
{
public int MsgType;
public int Operation;
}
...
// Put Cisco phone into DND mode
CCiscoLineDevSpecificFeature_DoNotDisturb dnd;
dnd.MsgType = 0x1A; // PHONEBUTTONFUNCTION_DONOTDISTURB
dnd.Operation = 1; // DoNotDisturbOperation_ENABLE
line.DeviceSpecificFeature(dnd, 0x1A, null);
VB.NET
' Define a structure that holds parameters for Cisco DoNotDisturb feature
Structure CCiscoLineDevSpecificFeature_DoNotDisturb
Public MsgType As Integer
Public Operation As Integer
End Structure
...
' Put Cisco phone into DND mode
Dim dnd As CCiscoLineDevSpecificFeature_DoNotDisturb
dnd.MsgType = &H1A ' PHONEBUTTONFUNCTION_DONOTDISTURB
dnd.Operation = 1 ' DoNotDisturbOperation_ENABLE
objLine.DeviceSpecificFeature(dnd, &H1A, null)
| Exception | Condition |
|---|---|
| TapiException | DeviceSpecificFeature failed because of Telephony API (TAPI) error. |
Assembly: Traysoft.AddTapi (Module: Traysoft.AddTapi)