[New Addon] DSS VoIP Notifier: a way to make VoIP call from Hassio

Hi,

I’m just testing this and I think it is awesome!

I was just wondering if it was possible to let hassio hang-up the call after it played the message?

I would like to play a message to my SIP enabled doorbell after someone pressed it. The doorbell automatically picks up when it gets called, but doesn’t hang-up automatically. Which results in the message keeps repeating over and over…

Thanks!

I’m sorry but I don’t think it’s possible: PjSUA is executed asynchronously and addon don’t know when call was answered. It will know only exit status.

I suggest you to

  • decrease call duration (eg. to 10 seconds) (set max_call_time option)
  • create a 15 seconds mp3 file and play it with audio_file_url options. Obviously last seconds can be silence and visitor don’t hear anything…

Let me know if this way will meet your needs and resolve your problem.

bye

Thanks! Will try to play with max_call_time.

Having a brain block as to where to put the configuration stuff. Does it go in the main configuration.yaml?

Thanks. It was in front of my face. Doh!

Hi SDesalve.
Thanks a lot for your contribution. Very interesting add-on. Unfortunately I’m ussing hassbian (not hass.io) and I was wondering whether is possible to map or install in hassbian your add-on, designed for hass.io.
I’m not an expert at all not only in HA but also in Linux and I apologize in case it would be easy to “map”, but I have been looking for information on that and I have not been able to find anything.
I would appreciate a lot if you can confirm if there is some way to enjoy your fantastic add-on in hassbian.
Regards.

No, add-ons is only for Hassio. But, You can make a bash script to run pjsua and place a call…

Thanks a lot for your quick response. I’m “junior” in scripting but I will investigate on it. Doesn’t matter if I can’t use it because it’s designed for hassio, congratulations for your good job and contribution.

Please see pjsua man and set proxy option according your provider requisites.

In your PC config I see proxy…

Hi sdesalve, I like your addon very much but still struggling to get it up and running. Here’s my problem:
Setup:

Add-on version: 4.0.0
You are running the latest version of this add-on.
 System: Home Assistant OS 13.2  (aarch64 / raspberrypi5-64)
 Home Assistant Core: 2024.10.3
 Home Assistant Supervisor: 2024.11.2

I have one FB 7590 as Router with a german Telekom account, it has the 192.168.1.x IP and is connected to DynDns.org for e.g. my WebServer. The HASSIO is on an RasPi in a network behind IPFIRE firewall, with the IP 192.168.1.x.
The firewall is open for the both TCP and UDP 5060 ports on the RasPi.
The traffic from green to red is always allowed.
The FB has one VoIP number and the credentials for the Magenta TV account are an e-mail address + Password. The credentials are OK, means login at my Mageta TV account via Web-Browser works. The Google bit of the addon is working fine, so the voice.mp3 is being created as desired (in the Share/addon-Folder) after automation is triggered. The Protocol runs up to the Account list, but I get always this:

[Info] Received messages {"call_sip_uri":"sip:[email protected]:5060","message_tts":"Testnachricht von HomeAutomation"}
Converting audio file 'http://192.168.1.x:8123/api/tts_proxy/3061d7a8970d00ca7678a7d34ffe6c6ec00ee60a_de_-_google_translate.mp3'...
Audio succesfully converted...
Starting SIP Client and calling 'sip:[email protected]:5060'...
This call will be terminated after '120' seconds.
16:07:31.661         os_core_unix.c !pjlib 2.11.1 for POSIX initialized
16:07:31.661         sip_endpoint.c  .Creating endpoint instance...
16:07:31.661                  pjlib  .select() I/O Queue created (0x7f9f015100)
16:07:31.661         sip_endpoint.c  .Module "mod-msg-print" registered
16:07:31.661        sip_transport.c  .Transport manager created.
16:07:31.661           pjsua_core.c  .PJSUA state changed: NULL --> CREATED
16:07:31.669           pjsua_core.c  .pjsua version 2.11.1 for Linux-6.6.31/aarch64 initialized
16:07:31.671            pjsua_app.c  .Turning sound device -99 -99 ON
16:07:31.671                 main.c  Ready: Success
16:07:31.671            pjsua_app.c  .......Call 0 state changed to CALLING
>>>>
Account list:
  [ 0] <sip:192.168.1.x:5060>: does not register
       Online status: Online
  [ 1] <sip:192.168.1.x:5060;transport=TCP>: does not register
       Online status: Online
 *[ 2] sip:[email protected]:5060: does not register
       Online status: Online
Buddy list:
 [ 1] <?>  sip:[email protected]:5060

The dss_pjsua.log shows this:

ALSA lib confmisc.c:855:(parse_card) cannot find card '0'
ALSA lib conf.c:5111:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory
ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings
ALSA lib conf.c:5111:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name
ALSA lib conf.c:5111:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5599:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM sysdefault
ALSA lib confmisc.c:855:(parse_card) cannot find card '0'
ALSA lib conf.c:5111:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory
ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings
ALSA lib conf.c:5111:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name
ALSA lib conf.c:5111:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5599:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM sysdefault
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround40
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround41
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround50
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround51
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib confmisc.c:855:(parse_card) cannot find card '0'
ALSA lib conf.c:5111:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory
ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings
ALSA lib conf.c:5111:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name
ALSA lib conf.c:5111:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5599:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM default
ALSA lib confmisc.c:855:(parse_card) cannot find card '0'
ALSA lib conf.c:5111:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory
ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings
ALSA lib conf.c:5111:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name
ALSA lib conf.c:5111:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5599:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM default
ALSA lib confmisc.c:855:(parse_card) cannot find card '0'
ALSA lib conf.c:5111:(_snd_config_evaluate) function snd_func_card_id returned error: No such file or directory
ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings
ALSA lib conf.c:5111:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name
ALSA lib conf.c:5111:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5599:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM dmix
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock

The dss_voip.conf is empty …

What am I missing? I tried everything mentioned here so far, with/without custom option --ip-addr=, with IP rather than fritz.box as address, with my dyndns.org address, with another (internal FB) number declared as VoIP number …

Many thanks in advance, Cheers, Falk

please put here your addon configuration

have you tried other version of add-on? sometimes arm version on raspberry it will fail to place a call

why 192.168.1.x and 192.168.2.x???

What’s your Lan IP pool?

write your Lan topology also

sdesalve:

Thanks a lot for your quick response!
My config:

sip_parameters:
  caller_id_uri: sip:[email protected]:5060
  realm: "*"
  username: [email protected]
  password: myPWD
max_call_time: 180
pjsua_custom_options: "--ip-addr=192.168.1.x"

As said, the HASSIO is within my Green LAN behind the IPFIRE Firewall with 192.168.1.2 - 192.168.1.255 and the FritzBox 7590 (Router) is within the DMZ (red) with 192.168.2.1 - 192.168.2.255 → All traffic from Green to Red is allowed, the firewall blocks all ports within the Green Network from Red unless a rule does allow access. Many thanks again and Cheers, Falk

No I didn’t, shall I? Many thanks and Cheers, Falk

try to use regular version. it should be installable also on raspberry

also try to use microsip.org client within same LAN to check firewall

also have you disabled VoIP filter in your Fritz box? otherwise Lan client cannot place sip calls

Many thx again, will try the microsip tool and come back afterwards, could not see a VoIP filter within the FB… Cheers, Falk

This is the new log, from the arm version:

 Add-on: DSS VoIP Notifier for ARM
 VoIP Notifier for Home Assistant (for ARM processors)
-----------------------------------------------------------
 Add-on version: 4.1.0
 You are running the latest version of this add-on.
 System: Home Assistant OS 13.2  (aarch64 / raspberrypi5-64)
 Home Assistant Core: 2024.11.2
 Home Assistant Supervisor: 2024.11.2
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing... 
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[Info] Starting addon...
PJSUA_CUSTOM_OPTIONS = 'pjsua_custom_options: "--ip-addr=192.168.1.xxx"'
MAX_CALL_TIME = '120'
[Info] Listening for messages via stdin service call...
[Info] Received messages {"call_sip_uri":"sip:[email protected]:5060","message_tts":" Testnachricht von HomeAutomation"}
Converting audio file 'http://192.168.1.xxx:8123/api/tts_proxy/3061d7a8970d00ca7678a7d34ffe6c6ec00ee60a_de_-_google_translate.mp3'...
Audio succesfully converted...
Starting SIP Client and calling 'sip:[email protected]:5060'...
This call will be terminated after '120' seconds.
22:54:28.157         os_core_unix.c !pjlib 2.9 for POSIX initialized
22:54:28.157         sip_endpoint.c  .Creating endpoint instance...
22:54:28.157                  pjlib  .select() I/O Queue created (0x55c9a61c90)
22:54:28.157         sip_endpoint.c  .Module "mod-msg-print" registered
22:54:28.157        sip_transport.c  .Transport manager created.
22:54:28.157           pjsua_core.c  .PJSUA state changed: NULL --> CREATED
22:54:28.157     pjsua_app_config.c  Invalid SIP URI pjsua_custom_options:
22:54:28.157           pjsua_core.c  Shutting down, flags=0...
22:54:28.157           pjsua_core.c  PJSUA state changed: CREATED --> CLOSING
22:54:28.157           pjsua_call.c  .Hangup all calls..
22:54:28.157          pjsua_media.c  .Call 0: deinitializing media..
22:54:28.157          pjsua_media.c  .Call 1: deinitializing media..
22:54:28.157          pjsua_media.c  .Call 2: deinitializing media..
22:54:28.157          pjsua_media.c  .Call 3: deinitializing media..
22:54:28.157           pjsua_pres.c  .Shutting down presence..
22:54:29.166           pjsua_core.c  .Destroying...
22:54:29.166          pjsua_media.c  .Shutting down media..
22:54:29.166         sip_endpoint.c  .Destroying endpoint instance..
22:54:29.166         sip_endpoint.c  .Module "mod-msg-print" unregistered
22:54:29.166        sip_transport.c  .Destroying transport manager
22:54:29.166         sip_endpoint.c  .Endpoint 0x55c9a56f08 destroyed
22:54:29.166           pjsua_core.c  .PJSUA state changed: CLOSING --> NULL
22:54:29.166           pjsua_core.c  .PJSUA destroyed...
./run: line 337: echo: write error: Broken pipe
./run: line 337: echo: write error: Broken pipe
[Error] pjsua Exit code: 1
[Info] Call ended...
[Info] Listening for messages via stdin service call..

I think I used the wrong addon version, so after Hassio Core update and the installation of the arm addon version I’m a step ahead, so ‘NO register’ is off the table, just need to fiddle around with the IP’s and numbers I think …

Many thanks and Cheers, Falk

Thanks a lot again: That tickbox is empty, so should not be part of the problem.