tomek-o / tSIP

SIP softphone
149 stars 32 forks source link

show different icons for Idle/Invalid BLF? #20

Closed RussH closed 3 years ago

RussH commented 3 years ago

the BLF buttons show an idle phone icon for both states 'Idle' and 'Invalid'. This is confusing where some extensions are not active and yet show as idle. They definitely show as unavailable in the Asterisk console, can this be reflected in the BLF status in tSIP?

Or.. is it only Presence that would show this?

tomek-o commented 3 years ago

You are on the right track with presence.

"BLF" term is kinda confusing, but I'm using it with same meaning as Yealink or Grandstream - for "dialog-info" subscriptions. Other popular subscription type is "presence".

"Dialog-info" passes information about calls in which extension is involved. There are 3 calls states: terminated (no call), early (ringing) and confirmed (typically including also e.g. outgoing call even if it is not actually confirmed). Fourth state (described as idle/invalid/non-BLF in tSIP GUI) is actually subscription failure and I don't think any PABX used it ever to pass meaningful information. Other interesting feature is that it can also pass information about call direction and caller/callee (asterisk: notifycid=yes, http://telefonia.blog.tartanga.eus/2019/12/31/configuracion-practica-de-asterisk-19-mensajes-subscribe-y-notify-visualizacion-del-estado-de-las-extensiones/), showing who is talking with who. Another interesting thing is that there can be multiple dialogs per extension same time (so far I'm not handling it correctly and I think no one does).

"Presence" is for extension state itself. Typically it passes online/offline state (actually named "open"/"closed") and text description (on some PABXs users can set it, but I think asterisk always manages it itself), but there can be more (if there is more with your asterisk - let me know). In tSIP button configuration bitmaps for presence are shared with BLF "terminated" and "early" bitmaps - I should actually add explicit note in configuration window. There are example "check.bmp" and "cross.bmp" bitmaps included, but they need to be manually selected, default "dialog-info" bitmaps are not proper for "presence".

Weird fact: desk phones typically support only "dialog-info", softphones typically support only "presence". Similar problems: http://forum.yealink.com/forum/showthread.php?tid=894&page=4&mode=linear https://forums.grandstream.com/t/blf-offline-not-working/40790

Now back to tSIP. If you would like see both call state for extension and actual extension state one option might be creating two buttons for each extension - one "BLF" and one "presence". I guess these buttons can be visually grouped using margin parameters and maybe different background colors, though inevitably this might - pardon my French - look like shit. At the moment this would be only solution, but I was thinking of maybe adding another button type, combining both subscription. I'm not sure about it yet as it also might look weird. Yet another possibility could be extending console, making position and size of each button configurable - this would allow to e.g. place small presence button next to larger BLF button. This could be very neat for kiosk-like applications, but I'm slightly afraid of complicating it for "regular" users.

BTW, thank you for mentioning tSIP on reddit.

RussH commented 3 years ago

Hi, yes this is the exact issue; am trying to find a good solution in a mixed environment with softphones showing 'presence' and deskphones with BLF. But - loving tSIP and how customisable it is.. Thank you!