SIP client card, as intercom

Devices not available…
Do you have a microphone and speaker connected?
And which browser are you using? I tested this on edge and chrome.

Your welcome! :smiley:

Let me know how it goes.

also interested in remote call

The card is pointing to an internal IP, what happens if you use HA on public internet? does the card still works? or do we need to open up a port in firewall?
or is the card always able to contact the PBX, regardless where you use HA?

No the connection is from the client. You need to open the port 8089.

Ok, sip and RTP ports are not needed? Only the websocket?

Actually, now I think about it I’m not sure… Will look at it end of the week. And if it is possible to use home assistant’s websocket. That way you don’t have to open any extra ports. :slight_smile:

Hey Jordy, that’s it! Chrome was silently blocking my mic because it was seen as an unsecure site (http://192.168.50.5:8123). I used “chrome://flags/#unsafely-treat-insecure-origin-as-secure” to treat it as secure. And voila: everything is now working. Totally did not think about this. Thanks again for your help and for creating this card. I’ll keep following your progress and using it in my setup.

anyone tried using this addon with own certificates?
lets encrypt makes 2 .pem files … but seems asterisk wants a .cert file
cant find any tutorial how to convert to .cert… can only find how to convert to .crt and .pfx …

then afterwards we need to change http.conf and sip.conf? to point to cirrect path/file

Great! Hope you like it :slight_smile:

let me know if you get any problems.

Im my experience Asterisk just accepts .pem as cert file. Otherwise you can always go in the code to remove the key and change the file to .cert.

And yes, then you need to change the paths in those files.

ah ok

i see in http.conf below:

tlscertfile=/etc/asterisk/keys/asterisk.cert
tlsprivatekey=/etc/asterisk/keys/asterisk.key

so i can comment out the key line, and change first line to my .pem file?
EDIT: or is the tlsprivatekey, actually also the privkey.pem file (the one from letsencrypt)

and in sip.conf, i also change that line to the .pem file?

dtlscertfile=/etc/asterisk/keys/asterisk.cert ; Tell Asterisk where your DTLS cert file is

so both files are needed?

Both are needed. Try setting all of them to your .pem file.

I meant remove the key from the code of the .pem file to convert it to .cert. But I don’t think that that is needed.

Ok, gonna try later, thnx

Sorry for the late reply, but for some reason I am getting no email notifications for this discussion… :sweat_smile:

I will wait for the new integration too as I guess it will be WAY more easy to setup!

Examples and shirt wrote ups welcome how I setup the card from add-on to the card

From what I can tell the card connects directly to the FreePBX server from your device. So the server would need to be publicly accessible as well. I tried it over a vpn from my office and I needed to make some changes to my FreePBX setup to get it to work.

Haven’t setup the SSL yet but will finish it up in the next few days. I’m building a video doorbell with this and a webrtc video stream on a raspberry pi. Need a few weeks to finish as things are pretty busy at the moment.

Yes that’s my goal to, to make it compatible with my video intercom, and your show rtsp streams to all clients, with door open (DTMF) command

perfect, that works, now if i go the the website http://remote:8089/ws , i get a valid template
dont need to accept anything anymore

tlscertfile=/etc/asterisk/keys/fullchain.pem
tlsprivatekey=/etc/asterisk/keys/privkey.pem

one step closer to make it work on the companion app, since we cant accept the certificate there
are you going to work also on the deviceID ? so we can use the companion app?

EDIT: i pointed above to the /etc directory … is there also a way to point to an path outside the asterik addon? so i can point directly to the /ssl directory? there are the files from the lets encrypt addon

ok, have some time to test out, with the asterisk add-on, it was not possible yet to make calls right? or to register? i have 2 people now in HA, and card like below configured, but those 2 people (sip users are offline)

[12:20:12] INFO: Name/username Host Dyn Forcerport Comedia ACL Port Status Description 101/user1 (Unspecified) D Auto (No) No 0 Unmonitored 102/user2 (Unspecified) D Auto (No) No 0 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 2 offline]

          - type: custom:sipjs-client-card
            server: wss://192.168.0.17:8089/ws
            ringtone: /local/ringtone.mp3
            clients:
              1: 
                aor: sip:[email protected]
                username: 101
                password: 101
              2: 
                aor: sip:[email protected]
                username: 102
                password: 102

With the add-on + new card deviceID won’t be a thing. If you want to find the deviceID of your companion app you can go to developer tools and find the correct light entity of browser_mod.

I will add the ssl folder in the next update.

The add-on can register, just not make calls yet. Default password is 1234.