SIP Doorbell, android tablet and HA integration

Just in case…make sure you enable your browser to have access to the speaker and microphone.

Thank you all. It was a setting in the Door station, causing it to not call properly.

So, you did it? it works?

I wish it was all working. But thanks to your great help I am making great progress.
I only have a hour or so per week to work on this project.
I still can’t get the camera to show, so I will start to rewrite the card to show the camera.
Also I would like to be able to add a button to initiate a call to the door station.
cheers
Mark

I don’t do calling the GDS… So, I don’t know. There is an adapted card here: https://github.com/tommyjlong/doorvivint-card
The solution was describe in this thread SIP Doorbell, android tablet and HA integration
HTH

Thank you again. Using some of the code from DoorVivint, I am now able to call the GDS. Another step forward.

Thank you all. I have made some great progress. I am acutally using the DoorDriod and Doorvivint and both work perfectly in Chrome on Windows 10.
I have a FireHD8 with Chrome and I can call the GDS3710 from the FireHD using the call button and two way audio works fine.
But when the call button is pressed on the GDS3710, the Answer reject buttons display on the FireHD, but when I select Answer the call, I get the following messages. The same thing happens if using either DoorDriod or Doorvivint. So I think it is more of an Andriod Chome issue.

Session - Incoming call from "3710 door" <sip:1001@raspbx;user=phone>;tag=2f800c85-b0b5-4371-816a-0f0929750723 doorvivint-card.js:305 Stopping camera stream... doordroid-card.js:132 [Violation] 'click' handler took 182ms doordroid-card.js:120 call failed doorvivint-card.js:177 Incoming - call failed [Violation] 'message' handler took 223ms

I have the same issue if I try it from an Andriod phone. Any suggestions on how I could debug this one?

Sorry, no idea at all…

HI Greengolfer

Just started working on this project, and seem to have fallen at the first (well second hurdle) I have built a fresh FreePBX server (DigitalOcean Market Place) I have created 4 extensions (1001 -1004) all pjsip, but 1004 has webrtc enabled.

I have been trying to work out how I can check the extension in the command line to see if the settings match what you have in your post, could you advise on how I can see the configuration of the extension to make sure it doesn’t in fact match.

Many Thanks

Which extension are you looking for?
With this DigitalOcean version , do you have access to the file system with ssh?
Have you allowed wss in pjsip settings?

Yes I have full access to ssh, yes i have allowed wss in pjsip

I was trying to look at setting for ext 1004 to make sure it’s configured the same as yours.

Many thanks

If you look at /etc/asterisk/pjsip.endpoint.conf

The extension for the tablet running lovelace has the following configuration:

[1004]
type=endpoint
aors=1004
auth=1004-auth
tos_audio=ef
tos_video=af41
cos_audio=5
cos_video=4
disallow=h264,mpeg4
allow=ulaw,g729
context=from-internal
callerid=hass <1004>

dtmf_mode=rfc4733
aggregate_mwi=yes
use_avpf=yes
rtcp_mux=yes
ice_support=yes
media_use_received_transport=yes
trust_id_inbound=yes
media_encryption=no
timers=yes
media_encryption_optimistic=no
send_pai=yes
rtp_symmetric=yes
rewrite_contact=yes
force_rport=yes
language=fr
one_touch_recording=on
record_on_feature=apprecord
record_off_feature=apprecord
media_encryption=dtls
dtls_verify=no
dtls_setup=actpass
dtls_rekey=0
dtls_cert_file=/etc/asterisk/keys/default.crt
dtls_private_key=/etc/asterisk/keys/default.key

This file is managed by the GUI. So, no change in here. Otherwise they will be overwritten by the gui…

Ok think i go it, now editing all these settings via GUI

Evening, sorry to be a pain, looks like the version i have (freepbx 15) seems to be adding bits to the config

[1004]
type=endpoint
aors=1004
auth=1004-auth
tos_audio=ef
tos_video=af41
cos_audio=5
cos_video=4
allow=ulaw,alaw,gsm,g726,g722,g729,h264,mpeg4
context=from-internal
callerid=hass <1004>

dtmf_mode=rfc4733
direct_media=yes
mailboxes=1004@default

mwi_subscribe_replaces_unsolicited=yes
aggregate_mwi=yes
use_avpf=yes
rtcp_mux=yes
max_audio_streams=1
max_video_streams=1
bundle=yes
ice_support=yes
media_use_received_transport=yes
trust_id_inbound=yes
user_eq_phone=no
send_connected_line=yes
media_encryption=dtls
timers=yes
timers_min_se=90
media_encryption_optimistic=no
refer_blind_progress=no
refer_blind_progress=no
rtp_timeout=30
rtp_timeout_hold=300
send_pai=yes
rtp_symmetric=yes
rewrite_contact=yes
force_rport=yes
language=en
one_touch_recording=on
record_on_feature=apprecord
record_off_feature=apprecord
dtls_verify=fingerprint
dtls_setup=actpass
dtls_rekey=0
dtls_cert_file=/etc/asterisk/keys/default.crt
dtls_private_key=/etc/asterisk/keys/default.key

this is what I have, I might have a go with HASS like this to see if it does anything, i have tested the extensions can call each other (1001,1002 and 1003) I haven’t tried 1004 for making and receiving calls yet

I have no option to disallow=h264,mpeg

but i can disable them for every extention, under astericks sip settings

No!!!
As I said this is created by the GUI and you cannot change it like that.
So, either you do it through the GUI or you will have to override the extension definition by doing it manually in (I think) pjsip.endpoint_custom.conf

Don’t think it is a problem.
Comparing quickly yours and mine, it looks ok.
The important part is to allow and disallow the correct codec.
So your allow line should be like mine. Otherwise, no sound :slight_smile:

allow=ulaw,g729

that’s relatively easy, via gui, but it will change those settings for all extensions, I don’t think there are an option to have different settings for different extensions

You can. It is in the advanced tab of the extension.

you are right, I have spotted where and made the changes

My config now:

[1004]
type=endpoint
aors=1004
auth=1004-auth
tos_audio=ef
tos_video=af41
cos_audio=5
cos_video=4
disallow=h264,mpeg4
allow=ulaw,g729
context=from-internal
callerid=hass <1004>

dtmf_mode=rfc4733
direct_media=yes
aggregate_mwi=yes
use_avpf=yes
rtcp_mux=yes
bundle=yes
ice_support=yes
media_use_received_transport=yes
trust_id_inbound=yes
user_eq_phone=no
send_connected_line=no
media_encryption=dtls
timers=yes
timers_min_se=90
media_encryption_optimistic=no
refer_blind_progress=no
refer_blind_progress=no
rtp_timeout=30
rtp_timeout_hold=300
send_pai=yes
rtp_symmetric=yes
rewrite_contact=yes
force_rport=yes
language=en
one_touch_recording=on
record_on_feature=apprecord
record_off_feature=apprecord
dtls_verify=yes
dtls_setup=actpass
dtls_rekey=0
dtls_cert_file=/etc/asterisk/keys/default.crt
dtls_private_key=/etc/asterisk/keys/default.key

one thing about what you sent me on your config earlier you had both media_encryption=dtls and media_encryption=no i assume the DTLS is the right one