I’ve started working on something which I had thought of ever I’ve put a openHAB (3) tablet on the wall:
a SIP client integration.
Mainly for my SIP based door intercom, to be able to see who is there, answer and open the door without the need to switch to another app on the tablet.
Actually, I thought this is highly complex. But it turned out to be relatively easy and is already fairly working. Here is what I did and how it works:
To use it, you simply put it on the main page that is usually shown on your tablet. Currently it shows a door icon and a dot indicating the SIP status (red=disconnected, orange=connected but unregistered, green=registered).
When a call comes in, a (fullscreen) popup is opened showing an image - which is meant to be a “live” mjpeg image from the front door - and the tablet rings. After accepting the “call” you can send a DTMF sequence to open the door lock.
See some screenshots below.
Incoming call from front door (with fake image):
- no SIP video yet (I’m currently using a mjpeg stream from my front door camera to see the video upfront (couldn’t get early media to work))
- Framework7 keeps previous pages loaded in background which keeps the SIP client active
- only works when the page with the SIP widget is shown and with the tablet being awake, but I think this is ok for many/most tablet installations
- requires a webrtc capable PBX, e.g. asterisk (popular german FritzBox alone won’t do). Setup is not very complicated, but requires HTTPS to be set up
- since it requires JS it needs to be shipped with OH (TMK)
- with multiple tablets this could also be used as intercom. Though, in order to use different registrations for each device, the credentials need to be stored somehow in local browser storage
- for this (and others) SIP video could also be added
The current code can be found on github.
Let me know what you think.
Also, I’m curious who else might be interested in this. If there’s enough votes, perhaps it gets included.