Forum Index » Windows Development » Race condition SetHookState vs. ButtonInput   XML
 
Author Message
Wolfgang


Joined: 17/04/2018 04:27:59
Messages: 8
Offline

Hi, I'm still using the now deprecated JABRA .NET SDK v3.1.13407, but I guess this issue is generic and still valid (please correct me if it is fixed with the new SDK).

When I call SetHookState(true), I receive a corresponding ButtonInput event ButtonId.HookSwitch for hook off.
When I call SetHookState(false), I receive a corresponding ButtonInput event ButtonId.HookSwitch for hook on.

When I handle the ButtonInput event, I cannot tell the difference if this event is caused by SetHookState or by a real button press by the user.

I had situations where the software calls SetHookState(false) because a first call was actively hangup via button click in the softphone, a second call was accepted viy UI, SetHookState(false) is called, but then the ButtonInput event (hook on) for the first SetHookState(false) was received and the second call was disconnected in response - the software handled the event as a button press by the user.

Is there a way to suppress this "feedback" event or to differentiate it from a real button press?

Best regards
Wolfgang
Wolfgang


Joined: 17/04/2018 04:27:59
Messages: 8
Offline

Just saw that there is another related question (c++ SDK). So I guess I have to cope with this echo event.
Iggy


Joined: 17/04/2018 04:27:59
Messages: -6
Offline

i just raised it with the team, get back on this asap! cheers, iggy.
Wolfgang


Joined: 17/04/2018 04:27:59
Messages: 8
Offline

The S*r SDK for example allows to set the "ringing" call id. Later on the "incoming call accepted" event contains the call id.

For the button input event it would be sufficient when we could tell if it was a real button press. You could as well introduce a "Offhook" event (that reflects SetHookState) and the button event would only be fired for real button press actions.

Wolfgang
Iggy


Joined: 17/04/2018 04:27:59
Messages: -6
Offline

thanks for the feedback, we will submit to the team. cheers, iggy
Iggy


Joined: 17/04/2018 04:27:59
Messages: -6
Offline

in the meantime its worth checking our the new beta windows SDK about to released at the end of this month. https://developer.jabra.com/pre-release-sdks/
Wolfgang


Joined: 17/04/2018 04:27:59
Messages: 8
Offline

Thanks for the hint. I will try the beta end of the month, after I have branched the new code for our upcoming release.

Wolfgang
Wolfgang


Joined: 17/04/2018 04:27:59
Messages: 8
Offline

I just tried to migrate the code to the new beta SDK but failed since the SDK does not have a strong name (see my other thread).

Nevertheless: The new SDK provides the raw button event:

void OnRawButtonInput(object sender, RawButtonInputEventArgs eventArgs).


Since I cannot try it out right now: Would I receive a hook button press event "Hook Off" as "raw button input" when I set the device to OffHook via the new API ?

Best regards
Wolfgang
 
 
Go to: