Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

oh-sipclient: Add Item to report SIP status to server #2648

Merged
merged 8 commits into from
Jul 10, 2024

Conversation

florian-h05
Copy link
Contributor

@florian-h05 florian-h05 commented Jul 6, 2024

This adds the option to specify a String Item, to which the SIP connection status is sent.
This allows to track the usage of oh-sipclient from rules and scripts.

@florian-h05 florian-h05 requested a review from a team as a code owner July 6, 2024 12:29
@florian-h05 florian-h05 marked this pull request as draft July 6, 2024 12:29
@florian-h05 florian-h05 added this to the 4.3 milestone Jul 6, 2024
Copy link

relativeci bot commented Jul 6, 2024

#2111 Bundle Size — 10.67MiB (~+0.01%).

545b544(current) vs 146fda4 main#2107(baseline)

Warning

Bundle contains 2 duplicate packages – View duplicate packages

Bundle metrics  Change 2 changes Regression 1 regression
                 Current
#2111
     Baseline
#2107
Regression  Initial JS 1.88MiB(+0.04%) 1.88MiB
No change  Initial CSS 607.91KiB 607.91KiB
Change  Cache Invalidation 17.58% 17.95%
No change  Chunks 223 223
No change  Assets 246 246
No change  Modules 2888 2888
No change  Duplicate Modules 149 149
No change  Duplicate Code 1.85% 1.85%
No change  Packages 97 97
No change  Duplicate Packages 2 2
Bundle size by type  Change 1 change Regression 1 regression
                 Current
#2111
     Baseline
#2107
Regression  JS 8.86MiB (~+0.01%) 8.86MiB
No change  CSS 892.63KiB 892.63KiB
No change  Fonts 526.1KiB 526.1KiB
No change  Media 295.6KiB 295.6KiB
No change  IMG 140.74KiB 140.74KiB
No change  HTML 1.24KiB 1.24KiB
No change  Other 871B 871B

Bundle analysis reportBranch florian-h05:sipclient-statusitemProject dashboard

@florian-h05
Copy link
Contributor Author

@digitaldan WDYT?
I have implemented this for a very special use case: I use oh-sipclient to communicate with my doorbell, and I would like to know whether the doorbell ring gets "answered" either by directly opening the door or talking to the door station. This PR makes it possible to know whether someone started talking to the door station.

@digitaldan
Copy link
Contributor

Seems like a cool feature! One suggestion would be to have the item be able to be configured per browser (so using local storage) like we allow for other SIP configuration options, so add this to the localSettingsPopup part of the widget. I have 5 (sometimes more) tablets that all pop up the SIP widget when a call comes in and i could see wanting to track those separately.

On a bit of a tangent. I have a Freeswitch PBX docker container i run that my SIP devices (like my grand stream gate phone) connect to as well as some external phone numbers. When a call comes in, its responsible for triggering an item update on openHAB which pops up my sip widgets. Freeswitch keeps the incoming call ringing, even though my sip widgets are not registered yet, then when they do pop up and register, it immediately rings them. This is similar to how VOIP apps on mobile devices work, where the PBX sends a push notification that there is a call, which then wakes up the mobile sip app which immediately registers then gets sent the call.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
@florian-h05 florian-h05 force-pushed the sipclient-statusitem branch from ed7aa3c to 896365f Compare July 8, 2024 19:20
@florian-h05
Copy link
Contributor Author

Agreed, sounds reasonable.

WDYT about the strings that are sent? Understandable and detailed enough?

@digitaldan
Copy link
Contributor

WDYT about the strings that are sent? Understandable and detailed enough?

Yeah, LGTM!

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
@florian-h05
Copy link
Contributor Author

@digitaldan Can you please take a look at it? I have added support for local setting of the call state Item and extended its values to also include the caller ID.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
@florian-h05 florian-h05 force-pushed the sipclient-statusitem branch from 55d68bc to 3558729 Compare July 8, 2024 22:05
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
@florian-h05 florian-h05 marked this pull request as ready for review July 8, 2024 22:14
@florian-h05 florian-h05 added enhancement New feature or request main ui Main UI labels Jul 9, 2024
Copy link
Contributor

@digitaldan digitaldan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@florian-h05 florian-h05 merged commit 43abf2f into openhab:main Jul 10, 2024
8 checks passed
@florian-h05 florian-h05 deleted the sipclient-statusitem branch July 10, 2024 10:56
@florian-h05 florian-h05 changed the title oh-sipclient: Add call status Item to report call status to server oh-sipclient: Add status Item to report SIP status to server Jul 10, 2024
@florian-h05 florian-h05 changed the title oh-sipclient: Add status Item to report SIP status to server oh-sipclient: Add Item to report SIP status to server Jul 10, 2024
florian-h05 added a commit that referenced this pull request Jul 13, 2024
This regenerated the component docs after #2648.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request main ui Main UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants