tSIP
tSIP copied to clipboard
Headset button support please
So headset buttons can be used to answer/hangup calls, it works in microsip but not in tsip, would be really nice to have it working in tsip
Depending on headset type try either hotkeys (media keys) or HidControl plugin (might require manual configuration).
Thanks I will try hotkeys, I tried HidControl without any success.
Only reason I mentioned microsip works is because you only have to tick a box "headset support" and it works right out of the box. I will let you know if I find a solution with hotkeys.
The headset is the Jabra Evolve 65 wireless
HidControl.dll should generate some logs and should also be pretty easy to compile and debug. First step should be probably determining whether headset works as HID Telephony or media keys. One I've described, M890DBT uses actually both modes (one at the time) depending on whether microphone is in use or not.
I kept getting this in the log [HidControl.dll] Error opening USB device (USB VID 0x1395, PID 0x0026, usage page 0xB): Device not found
I tried to find the PID and VID but the only thing I could find was this:
Parent Device: USB\VID_0B0E&PID_245E&MI_00\6&3390c61d&1&0000 Putting these in to HID gave the same message about device not found
I did find this though on their website, but whatever I try it just says "Error opening USB device" https://developer.jabra.com/site/global/sdks/web/documentation/index.gsp
[HidControl.dll] Error opening USB device (USB VID 0x1395, PID 0x0026, usage page 0xB): Device not found
Doesn't seem to matter what I put into the cfg file it always says that same message.
Try putting into HidControl.cfg: usbPid = 9310, usbVid = 2830 (these are 0x245E and 0x0B0E converted to decimal). Note: file should be edited when plugin/application is not running, otherwise user changes might disappear.
If you want to make sure if headset is using or not using media keys you might try https://w3c.github.io/uievents/tools/key-event-viewer.html.
That seemed to pick up the device, when it rings it now shows:
Skipping playing - 2 seconds not passed [HidControl.dll] HID REPORT_IN received 65 B: 0x04 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x30 0x78 0x37 0x37 0x20 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x08 0x05 0x00 0x00 0xCC 0x05 0x00 0x00 0xAC 0x05 0x00 0x00
But the button still does nothing.
I set a hotkey too to media play/pause = anser/hangup but the button still does nothing, just tells you the battery status.
Nothing comes up on the webpage at all when you press the button, so I assume it isn't using media keys?
If I run MicroSIP at the same time and answer with that one I get this in the logs
delta = 7 [HidControl.dll] HID REPORT_IN received 65 B: 0x07 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x30 0x78 0x37 0x37 0x20 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xE0 0x05 0x00 0x00 0xE8 0x05 0x00 0x00 0xA0 0x05 0x00 0x00 Running Lua script: on_dialog_info_20220128_201544_594.lua on_blf_state: number 170 state = 1 [HidControl.dll] HID REPORT_IN received 65 B: 0x06 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x30 0x78 0x37 0x37 0x20 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xE0 0x05 0x00 0x00 0xE8 0x05 0x00 0x00 0xA0 0x05 0x00 0x00 [HidControl.dll] HID REPORT_IN received 65 B: 0x04 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x30 0x78 0x37 0x37 0x20 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xE0 0x05 0x00 0x00 0xE8 0x05 0x00 0x00 0xA0 0x05 0x00 0x00 [HidControl.dll] HID REPORT_IN received 65 B: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x30 0x78 0x37 0x37 0x20 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xE0 0x05 0x00 0x00 0xE8 0x05 0x00 0x00 0xA0 0x05 0x00 0x00
Let's assume media keys would not be in use (if you have configured hotkeys for them you might delete or disable them temporarily).
[HidControl.dll] HID REPORT_IN received 65 B: 0x04 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x30 0x78 0x37 0x37 0x20 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x08 0x05 0x00 0x00 0xCC 0x05 0x00 0x00 0xAC 0x05 0x00 0x00
Let's look for these events. In HidControl.cfg they can be matched byte-by-byte and then associated script is started (different scripts for different reports). Is there some REPORT_IN like this when button is pressed or is this one really just related to ringing (and are there no reports if MicroSIP is not running)? It might be also worth checking if received reports are same for button each time and how does long pressing button works. There is also slim chance that reports while in call might look different. Mairdi Headset required checking option "Audio I/O" / "Start audio input before call is confirmed" (last one from the "Audio I/O" settings page), it might be worth trying.
If MicroSIP is not running I only get the one starting 0x04, and thats before I press anything, then when I press something nothing happens.
If I open Microsip and press the button it answers the call and i get the 0x07, etc in the logs on tsip, I think 7 is the button press and 4 might be the hangup or 0 not sure.
I did follow that page on that headset and ticked that box just in case it made a difference, but it hasn't
From jabra documentation it looks like this headset might work in a stateful way, so it might not send any event until it receives "ring" or "off hook" event. This might be hard for me to debug remotely and I don't have much experience with USB headsets. Maybe I'll get my hands on similar headset later.
Well thanks very much for your time looking at this, shame it wasn't an easy fix!
Do you know which headsets do work with the buttons to answer/hang up? I want to get one and test it to make sure as the Jabra deffo doesn't.
Thanks
I can't tell much as I've tested only a few devices: EX-03 USB phone, some keyboard with integrated headset, Mairdi M890 (and this one looks dead at the moment, maybe it self-discharged below critical point, so I would be cautious about it). Philips VoIP 151 is waiting, but that's corded again, AIKELA M100C - also untested yet.
Regarding jabra: could you tell me if https://github.com/nondebug/jabra-webhid-demo works with your model and what would be correct event sequence to get answer/hangup events?
No, you can see it in the list when you click connect: "Jabra Link 370 - Paired" but it doesn't do anything when you click connect so everything remains grayed out.
The 370 is the usb dongle it uses to connect, and the headset is evolve 35,. I did find this, but it seems to be python.
https://github.com/lalmeras/jabra_link_370
and this one which is c#
https://github.com/edgarleonz/jabra-end-interaction-extension-for-genesys-workspace-desktop-edition
but I haven't worked out how to test them yet.
I've got now Jabra Evolve 65 "old model" (as there are two models apparently - old model has silver ring and new one is all black I think). Unfortunately I don't have Jabra Link 370, but I'm hoping that direct USB connection to the headset that I'm testing would work the same way as connection through Jabra Link 370. Please see how this would work for you: https://github.com/tomek-o/tSIP-plugin-HidPhone/releases/tag/v0.1 Single tap answers incoming call. Double tap rejects incoming call. Single tap terminates - with weird 3 s delay - confirmed or outgoing call.
Initial test works fine on Wireless button press, Jabra 65 also via the Link 370, mine has the silver ring, but we have others I will check them. I will do sme more testing today.
Been testing this, it works fine on the headset with the silver ring on the edge, but not at all on the black egde headset, just as you thought it would. On the black one the button just doesn't do anything, and yes it works via the 370, but again not with the black edge headset.
Hi. I was planning to buy gigaset ion speakerphone. It looks like they have shared some data about hid communication as it has soma buttons like answer\end\mute\etc: https://teamwork.gigaset.com/gigawiki/display/GPPPO/FAQ+ION+-+USB+HID+commands
Maybe someone already tried it and might confirm if it will work out of the box or tsip should be configured somehow?
Not sure i did something right. Installed plugin, restarted tsip, fixed hid cfg to:
"usbPid" : 111D,
"usbUsagePage" : 11,
"usbVid" : 1E85
Right after new tsip run it's log shows:
[HidControl.dll] Error opening USB device (USB VID 0x1395, PID 0x0026, usage page 0xB): Device not found [HidControl.dll] Error opening USB device (USB VID 0x1395, PID 0x0026, usage page 0xB): Device not found
When i stop it it just goes back to old settings inside of cfg file :(
"usbPid" : 111D, "usbVid" : 1E85
You have to convert these numbers from hex to decimal (4381 and 7813 respectively, similar to 11 being used as 0xB HID usage page) as hex numbers are not valid in plain JSON and default values were used instead (VID 0x1395, PID 0x0026).
I think I would recommend trying HidPhone.dll first if you haven't - it is supposed to at least recognize OFFHOOK action without any additional configuration and it would enumerate USB devices looking for 0xB page, not requiring entering VID/PID if there is only one device.
Looks like i got some updates, i assume those pids is in hex, so i need to convert it for tsip:
"usbPid" : 4381,
"usbUsagePage" : 11,
"usbVid" : 7813
Errors was stopped, but behaviour has changed to smoething weird, initiated call from tsip to my mobile, and speakerphone started with disabled microphone. When i pressed offhook button nothing happens, but when i was press mute\unmute tsip has ends the call:
[HidControl.dll] HID REPORT_IN received 65 B: 0x09 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x01 0x02 0x00 0x00 0x00 0x08 0x00 0x30 0x78 0x37 0x37 0x20 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x08 0x05 0x00 0x00 0x0C 0x05 0x00 0x00 0xF4 0x04 0x00 0x00 [HidControl.dll] HID REPORT_IN received 64 B: 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x01 0x02 0x00 0x00 0x00 0x08 0x00 0x30 0x78 0x37 0x37 0x20 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x08 0x05 0x00 0x00 0x0C 0x05 0x00 0x00 0xF4 0x04 0x00 [HidControl.dll] Running script #0: local callState = GetCallState() if callState == 1 then -- INCOMING Answer() else Hangup() end
Oh, you already found my errors. I will take a look to HidPhone.
Not really sure what is giong on, but tsip frequently quits with HidPhone plugin enabled. This time speakerphone started with light blue light enabled just like it does with teams.
But nothing shows on the log windows of tsip when i pressed mute button, just ends the call :(
HidControl.dll default configuration is for Mairdi M890BTD and this is a headset with basically single button, recognized by single 0x01 byte with Answer/Hangup action assigned (in HidControl.cfg JSON file there is a single entry in the reportActions array). It looks like accidentally ION is sending report starting with 0x01 for Mute button. If you would see some reports in log when Answer and Hangup buttons are pressed (maybe one of them is the one starting with 0x09 above), you could use them to create actions. Each action consists of bytes array to check against (just 0x01 in default configuration) for match and script to be executed. I'm not sure if ION would send button reports if call state would not be set first though - this was the case for Jabra.
Regarding quitting when using with HidPhone.dll - it could be dll crashing. Are you interested in installing Code::Blocks 16.01/MinGW and trying to debug it by any chance?
Regarding quitting - it could be dll crashing. Are you interested in installing Code::Blocks 16.01/MinGW and trying to debug it by any chance?
Only on the weekend i can try to search what does code::blocks mean as iam not really used mingw in my life, only some apps build with it. Right now i will try to do clean install of 0.3.00 and HidPhone instead of upgrade 0.2.10 -> 0.3.00 by overwrite.
Yep, clean install doesn't help. I have started tsip with plugin, open log windows and press answer button. (no any call initiated at all) Last thing i was able to see some information from plugin and tsip closes.
Can't get anything for offhook, as tsip just quits right after press now.
Also i have tried microsip also with ticked headset support. Behaviour looks fine, it can drop call and mute button works correctly. But i like your app. Will proceed on weekend with mingw search and install.
I would assume that you don't have prior experience with C/C++/MinG, adding new IDE and initial setup to that - it might be too much for a weekend. In the past I've done some debugging remotely over TeamViewer, but the guy that gave me the access had a fresh, separate PC so there were no privacy concerns. I could also try to add more logs to dll, but this could be painful, iterative and slow comparing to catching it with debugger.
It might be worth trying again HidControl.dll (both plugins can be "installed" same time, just activate/deactivate them one at the time) and checking if it logs any reports for Answer/Hangup handset buttons.
You are right, i am not a programmer so it might take more time.
Right now activated HidControl, opens log window and pressed answer button i got this after some time:
[HidControl.dll] HID REPORT_IN received 64 B: 0x00 0x00 0xFF 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x01 0x02 0x00 0x00 0x00 0x08 0x00 0x30 0x78 0x37 0x37 0x20 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x14 0x05 0x00 0x00 0x80 0x04 0x00 0x00 0x68 0x04 0x00 [HidControl.dll] HID REPORT_IN received 64 B: 0x01 0x00 0xFF 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x01 0x02 0x00 0x00 0x00 0x08 0x00 0x30 0x78 0x37 0x37 0x20 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x14 0x05 0x00 0x00 0x80 0x04 0x00 0x00 0x68 0x04 0x00 [HidControl.dll] Running script #0: local callState = GetCallState() if callState == 1 then -- INCOMING Answer() else Hangup() end
Nothing happens for end call and mute buttons.
When i initiated a call, nothing happens for end call button.
But this happens for answer button and tsip ends the call:
[HidControl.dll] HID REPORT_IN received 65 B: 0x00 0x00 0xFF 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x01 0x02 0x00 0x00 0x00 0x08 0x00 0x30 0x78 0x37 0x37 0x20 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x14 0x05 0x00 0x00 0x80 0x04 0x00 0x00 0x68 0x04 0x00 0x00 [HidControl.dll] HID REPORT_IN received 64 B: 0x01 0x00 0xFF 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x01 0x02 0x00 0x00 0x00 0x08 0x00 0x30 0x78 0x37 0x37 0x20 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x14 0x05 0x00 0x00 0x80 0x04 0x00 0x00 0x68 0x04 0x00 [HidControl.dll] Running script #0: local callState = GetCallState() if callState == 1 then -- INCOMING Answer() else Hangup() end
And this one happens for mute button and tsip ends the call:
[HidControl.dll] HID REPORT_IN received 65 B: 0x09 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x01 0x02 0x00 0x00 0x00 0x08 0x00 0x30 0x78 0x37 0x37 0x20 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x14 0x05 0x00 0x00 0x80 0x04 0x00 0x00 0x68 0x04 0x00 0x00 [HidControl.dll] HID REPORT_IN received 64 B: 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x01 0x02 0x00 0x00 0x00 0x08 0x00 0x30 0x78 0x37 0x37 0x20 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x14 0x05 0x00 0x00 0x80 0x04 0x00 0x00 0x68 0x04 0x00 [HidControl.dll] Running script #0: local callState = GetCallState() if callState == 1 then -- INCOMING Answer() else Hangup() end
Btw, unlike with HidPhone, no light blue light on the speaker phone, it looks like HidControl doesn't provide some data to the speaker.
Your observation seems correct, Gigaset is probably stateful like Jabra and basic report matching from HidControl.dll is not enough (at least hangup button would not work).
Another idea: I've attached debug build of HidPhone.dll and https://github.com/jrfonseca/drmingw (I've installed 64-bit version locally by running "drmingw -i" from command line in administrator mode) seems to be catching my test crash with useful trace. Could you try it?