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

Hi,

I have a little problem and hope you can help me :slight_smile:

The call is running but I get no voice.
In the logs I can see the follow states :

[Info] Received messages {“call_sip_uri”: “sip:*[email protected]”, “message_tts”: “Test alarm”}
Converting audio file ‘http://172.168.45.100:8123/api/tts_proxy/66884dc6_de_-_google_translate.mp3’…
Audio succesfully converted…

Any idea why the voice not working at the call?

Did you have specified base_url in google tts configuration.yaml?

Yes, this url is there specified.

Have you specified

tts:
  - platform: google_translate
    service_name: google_translate_say
    language: 'it'
    cache: true
    cache_dir: /config/www/tts
    time_memory: 300
    base_url: http://172.168.45.10:8123

Is your LAN ip range 172.168.45.1/254? Or 172.168.45.10 is docker IP of your hassio?

Can you hear anything clicking on ‘http://172.168.45.100:8123/api/tts_proxy/66884dc6_de_-_google_translate.mp3’…?

tts:

  • platform: google_translate
    service_name: google_translate_say
    language: ‘it’
    cache: true
    cache_dir: /config/www/tts
    time_memory: 300
    base_url: http://172.168.45.10:8123

yes

Is your LAN ip range 172.168.45.1/254?

Yes. Home Assistant is running on Virtual Machine with the IP 172.168.45.100

Can you hear anything clicking on ‘http://172.168.45.100:8123/api/tts_proxy/66884dc6_de_-_google_translate.mp3’…?

Yes, when I open this link in the browser I can hear the voice with the text “Test alarm”

try
pjsua_custom_options: ‘–no-tcp’

if not working please post full log…

Hi, i have a problem with fritzbox configuration.
This is my config:

sip_parameters:
  caller_id_uri: 'sip:[email protected]:5060'
  realm: '*'
  username: '+39telephonenumber'
  password: 'password of my voip line'
pjsua_custom_options: '--ip-addr=ip_del_raspberry'

execute command, have this log and add-on stop working

[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: 3.5.7
 You are running the latest version of this add-on.
 System: Home Assistant OS 5.13  (armv7 / raspberrypi3)
 Home Assistant Core: 2021.5.0
 Home Assistant Supervisor: 2021.04.3
-----------------------------------------------------------
 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 = '--ip-addr=ip_del_raspberry'
[Info] Listening for messages via stdin service call...
[Info] Received messages {"call_sip_uri": "sip:[email protected]", "message_tts": "Prova messaggio"}
Converting audio file 'https://xxxxxxxx.net:8123/api/tts_proxy/772c970523ed7389b60b2ed1b674b3705d965e37_it_-_google_translate.mp3'...
[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.

if you click this, can you ear anything?

Check hassio-addons/dss_voip at master · sdesalve/hassio-addons · GitHub

and add

base_url: Please provide a valid base url for Google TTS

to your Google TTS Config

Correct the base url error, now have this in log, and no call.

[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: 3.5.7
 You are running the latest version of this add-on.
 System: Home Assistant OS 5.13  (armv7 / raspberrypi3)
 Home Assistant Core: 2021.5.0
 Home Assistant Supervisor: 2021.04.3
-----------------------------------------------------------
 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 = '--ip-addr=192.x.x.x'
[Info] Listening for messages via stdin service call...
[Info] Received messages {"call_sip_uri": "sip:[email protected]", "message_tts": "Prova messaggio"}
Converting audio file 'http://xxxxi.xxx.net:8123/api/tts_proxy/772c970523ed7389b60b2ed1b674b3705d965e37_it_-_google_translate.mp3'...
Audio succesfully converted...
Starting SIP Client and calling 'sip:[email protected]'...
This call will be terminated after '50' seconds.
22:53:09.669 os_core_unix.c !pjlib 2.9 for POSIX initialized
05:21:25.670 sip_endpoint.c  .Creating endpoint instance...
10:49:41.671          pjlib  .select() I/O Queue created (0x766b20b8)
10:49:41.671 sip_endpoint.c  .Module "mod-msg-print" registered
10:49:41.671 sip_transport.  .Transport manager created.
10:49:41.671   pjsua_core.c  .PJSUA state changed: NULL --> CREATED
12:08:37.712   pjsua_core.c  .pjsua version 2.9 for Linux-5.4.83/armv7l initialized
15:01:41.716    pjsua_app.c  .Turning sound device -99 -99 ON
15:01:41.716         main.c  Ready: Success
18:02:45.750  tsx0x7652a094  ....Failed to send Request msg INVITE/cseq=2517 (tdta0x7652d474)! err=70018 (gethostbyname() has returned error (PJ_ERESOLVE))
18:02:45.750    pjsua_app.c  .......Call 0 is DISCONNECTED [reason=502 (gethostbyname() has returned error (PJ_ERESOLVE))]
18:02:45.750 pjsua_app_comm  .......
  [DISCONNCTD] To: sip:[email protected]
    Call time: 00h:00m:00s, 1st res in 33 ms, conn in 0ms
>>>>
Account list:
  [ 0] <sip:192.x.x.x:5060>: does not register
       Online status: Online
  [ 1] <sip:192.x.x.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]
+=============================================================================+
|       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 0 active call

please post your

LAN IP
Raspberry IP
Addon Config

WAIT!

no, you must create an account for a SIP Client on your Fritz.

Please read this and follow all steps

If you don’t speak Italian, the GitHub guide is just as clear

Questa parte non è per niente chiara. Riesci a spiegarmi meglio cosa devo fare sul Fritz?

Please add here a username and password and use that for addon username and password config

Ok, I think I have a similar issue like the previous poster. My add-on was working nicely until I upgraded HA to core-2021.5.3. Calls are still placed. but I don’t hear anything. Neither if I try tts nor audio files.

[Info] Received messages {"call_sip_uri": "sip:**[email protected]", "message_tts": "Bla bla bla. Danke.", "call_duration": "20"}
CALL_DURATION = '20'
Converting audio file 'https://xxx.duckdns.org/api/tts_proxy/2c455049b61debda7d9b2af346a56800408a3169_de_-_google_translate.mp3'...
Audio succesfully converted...
Starting SIP Client and calling 'sip:**[email protected]'...
This call will be terminated after '20' seconds.
16:16:40.608         os_core_unix.c !pjlib 2.9 for POSIX initialized
16:16:40.609         sip_endpoint.c  .Creating endpoint instance...
16:16:40.609                  pjlib  .select() I/O Queue created (0x7f9d9370f0)
16:16:40.609         sip_endpoint.c  .Module "mod-msg-print" registered
16:16:40.609        sip_transport.c  .Transport manager created.
16:16:40.609           pjsua_core.c  .PJSUA state changed: NULL --> CREATED
16:16:40.629           pjsua_core.c  .pjsua version 2.9 for Linux-5.4.83/aarch64 initialized
16:16:40.632            pjsua_app.c  .Turning sound device -99 -99 ON
16:16:40.632                 main.c  Ready: Success
16:16:40.634            pjsua_app.c  .......Call 0 state changed to CALLING
>>>>
Account list:
  [ 0] <sip:172.30.33.9:5060>: does not register
       Online status: Online
  [ 1] <sip:172.30.33.9: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]
+=============================================================================+
|       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]
>>> 16:16:40.644            pjsua_app.c  SIP TCP transport is connected to 192.168.178.1:5060
16:16:40.711            pjsua_app.c  .....Call 0 state changed to EARLY (183 Session Progress)
16:16:42.680            pjsua_app.c  .....Call 0 state changed to CONNECTING
16:16:42.681            pjsua_app.c  .....Call 0 state changed to CONFIRMED
>>> 16:17:00.602            pjsua_app.c  .....Call 0 is DISCONNECTED [reason=200 (Normal call clearing)]
16:17:00.602     pjsua_app_common.c  .....
  [DISCONNCTD] To: sip:**[email protected];tag=FF27E9562D6847EC
    Call time: 00h:00m:17s, 1st res in 79 ms, conn in 2049ms
    #0 audio G722 @16kHz, sendrecv, peer=-
       SRTP status: Not active Crypto-suite: 
       RX pt=9, last update:00h:00m:09.585s ago
          total 0pkt 0B (0B +IP hdr) @avg=0bps/0bps
          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.000   0.000   0.000   0.000
       TX pt=9, ptime=20, last update:never
          total 784pkt 125.4KB (156.8KB +IP hdr) @avg=50.4Kbps/63.0Kbps
          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
16:17:01.603            pjsua_app.c  ..Turning sound device -99 -99 OFF
[Info] Call ended...
[Info] Listening for messages via stdin service call...

try sip:**[email protected]:5060

seems that base_url was properly configured so try to disable tcp transport

pjsua_custom_options: '--no-tcp'

Thanks for the quick reply - didn’t work. I changed from

sip_parameters:
  caller_id_uri: 'sip:[email protected]:5060'
  realm: '*'
  username: homeassistant
  password: '<replace-me-with-digits-only>'
pjsua_custom_options: '--ip-addr=192.168.178.83'

to

sip_parameters:
  caller_id_uri: 'sip:[email protected]:5060'
  realm: '*'
  username: homeassistant
  password:  '<replace-me-with-digits-only>'
  pjsua_custom_options: '--no-tcp'

and I also

addon: 89275b70_dss_voip
input:
  call_sip_uri: 'sip:**[email protected]:5060'
  audio_file_url: 'https://***.duckdns.org/local/open_door_short.mp3'
  call_duration: '10'

with no luck. Call is placed, but when I pickup the phone … silence.

Can I change the volume somehow?

Best, Stefan

No leading spaces

Please post full log

1 Like

sdesalve, you da man! two leading spaces make the world :slight_smile:

This works now …

sip_parameters:
  caller_id_uri: 'sip:[email protected]:5060'
  realm: '*'
  username: homeassistant
  password: '***'
pjsua_custom_options: '--ip-addr=192.168.178.83'

the script uses the :5060

addon: 89275b70_dss_voip
input:
  call_sip_uri: 'sip:**[email protected]:5060'
  message_tts: Bla Bla Bla. Danke.
  call_duration: '15'

and everything works :slight_smile:

1 Like

finally it works ok, its amazing for security and automations, but i have an issue. I have to call the service twice.
First call and 4-5 later a second service call, and then make the call. I have set my automations with that, two calls to the service.

Is add-on running first time you call add-on? Have you checked start at boot option?