Closed gcey closed 7 months ago
Maybe this would work for you: http://tomeko.net/software/SIPclient/howto/blf_application_show.php. ApplicationShow() function was added today, so it requires current build: https://tomeko.net/tmp/tSIP.exe.
Many thanks for this solution. It works quite well. Just one problem: After "ApplicationShow(false)" tSIP sometimes cannot be hidden by other windows any more (just like "Window allways on top").
In the new executable (same link) I've added ShowWindow + HWND_NOTOPMOST call, but there is still some weirdness in bringing window to front without activating it. Perhaps using Lua ShowTrayNotifier function instead of showing main window could be better solution.
In the new executable (same link) I've added ShowWindow + HWND_NOTOPMOST call
You added it internally or I have to change my LUA call "ApplicationShow(false)"?
I was talking about last commit, https://github.com/tomek-o/tSIP/commit/30492536c10130e377aece70fcdf05e58d7b6079. Bringing application to front with focus (Lua ApplicationShow(1)) works in consistent way, but that would be awful for anyone that is typing at the moment.
Perhaps using Lua ShowTrayNotifier function instead of showing main window could be better solution.
What would I have to provide as "uri" parameter for "ShowTrayNotifier(description, uri, incoming)"?
What would I have to provide as "uri" parameter for "ShowTrayNotifier(description, uri, incoming)"?
Whatever you want, maybe number + state. Description could then contain name from phonebook returned by GetContactName(number).
Oh, I thought "uri" has some specific effect (like a clickable link). And even when I provide true als "incoming" parameter, I just get a "hangup" button, but no "Answer" button. And IMO the tray notifier should automatically disappear after some time.
And IMO the tray notifier should automatically disappear after some time.
There is also HideTrayNotifier() function that could be used either from "on timer" script (decrementing some counter set by the last event) or if extension state goes to terminated. I'm not sure though if this would be good enough for monitoring multiple extension, there might be other ways.
Is there also the opposite to ApplicationShow(...)? Maybe ApplicationHide()?
I've added ApplicationHide() (hiding to tray) in https://tomeko.net/tmp/tSIP.exe.
Many thanks!
tSIP comes to foreground, if an incoming call arrives. But IMO it should also come to foreground, in the BLF changes (especially if one of the monitored extensions starts ringing).