USB HID telefony plugin for tSIP

This plugin is very similar to HidControl.dll, but it is dedicated to handling USB devices supporting HID Telephony profile (0xB) - this would be mainly USB headsets. It also tries to control ring and call state LEDs of the device. With HID usages mechanism it should also theoretically work with different devices without the need for any configuration.

Installation

Customization

When handling HID report reception this DLL first tries to match it against report list defined in its configuration, reportActions array. If no match is found, DLL is looking through device usages for matches.

Plugin settings are contained in HidPhone.cfg file that is created first time after HidPhone.dll was enabled in tSIP and then tSIP was closed. It can be then edited with any text editor or JSON editor.

HidPhone.cfg

Issue with Jabra Link

There is some issue with Jabra headsets when using Jabra Link (wireless adapter). It was not observed when headset is connected directly using USB. On outgoing call plugin is receiving off-hook=0 for few hundred milliseconds after call is confirmed (and off-hook=1 was sent to headset). This is normally interpred as immediate hangup from the user side. As a workaround, following script (ignoring off-hook=0 up to 1000 ms after outgoing call is confirmed) was used in plugin configuration as scriptOffHook0:

if IsCallIncoming() == 0 then
    local val = GetCallDurationFromConfirmed()
    if val ~= nil and val < 1000 then
        print("Ignoring hangup from headset for recently confirmed outgoing call\n")
        return
    end
end
print("Hangup from headset\n")
Hangup()

This script requires tSIP version 0.3.06.1+ (GetCallDurationFromConfirmed() function was added in this version).

tSIP Jabra Link

Source and binary

This DLL was built with Code::Blocks 16.01/MinGW. Using newer version of Code::Blocks might be more difficult as it looks like 32-bit libraries (hid.a, setupapi.a) are no longer distributed with Code::Blocks 20.

Github: https://github.com/tomek-o/tSIP-plugin-HidPhone.

Back to tSIP softphone