[New Addon] DSS VoIP Notifier: Hassio makes phone calls to you! ☎️

So DSS Voip Notifier can work only with Google TTS, correct?

No. It’s not correct

Where I can find a specific log, to try investigate the crash of DSS Voip when configured with picotts?

The only one I found is this:

[Info] Received messages {"call_sip_uri":"sip:392******@192.168.1.1:5060","message_tts":"Prova segnalazione allarme"}
parse error: Expected string key before ':' at line 1, column 4
[cont-finish.d] executing container finish scripts...
[cont-finish.d] 99-message.sh: executing... 
[cont-finish.d] 99-message.sh: exited 0.
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.

I have also found this:

file: /usr/share/hassio/share/dss_voip/dss_pjsua.log

MAX_CALL_TIME =              '20'
sip_parameters = '{"caller_id_uri":"sip:[email protected]","realm":"*","username":"voip-test1","password":"test_voip1"}'
[Info] Received messages '{"call_sip_uri":"sip:392*******@192.168.1.1:5060","message_tts":"Prova segnalazione allarme"}'
CALL_SIP_URI_VALUE = 'sip:392********@192.168.1.1:5060'
MESSAGE_TTS_VALUE = 'Prova segnalazione allarme'
DATA_JSON = '{
  "message": "Prova segnalazione allarme",
  "platform": "google_translate"
}'
JSONGOOGLETTS = '500: Internal Server Error'

Where it find the line ?

  "platform": "google_translate"

May be I need to redefine it somewhere?

Thanks

OK, I get it.

I was confusing the general configuration.yaml (where I defined “general” tts) with the integration-specific configuration.
So, was missing the

platform: picotts

in the DDS_Voip configuration.

Parameter names are similar and I got confused.

Many thanks for your assistance :slight_smile:

Giulio

1 Like

@sdesalve Is there a way to call several numbers at once?

Yes, I’m using pbxes.com

Hi Sdesalve,

i am playing a few months with homeassistant and discovered your sip voip addon yesterday.
I have a 3cx pbx (in my office) and used your suggested (git) config and service call to test connections and calls.
Had some problems and after changing settings in ha and 3cx i discovered that a config line is necessary so that calls are succesfull.

The next line is necessary in the config file.
pjsua_custom_options: "–no-tcp"

You can maybe add it on git so that other futur users don’t have to search.

Regards
Hans

1 Like

Hello @sdesalve,

I successfully used your great addon in the past, and now, after a few months without using it, I noticed it does not work anymore on my system, giving error 408 (Request Timeout). I was wondering if something has changed in these months - maybe I have to update my config.

Here you have a little overview of my system:

  • Raspberry Pi3+ with standard HomeAssistant OS image.
  • Internal network: 192.168.2.0/24
  • VOIP Provider: Voipstunt
  • I can successfully call the same number from an IP phone on the same network than my HA.
  • I cannot install the “DSS VoIP Notifier for ARM” as it gives me “(‘Connection aborted.’, ConnectionResetError(104, ‘Connection reset by peer’))” during the installation, hence I’m using the other one.

The addon configuration has not changed since last time it worked:

sip_parameters:
  caller_id_uri: sip:[email protected]
  realm: "*"
  username: MYUSERNAME
  password: MYPASSWORD
pjsua_custom_options: "--no-tcp"

The addon’s log is:

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing... 
-----------------------------------------------------------
 Add-on: DSS VoIP Notifier
 VoIP Notifier for Home Assistant
-----------------------------------------------------------
 Add-on version: 4.0.0
 You are running the latest version of this add-on.
 System: Home Assistant OS 9.4  (armv7 / raspberrypi3)
 Home Assistant Core: 2023.1.7
 Home Assistant Supervisor: 2022.12.1
-----------------------------------------------------------
 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 = '--no-tcp'
[Info] Listening for messages via stdin service call...
[Info] Received messages {"call_sip_uri":"sip:[email protected]","audio_file_url":"https://192.168.X.XXX:8123/local/file.wav"}
Converting audio file 'https://192.168.X.XXX:8123/local/file.wav'...
Audio succesfully converted...
Starting SIP Client and calling 'sip:[email protected]'...
This call will be terminated after '50' seconds.
07:28:19.781 os_core_unix.c !pjlib 2.11.1 for POSIX initialized
19:24:51.783 sip_endpoint.c  .Creating endpoint instance...
19:24:51.783          pjlib  .select() I/O Queue created (0x767070c8)
19:24:51.783 sip_endpoint.c  .Module "mod-msg-print" registered
19:24:51.783 sip_transport.  .Transport manager created.
01:53:07.784   pjsua_core.c  .PJSUA state changed: NULL --> CREATED
06:05:07.829   pjsua_core.c  .pjsua version 2.11.1 for Linux-5.15.76/armv7l initialized
13:26:27.834    pjsua_app.c  .Turning sound device -99 -99 ON
13:26:27.834         main.c  Ready: Success
05:43:32.028    pjsua_app.c  .......Call 0 state changed to CALLING
>>>>
Account list:
  [ 0] <sip:172.30.33.4:5060>: does not register
       Online status: Online
 *[ 1] sip:[email protected]: does not register
       Online status: Online
Buddy list:
 [ 1] <?>  sip:[email protected]
+=============================================================================+
|       Call Commands:         |   Buddy, IM & Presence:  |     Account:      |
|                              |                          |                   |
|  m  Make new call            | +b  Add new buddy       .| +a  Add new accnt |
|  M  Make multiple calls      | -b  Delete buddy         | -a  Delete accnt. |
|  a  Answer call              |  i  Send IM              | !a  Modify accnt. |
|  h  Hangup call  (ha=all)    |  s  Subscribe presence   | rr  (Re-)register |
|  H  Hold call                |  u  Unsubscribe presence | ru  Unregister    |
|  v  re-inVite (release hold) |  t  ToGgle Online status |  >  Cycle next ac.|
|  U  send UPDATE              |  T  Set online status    |  <  Cycle prev ac.|
| ],[ Select next/prev call    +--------------------------+-------------------+
|  x  Xfer call                |      Media Commands:     |  Status & Config: |
|  X  Xfer with Replaces       |                          |                   |
|  #  Send RFC 2833 DTMF       | cl  List ports           |  d  Dump status   |
|  *  Send DTMF with INFO      | cc  Connect port         | dd  Dump detailed |
| dq  Dump curr. call quality  | cd  Disconnect port      | dc  Dump config   |
|                              |  V  Adjust audio Volume  |  f  Save config   |
|  S  Send arbitrary REQUEST   | Cp  Codec priorities     |                   |
+-----------------------------------------------------------------------------+
|  q  QUIT   L  ReLoad   sleep MS   echo [0|1|txt]     n: detect NAT type     |
+=============================================================================+
You have 1 active call
Current call id=0 to sip:[email protected] [CALLING]
>>> 06:09:24.065  tsx0x76634b24  .......Temporary failure in sending Request msg INVITE/cseq=29279 (tdta0x76637434), will try next server: Unsupported transport (PJSIP_EUNSUPTRANSPORT)
06:09:24.065  tsx0x76634b24  .......Temporary failure in sending Request msg INVITE/cseq=29279 (tdta0x76637434), will try next server: Unsupported transport (PJSIP_EUNSUPTRANSPORT)
13:26:28.834    pjsua_app.c  .Turning sound device -99 -99 OFF
06:09:56.065    pjsua_app.c  ....Call 0 is DISCONNECTED [reason=408 (Request Timeout)]
No current call
>>> 14:18:47.337        timer.c  .Dumping timer heap:
14:18:47.337        timer.c  .  Cur size: 0 entries, max: 3070
[Info] Call ended...
[Info] Listening for messages via stdin service call...

So for some strange reason, I can see everything working until the moment it has to call (please note that I do not hear any ring, the call is never received). It is exactly like I was trying to use the TCP connection instead of the UDP, but the --no-tcp option is there.

I call the addon with a simple configuration:

service: hassio.addon_stdin
data_template:
  addon: 89275b70_dss_voip
  input:
    call_sip_uri: sip:[email protected]
    audio_file_url: https://192.168.X.XXX:8123/local/alarma.wav

I don’t know if this version 4.0.0 requires anything different than the old one I had in the past, but I could not see anything new or relevant in the instructions.

Would you have any pointers on where the issue might be?

Thank you very much!

On Raspberry, with last hassio addon base image updates, you’ll need to install ARM version.
Have you tried to restart your raspberry, not only Hassio?

Thank you @sdesalve for the quick reply. I have rebooted again a couple of times and uninstalled the “non-ARM” addon. I still get the error. However, in the Supervisor’s logs, I can see this error, which might be useful:

23-01-24 19:28:48 ERROR (SyncWorker_2) [supervisor.utils.json] Can't read json from /data/addons/git/89275b70/dss_voipARM/build.json: Expecting property name enclosed in double quotes: line 7 column 5 (char 213)
23-01-24 19:28:48 INFO (SyncWorker_2) [supervisor.docker.addon] Starting build for 89275b70/armv7-addon-dss_voipARM:4.0.0
23-01-24 19:28:49 ERROR (SyncWorker_2) [supervisor.docker.addon] Can't build 89275b70/armv7-addon-dss_voipARM:4.0.0: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))

It seems to point to the build.json on the repo, which it seems to me now that I look at it, that it contains an extra coma on the line 7… Can you maybe check please? I think that there should not be a coma as it’s the last line in the sequence…

Thank you!

damns! You’re right!

could you try to fetch repository updates and install ARM version Now?
Sorry, I don’t have a Raspberry anymore

Hey, I tried, but the “connection reset error” is still there. The other error regarding the build file is gone now, so at least one thing is gone!

I don’t understand why the arm version would not install, while the other goes smoothly…

Have you got any other idea maybe?

Thank you!

@sdesalve, little update: I forked your repo this morning and tried to make it work without any success - I always got the ‘Connection reset by peer’ error.

Then I tried something different: I updated the Dockerfile and the build.json in the non-ARM addon to match the base image urls of the ARM one. A part from a little complaint about finding the specific version of coreutils and wget, that I temporarily removed from the Dockerfile, the addon built, started and worked right away!

So this means that there must be some issue in the ARM version, but could not pinpoint it.

Will try to investigate this further when I have some more time, but I wanted to share this update with you.

Hello, unfortunately after more than one year i’m not able any more to process a call…The addon configuration is still the same, the Voip Account (Telbo) is working, the script is the same.

Here it is the log, any hint?

Thank you

       Online status: Online
 *[ 1] sip:[email protected]: does not register
       Online status: Online
Buddy list:
 [ 1] <?>  sip:[email protected]
+=============================================================================+
|       Call Commands:         |   Buddy, IM & Presence:  |     Account:      |
|                              |                          |                   |
|  m  Make new call            | +b  Add new buddy       .| +a  Add new accnt |
|  M  Make multiple calls      | -b  Delete buddy         | -a  Delete accnt. |
|  a  Answer call              |  i  Send IM              | !a  Modify accnt. |
|  h  Hangup call  (ha=all)    |  s  Subscribe presence   | rr  (Re-)register |
|  H  Hold call                |  u  Unsubscribe presence | ru  Unregister    |
|  v  re-inVite (release hold) |  t  ToGgle Online status |  >  Cycle next ac.|
|  U  send UPDATE              |  T  Set online status    |  <  Cycle prev ac.|
| ],[ Select next/prev call    +--------------------------+-------------------+
|  x  Xfer call                |      Media Commands:     |  Status & Config: |
|  X  Xfer with Replaces       |                          |                   |
|  #  Send RFC 2833 DTMF       | cl  List ports           |  d  Dump status   |
|  *  Send DTMF with INFO      | cc  Connect port         | dd  Dump detailed |
| dq  Dump curr. call quality  | cd  Disconnect port      | dc  Dump config   |
|                              |  V  Adjust audio Volume  |  f  Save config   |
|  S  Send arbitrary REQUEST   | Cp  Codec priorities     |                   |
+-----------------------------------------------------------------------------+
|  q  QUIT   L  ReLoad   sleep MS   echo [0|1|txt]     n: detect NAT type     |
+=============================================================================+
You have 1 active call
Current call id=0 to sip:[email protected] [CALLING]
>>> 21:16:29.541      tsx0x56292bcec468  .......Temporary failure in sending Request msg INVITE/cseq=4682 (tdta0x56292bce3768), will try next server: Unsupported transport (PJSIP_EUNSUPTRANSPORT)
21:16:29.626            pjsua_app.c  .....Call 0 state changed to EARLY (183 Session progress)
>>> 21:16:59.511            pjsua_app.c  .....Call 0 is DISCONNECTED [reason=487 (Request Terminated)]
21:16:59.511     pjsua_app_common.c  .....
  [DISCONNCTD] To: sip:[email protected];tag=9f0313ac63764394dd281
    Call time: 00h:00m:00s, 1st res in 113 ms, conn in 0ms
    #0 audio iLBC @8kHz, sendrecv, peer=ip:33104
       SRTP status: Not active Crypto-suite: 
       RX pt=104, last update:00h:00m:04.213s ago
          total 994pkt 49.7KB (89.4KB +IP hdr) @avg=13.3Kbps/23.9Kbps
          pkt loss=0 (0.0%), discrd=0 (0.0%), dup=0 (0.0%), reord=0 (0.0%)
                (msec)    min     avg     max     last    dev
          loss period:   0.000   0.000   0.000   0.000   0.000
          jitter     :   0.000   0.134   0.500   0.125   0.052
       TX pt=104, ptime=30, last update:never
          total 804pkt 40.2KB (72.3KB +IP hdr) @avg=10.7Kbps/19.3Kbps
          pkt loss=0 (0.0%), dup=0 (0.0%), reorder=0 (0.0%)
                (msec)    min     avg     max     last    dev 
          loss period:   0.000   0.000   0.000   0.000   0.000
          jitter     :   0.000   0.000   0.000   0.000   0.000
       RTT msec      :   0.000   0.000   0.000   0.000   0.000
21:17:00.511            pjsua_app.c  ..Turning sound device -99 -99 OFF
[Info] Call ended...
[Info] Listening for messages via stdin service call...
[Info] Received messages {"call_sip_uri":"sip:[email protected]","message_tts":"Prova Chiamata"}
Converting audio file 'https://numberx:8123/api/tts_proxy/c5a7721d695ebaaa0a9e2b2b3dfe3492340326f8_it_-_google_translate.mp3'...
Audio succesfully converted...
Starting SIP Client and calling 'sip:[email protected]'...
This call will be terminated after '30' seconds.
21:17:28.873         os_core_unix.c !pjlib 2.9 for POSIX initialized
21:17:28.873         sip_endpoint.c  .Creating endpoint instance...
21:17:28.874                  pjlib  .select() I/O Queue created (0x55c6e95acc90)
21:17:28.874         sip_endpoint.c  .Module "mod-msg-print" registered
21:17:28.874        sip_transport.c  .Transport manager created.
21:17:28.874           pjsua_core.c  .PJSUA state changed: NULL --> CREATED
21:17:28.886           pjsua_core.c  .pjsua version 2.9 for Linux-5.15.90/x86_64 initialized
21:17:28.887            pjsua_app.c  .Turning sound device -99 -99 ON
21:17:28.887                 main.c  Ready: Success
21:17:28.889            pjsua_app.c  .......Call 0 state changed to CALLING
>>>>
Account list:
  [ 0] <sip:172.30.33.7:5060>: does not register
       Online status: Online
 *[ 1] sip:[email protected]: does not register
       Online status: Online
Buddy list:
 [ 1] <?>  sip:[email protected]
+=============================================================================+
|       Call Commands:         |   Buddy, IM & Presence:  |     Account:      |
|                              |                          |                   |
|  m  Make new call            | +b  Add new buddy       .| +a  Add new accnt |
|  M  Make multiple calls      | -b  Delete buddy         | -a  Delete accnt. |
|  a  Answer call              |  i  Send IM              | !a  Modify accnt. |
|  h  Hangup call  (ha=all)    |  s  Subscribe presence   | rr  (Re-)register |
|  H  Hold call                |  u  Unsubscribe presence | ru  Unregister    |
|  v  re-inVite (release hold) |  t  ToGgle Online status |  >  Cycle next ac.|
|  U  send UPDATE              |  T  Set online status    |  <  Cycle prev ac.|
| ],[ Select next/prev call    +--------------------------+-------------------+
|  x  Xfer call                |      Media Commands:     |  Status & Config: |
|  X  Xfer with Replaces       |                          |                   |
|  #  Send RFC 2833 DTMF       | cl  List ports           |  d  Dump status   |
|  *  Send DTMF with INFO      | cc  Connect port         | dd  Dump detailed |
| dq  Dump curr. call quality  | cd  Disconnect port      | dc  Dump config   |
|                              |  V  Adjust audio Volume  |  f  Save config   |
|  S  Send arbitrary REQUEST   | Cp  Codec priorities     |                   |
+-----------------------------------------------------------------------------+
|  q  QUIT   L  ReLoad   sleep MS   echo [0|1|txt]     n: detect NAT type     |
+=============================================================================+

Solved.

The problem was that i was using with Telbo my cellphone number (the same one i was calling) as CLI.
Changing the CLI on TELBO solved the problem, maybe they changed something to avoid to process calls to the same number previously set as CLI.

1 Like

Hi,

first I would like to thank you for this great addon.

My setup is working so far (placing calls, tts and so on). I’m using a FRITZ!Box. The problem I have is that the configured message seems to start to play instantly when it’s ringing and not only when the call is accepted.

I double checked that the audio file is complete.

I wanted to ask if this is the expected behavior before I annoy you with logs. I wasn’t able to find any information about this in the documentation.

Thanks in advance for your time and effort.

Best

Eric

Unfortunately it’s how pjSua will manage audio and TTS…

@sdesalve HI! I would like to know if it is possible to make it work with the voip parameters of telecom italia, I tried but I didn’t succeed