SIP client card, as intercom

The card released today. With version 1.0.1 comes the new audio visualizer that shows up when there is no video, and the styling got improved.

Will also make a new post, as much has changed.

Warning! The repository names changed to be more standard. Here are the new names:

2 Likes

solved. Thank you very much, I was not able to solve this.

Hello,

I have a Doorbird D101S as IP doorbell video. It has SIP option.

I use the asterisk Add-on and i try to connect it with the doorbell but i can not.

I use Home Assistant with duckdns, the internal and external URLs are are entered in the HA configuration.

Doorbird doorbell works perfectly with the integration (but this integration havent 2 way voice, this is the reason who i want to try your integration)

I created a SIP user for my doorbell like this in /config/asterisk/sip.conf (described here)

[6001](doorbell)
context=internal
type=friend
host=dynamic
disallow=all
allow=ulaw
allow=h264
username=6001
secret=6001
callerid="doorbell" <6001>
transport=udp

I put this in extensions.conf:

[internal]
exten => _6XXX,1,Dial(SIP/${EXTEN},20)

The doorbell’s configation is:

Asterisk add-on log:

[Mar 18 12:17:35] NOTICE[615]: res_pjsip/pjsip_distributor.c:676 log_failed_request: Request 'REGISTER' from '<sip:[email protected]>' failed for '192.168.1.53:5060' (callid: 54abb63d-083c-4bff-82b2-aff7368e78ed) - No matching endpoint found
[Mar 18 12:17:35] NOTICE[615]: res_pjsip/pjsip_distributor.c:676 log_failed_request: Request 'REGISTER' from '<sip:[email protected]>' failed for '192.168.1.53:5060' (callid: 54abb63d-083c-4bff-82b2-aff7368e78ed) - Failed to authenticate

Asterisk add-on config:

video_support: true
auto_add: true
generate_ssl_cert: false
certfile: fullchain.pem
keyfile: privkey.pem
mailbox: false
mailbox_port: 12345
mailbox_extension: '100'
log_level: notice
ami_password: *********
custom_extensions:
  - type: chan_sip
    name: doorbell
    extension: '6001'

Error code 401 = Unauthorized
The request requires user authentication. This response is issued by UASs and registrars.

Its corresponding with the error in log. So i have somthing wrong in my configuration but i don’t find where.

Someone can help me?

Thank you.

The last addon version doesn’t use sip, you need pjsip

So your extensions are wrong… also on your sip card , that uses websockets, so you need to add a person there, not a custom … Also offcourse the secret

Hi! can’t connect from and to HA sip card
my log looks like this

[2022-03-20 12:47:02] NOTICE[2825] chan_sip.c: Peer '104' is now Reachable. (14ms / 2000ms)
[2022-03-20 12:47:05] ERROR[2826] tcptls.c: Problem setting up ssl connection: error:00000001:lib(0):func(0):reason(1), Internal SSL error
[2022-03-20 12:47:05] WARNING[2826] tcptls.c: FILE * open failed!
[2022-03-20 12:47:31] ERROR[1465] netsock2.c: getaddrinfo("tiredofit-freepbx2", "(null)", ...): Name or service not known
[2022-03-20 12:47:31] WARNING[1465] acl.c: Unable to lookup 'tiredofit-freepbx2'
[2022-03-20 12:47:31] ERROR[2840][C-00000001] netsock2.c: getaddrinfo("tiredofit-freepbx2", "(null)", ...): Name or service not known
[2022-03-20 12:47:31] WARNING[2840][C-00000001] acl.c: Unable to lookup 'tiredofit-freepbx2'

card connected to server, but i can;t make a call and can receive calls (but I see pupup window during incoming call in Home assistant)

Can anyone help with it?

Hello,

Thanks for your answer. I have tried differents things:

into extensions.conf change SIP to PJSIP:

[internal]			
exten => _6XXX,1,Dial(PJSIP/${EXTEN},30)	
exten => _6XXX,2,Hangup()

into pjsip_custom.conf

[doorbird](!)
context=internal
type=friend
host=dynamic
disallow=all
allow=ulaw
allow=h264

[6001](doorbird)
secret=6001

into users.conf

[6001]				
type=friend			
host=dynamic			
dtmfmode=rfc2833		
disallow=all			
allow=ulaw			
fullname = Doorbell		
username = 6001			
secret=6001			
context = internal			
allow=h264

In addon configuration:

video_support: true
auto_add: true
generate_ssl_cert: false
certfile: fullchain.pem
keyfile: privkey.pem
mailbox: false
mailbox_port: 12345
mailbox_extension: '100'
log_level: notice
ami_password: ********
custom_extensions:
  - type: chan_pjsip
    name: doorbell
    extension: '6001'
    secret: '6001'

On supervisor log i get this:

22-03-21 07:53:00 WARNING (MainThread) [supervisor.addons.options] Option 'custom_extensions' does not exist in the schema for Asterisk (3e533915_asterisk)

Same if i change “custom_extesions” to “extension” or “person” (i know person is an home assistant user, but i tried it)

I created a person named doorbird, addon gives it extension [105]
On my DoorBird app i tried to connect it with user 105 and password 1234 (also with empty password).

I always get this error:

[Mar 21 08:06:30] NOTICE[633]: res_pjsip/pjsip_distributor.c:676 log_failed_request: Request 'REGISTER' from '<sip:[email protected]>' failed for '192.168.1.53:5060' (callid: 1f0d1e68-c725-414c-acb5-c2a889207a6f) - No matching endpoint found
[Mar 21 08:06:30] NOTICE[633]: res_pjsip/pjsip_distributor.c:676 log_failed_request: Request 'REGISTER' from '<sip:[email protected]>' failed for '192.168.1.53:5060' (callid: 1f0d1e68-c725-414c-acb5-c2a889207a6f) - Failed to authenticate

Is there an update documentation for the addon anywhere? What is the form configuration?
The card dont show me any extension or person registred:

I’m starting to get lost in the configurations that I tried or not! :sweat_smile:
Any ideas?

i had that bug too, i wasnt able top add an extension (person) reloaded the card, and option was back
there should be an option here to add a person

image

this my first time to add this card and i have created persons and assign them to extensions but this error appeared , also i can’t find any of these persons in SIP.conf files

Hello,

I found persons in pjsip_default.conf

1 Like

I found also persons in mentioned file, but why webSocket is closed…?

it solved when i accept a certifications from SSL

I have updated my extension.conf and PJSIP.conf files to add my pjsip numbers but calles can’t be reached although log file had shown this

Dial function not work. i have made like a feature code to play music and it worked successfully.

How to solve the above problem?

@TECHFox
From the latest version of the Asterisk plugin 2.1.3
That I dial the extensions I set in the extension I have a delay of 20 seconds until the dial rings for the extension,
In previous versions it did not happen to me,
What could be the reason for this?
Attached to the log (extension is 2500)


this is my port forward file , is there any faults…?

Hi @TECHFox ,

is there an step by step tutorial, what i have to do to get this card working? I have a rapsi with asterisk and freePBX. I made all the steps explainend on Tech7Fox github readme. What are the next steps? I have an 2N IP Verso Doorbell and i want to get a call if someone presses the button on that doorbell.

EDIT: I was able to connect the doorbell and my dashboard to freePBX. Now if someone is pushing the button at the doorbell i get following error:

I have two questions:
1.) @pergola.fabio i read you have sucessfully added let’s encrypt certificates so you don’t need to open https://<ip_adress_of_pbxserver>:8089/ws How did you do that? Can you give us a small example please?
2.) I get an authentication failed message (see screenshot). What does it mean? The sip:Sprechanlage is registered to my Fritzbox. Do i need to add the fritzbox as a client?

Sorry for my noobish questions :slight_smile:

the ssl certficates are stored in /SSL share , the asteriks add-on already makes use of that, nothing to configure :slight_smile:
if you use freepbx, just copy those certificates to your freepbx

Hi,
I would like to use 3cx, too, as I have it already running as PBX.
How did you setup 3cx to work with this card?
And which configuration is needed in the card?

I already have:

  • a person in home assistant (altough I would prefer to use users only, as I want to use it for rooms, not persons)
  • configured extensions in 3CX I would like to use (Last Name = Room)
  • 3CX is running on standard port 5060

Configured SIP card to:

type: custom:sipjs-card
server: <FQDN>
port: '5060'
button_size: '48'
extensions:
  - person: person.buro
    name: BĂźro
    extension: '91'
    secret: <password as configured in 3CX>
    icon: mdi:phone-classic
custom:
  - name: Custom1
    number: '123'
    icon: mdi:phone-classic
dtmfs:
  - name: dtmf1
    signal: 1
    icon: mdi:door
custom_title: Intercom
ringtone: ''
ringbacktone: ''

The SIP card tries to connect to "wss://[FQDN]:5060/ws
Resulting in Error “Websocket closed” (code 1006)

Using the IP address instead of FQDN does not change anything.
3CX and Home Assistant are in the same network.

Any hint would be appreciated :slight_smile:

Does 3cx support websocket? Best to check on their forum?

Look here:

It looks like it doesn’t work.