Giter VIP home page Giter VIP logo

Comments (51)

tomek-o avatar tomek-o commented on July 23, 2024 1

Thanks. I'm closing this issue as I believe it is fulfilled now by HidPhone.dll and any further problems should probably be assigned directly to either HidPhone.dll or HidControl.dll plugin projects.

from tsip.

tomek-o avatar tomek-o commented on July 23, 2024

Depending on headset type try either hotkeys (media keys) or HidControl plugin (might require manual configuration).

from tsip.

Northernn avatar Northernn commented on July 23, 2024

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

from tsip.

tomek-o avatar tomek-o commented on July 23, 2024

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.

from tsip.

Northernn avatar Northernn commented on July 23, 2024

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.

from tsip.

tomek-o avatar tomek-o commented on July 23, 2024

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.

from tsip.

Northernn avatar Northernn commented on July 23, 2024

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?

from tsip.

Northernn avatar Northernn commented on July 23, 2024

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

from tsip.

tomek-o avatar tomek-o commented on July 23, 2024

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.

from tsip.

Northernn avatar Northernn commented on July 23, 2024

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 tsip.

tomek-o avatar tomek-o commented on July 23, 2024

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.

from tsip.

Northernn avatar Northernn commented on July 23, 2024

Well thanks very much for your time looking at this, shame it wasn't an easy fix!

from tsip.

Northernn avatar Northernn commented on July 23, 2024

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

from tsip.

tomek-o avatar tomek-o commented on July 23, 2024

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?

from tsip.

Northernn avatar Northernn commented on July 23, 2024

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.

from tsip.

tomek-o avatar tomek-o commented on July 23, 2024

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.

from tsip.

Northernn avatar Northernn commented on July 23, 2024

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.

from tsip.

Northernn avatar Northernn commented on July 23, 2024

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.

from tsip.

mesb1 avatar mesb1 commented on July 23, 2024

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?

from tsip.

mesb1 avatar mesb1 commented on July 23, 2024

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 :(

from tsip.

tomek-o avatar tomek-o commented on July 23, 2024

"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.

from tsip.

mesb1 avatar mesb1 commented on July 23, 2024

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

from tsip.

mesb1 avatar mesb1 commented on July 23, 2024

Oh, you already found my errors.
I will take a look to HidPhone.

from tsip.

mesb1 avatar mesb1 commented on July 23, 2024

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 :(

from tsip.

tomek-o avatar tomek-o commented on July 23, 2024

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?

from tsip.

mesb1 avatar mesb1 commented on July 23, 2024

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.

from tsip.

mesb1 avatar mesb1 commented on July 23, 2024

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.

image

from tsip.

mesb1 avatar mesb1 commented on July 23, 2024

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.

from tsip.

tomek-o avatar tomek-o commented on July 23, 2024

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.

from tsip.

mesb1 avatar mesb1 commented on July 23, 2024

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.

from tsip.

tomek-o avatar tomek-o commented on July 23, 2024

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?

HidPhone.zip

from tsip.

mesb1 avatar mesb1 commented on July 23, 2024

Sure.
Now tsip isn't silently quits :)

tSIP_nocalls_answerbutton.log
tSIP_outcall_answerbutton.log
tSIP_outcall_endbutton.log
tSIP_outcall_handsfree-headsetbutton_endedbyotherside.log
tSIP_outcall_mutebutton.log

All this time light blue ring led also works correctly from my side.
But the actions for the buttons itself isn't the one that is needed.

For now i haven't tried incoming calls, as i don't understand how to call to the tsip directly from my ipphone and it cannot dial something like [email protected]:5060, only 192.168.1.80:5060.

from tsip.

tomek-o avatar tomek-o commented on July 23, 2024

Now tsip isn't silently quits :)

Nasty. If debug build works, it might be something like uninitiated variable. I would recommend using debug build for now then.

For now i haven't tried incoming calls, as i don't understand how to call to the tsip directly from my ipphone and it cannot dial something like [email protected]:5060, only 192.168.1.80:5060.

Calling "192.168.1.80:5060" should also work, assuming that in tSIP Account settings "Answer any call" is checked and tSIP is bound to port 5060 (Network: Local IP address = 0.0.0.0:5060 plus optionally selected network adapter below if needed). If there are multiple softphones and/or other clients then each one should have unique bind port. If binding address is empty then semi-random port assigned by OS is used that need to be checked in log.
Personally I'm often calling from one softphone to another or using free SIP accounts at sip2sip.info or iptel.org. Softphone that is making the call does not even necessary need account at sip2sip.info, only the one that is receiving the call.
Here are also few URIs for outgoing test calls:
sip:[email protected]
sip:[email protected]
sip:[email protected]
("sip:" prefix is important for tSIP, by convention user input is treated as full URI, not just user/number part then)

from tsip.

mesb1 avatar mesb1 commented on July 23, 2024

Now i got incall (in theory buttons should allow accept call or reject).
In this mode i got some dark blue light while incoming call, end button in theory should work as reject.
But not answer, not end(reject) do nothing.

tSIP_incall_answerbutton_endbyotherside.log
tSIP_incall_endbutton_endbyotherside.log

from tsip.

tomek-o avatar tomek-o commented on July 23, 2024

In some of these logs I'm seeing few "Device connected" with capabilities enumeration logs but nothing in between, also not a lot of log lines related to actual calls - I feel like something important might be cut out. Is handset connected continuously?

from tsip.

mesb1 avatar mesb1 commented on July 23, 2024

Yes, it is connected continuously.

About logs, if there is a way to produce more logs just share it with me, as of now it was logs window opened via view - logs and ticked save to file option.

With last incall logs I haven't touched interface buttons of the app, so it was ringing some time, I was touched ION answer or reject and then I have cancelled call on my ipphone.

from tsip.

tomek-o avatar tomek-o commented on July 23, 2024

I'll be back with update in ~10 hours. Right now I'm thinking that this might be some device opening error that I'm not logging.

from tsip.

mesb1 avatar mesb1 commented on July 23, 2024

Got it.
For the logs, as far as I can see there is some HID REPORT_IN may be it was my button push during incoming ringing or outgoing established call.
So I assume it is visible by tsip plugin?

from tsip.

tomek-o avatar tomek-o commented on July 23, 2024

In the last logs there was no hook reports but mostly strange reconnections. Now I think that this could be caused by buffer overflow I've found few minutes ago. It probably won't fix all functionality (if any), but this was very likely the reason for the crash (depending on USB device) in the release build and it could also cause some erratic behavior in debug build.
Updated binary: https://tomeko.net/tmp/HidPhone.dll

from tsip.

mesb1 avatar mesb1 commented on July 23, 2024

Well, first of all - tsip doesn't crash\quits\etc.

Now it was able to answer for incoming call with answer button.
But second answer button press during call - leads to call end.

Mute button during incoming or outgoing call also leads tsip to ends call.

During incoming rings press for end call button doesn't leads to reject - nothing happens.

tSIP_incall_answer_end-worksfine.log
tSIP_incall_answer-ok_answer-endscall.log
tSIP_incall_answer-ok_mute-endscall.log
tSIP_incall_reject-notwork.log
tSIP_outcall_answer-endscall.log
tSIP_outcall_end-worksfine.log
tSIP_outcall_mute-endscall.log

from tsip.

mesb1 avatar mesb1 commented on July 23, 2024

Hm, it looks like inside of the HidPhone.cfg there is some script also, and if i replace it with:

  "scriptOffHook" : ""

Answer/end doesn't work, but atleast mute is working during call, but i thing locally, as mute button on the tsip doen't moves.
I think for now logic isn't clear for me:

https://tomeko.net/software/SIPclient/HidPhone/

from tsip.

tomek-o avatar tomek-o commented on July 23, 2024

I've updated https://tomeko.net/tmp/HidPhone.dll.
It uses now separate scripts for devices with absolute and relative USB usages. For end user this should not be important as default scripts should be fine. When upgrading, HidPhone.cfg should be deleted (when tSIP is not running) as my previous custom reject handling for Jabra headset should not be needed anymore.

Mute would not work out of the box yet. I'm using scripting for passing commands and while it can be very flexible I surprisingly don't have "Mute" Lua function - probably because I'm not using it myself. The workaround would be defining "Mute" programmable button and then using ProgrammableButtonClick(BUTTON_ID) in HidPhone.cfg as "scriptMuteToggle" value. BUTTON_ID = id of defined Mute button.

from tsip.

mesb1 avatar mesb1 commented on July 23, 2024

Something goes wrong and now answer button works as reject while incoming ring.

tSIP_incomingring_answer-rejected.log
tSIP_incomingring_reject-ok.log

from tsip.

mesb1 avatar mesb1 commented on July 23, 2024

Hm, changed scriptoffhook numbers and now endcall accepts it and answer rejects)

image

from tsip.

mesb1 avatar mesb1 commented on July 23, 2024

Looks like i am not clearly understand monents of different hooks running.
Could you please explain those:
"scriptOffHook0" :
"scriptOffHook1" :
"scriptOffHookToggle" :

Which of them runs for which moments?

At this screen there is a moment of incoming ring and my press of answer button, but log shows run hook0 and hook1 also.

image

from tsip.

tomek-o avatar tomek-o commented on July 23, 2024

Could you please explain those:
"scriptOffHook0" :
"scriptOffHook1" :
"scriptOffHookToggle" :

"scriptOffHookToggle" is running if device is sending OffHook usage and its OffHook is not absolute - I suppose these would be devices without internal state, maybe without call state LEDs. For devices with absolute OffHook (these seem to be my Jabra and your Gigaset), either "scriptOffHook0" or "scriptOffHook1" depending on if report contains OffHook usage or not.

I've updated https://tomeko.net/tmp/HidPhone.dll once again. Looking into MicroSIP source code I see some tricky looking (at least it looks to me like a trick) code with call rejecting requiring two events in a row. This isn't breaking interoperability with my Jabra, but it should help with your Gigaset that when answering first is sending OffHook = 0 and then OffHook = 1.

from tsip.

mesb1 avatar mesb1 commented on July 23, 2024

It looks like now it works in a proper way.
Answers (repeated press doesn't affect now), rejects incoming rings, ends calls during talking, mute works locally (on speaker itself)
Will try to set mute with your recommendations via provided options for mute on the weekend.

Thank you for spending your time on me.
Is there anything i can help you with?

from tsip.

mesb1 avatar mesb1 commented on July 23, 2024

Just for history purposes, it looks like mute also was trying to run offhook1 along with mutetoggle:
image

from tsip.

tomek-o avatar tomek-o commented on July 23, 2024

Just for history purposes, it looks like mute also was trying to run offhook1 along with mutetoggle

I'm not checking for offHook state changes, but offHook1 script checks if there is an incoming call on itself, so calling it multiple times would be harmless and I think it would be not possible to use "Answer" button on stateful/"absolute" phone for multiple purposes (contrary to stateless phone where each report would be equal to single press).
If mute would work locally on the handset then perhaps passing its state to softphone would be only partially useful, maybe only for visual feedback.

I'll bump dll version number / create release probably tomorrow. I would hope that non-debug build would not crash anymore (all the temporary compilation were debug builds), though I'll upload both just in case.

from tsip.

mesb1 avatar mesb1 commented on July 23, 2024

Ok, i will check released version also.
The one you provided last time looks stable, atleast i have made about ten calls between tsip and my home ipphone with no issue with different directions.

from tsip.

mesb1 avatar mesb1 commented on July 23, 2024

It looks like page:
https://tomeko.net/software/SIPclient/HidPhone/

Was updated with this archive:
https://tomeko.net/software/SIPclient/HidPhone/bin/tSIP-plugin-HidPhone-0.2.zip

I have got Release version, added it to the tsip with removing cfg file before tsip starts.

Did a few calls from\to ipphone so far so good.
Right now i leaved it online just to keep it online for a long talk.

from tsip.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.