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

Sometimes it works. But not always. Since I use it with home alarm integration. If I set the call if the alarm is triggered for two numbers, how much time must pass between one call and another?

Metti uno sleep di 5 secondi e prova.

Ma se non posti il log con l’errore non posso capire il problema

1 Like

No Italiano, English is what we agreed here :slightly_smiling_face::+1:

Sorry

Put it to sleep for 5 seconds and try.

But if you don’t post the log with the error I can’t understand the problem

But that (Italian) user didn’t reply… I think it has resolved or it don’t need anymore help

How can I add a 5 second delay before speech starts?

This works perfect for me so far.

Hi

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

Unfortunately, in a few cases a call results in an error.

[Info] Listening for messages via stdin service call...
[Info] Received messages {"call_sip_uri":"sip:**[email protected]:5060","message_tts":"test"}
Converting audio file 'http://192.168.2.140:8123/api/tts_proxy/a94a8fe5ccb19ba61c4c0873d391e987982fbbd3_de_-_google_translate.mp3'...
Audio succesfully converted...
Starting SIP Client and calling 'sip:**[email protected]:5060'...
This call will be terminated after '20' seconds.
08:43:59.984         os_core_unix.c !pjlib 2.11.1 for POSIX initialized
./run: line 337: echo: write error: Broken pipe
./run: line 337: echo: write error: Broken pipe
./run: line 337:  1333 Exit 1                  ( sleep $MAX_CALL_TIME_VALUE; echo h; sleep 0.5; echo q )
      1334 Segmentation fault      (core dumped) | ( pjsua --app-log-level=3 --config-file '/share/dss_voip/dss_pjsua.conf' $CALL_SIP_URI_VALUE 2> /share/dss_voip/dss_pjsua.log )
[Error] pjsua Exit code: 139
[Info] Call ended...
[Info] Listening for messages via stdin service call...

In normal operation this logging will shown

09:59:18.404         os_core_unix.c !pjlib 2.11.1 for POSIX initialized
09:59:18.404         sip_endpoint.c  .Creating endpoint instance...

But in error conditions it seems that the process cannot create the endpoint instance!?

This is my configuration

sip_parameters:
  caller_id_uri: sip:[email protected]
  realm: "*"
  username: homeassistant
  password: xxxx
max_call_time: 20
pjsua_custom_options: "--no-tcp"
 Add-on version: 4.0.0
 You are running the latest version of this add-on.
 System: Home Assistant OS 11.1  (aarch64 / raspberrypi4-64)
 Home Assistant Core: 2023.11.3
 Home Assistant Supervisor: 2023.11.3

This is my automation

  - service: hassio.addon_stdin
    data:
      addon: 89275b70_dss_voip
      input:
        call_sip_uri: sip:**[email protected]:5060
        message_tts: test

I use the AVM FritzBox 7590-AX.

Any idea how I can fix this problem?

Bye
MarkTi

How do I install?

Cmd('git') failed due to: exit code(128) cmdline: git clone -v --recursive --depth=1 --shallow-submodules -- https://github.com/sdesalve/hassio-addons/tree/master/dss_voip /data/addons/git/b555df5e stderr: 'Cloning into '/data/addons/git/b555df5e'... fatal: repository 'https://github.com/sdesalve/hassio-addons/tree/master/dss_voip/' not found '

Hi,

I have the same problem. everything is working. I get the call but I cannot hear anything.
the translated mp3 is avaliable in local LAN.

Converting audio file 'http://HOMEASSISTANT-IP:8123/api/tts_proxy/694b4b1b26b60a90cc2677ca7ae34d26330d848b_de_-_google_translate.mp3'...
Audio succesfully converted...

then I specify the base_url in tts

- platform: google_translate
    service_name: google_translate_say
    language: 'de'
    cache: true
    cache_dir: /config/tts
    time_memory: 300
    base_url: "http://HOMEASSISTANT-IP:8123"

and after adding the parameter base_url it is not working anymore

[Info] Received messages {"call_sip_uri":"sip:[email protected]:5060","message_tts":"HomeAssistant ruft an und spricht"}
parse error: Expected string key before ':' at line 1, column 4

could you pls be more specifc which url should be used there?

UPDATE:
As I have the LOCAL-IP in the internal-url of HA configuered the base_url should not be needed. see Google TTS base_url not always needed - #6 by seanomat

so that there is not voice via the call is another reason I think

Have you copied and pasted your addon config?

check that you have used standard double quotes

"

and simple minus

-

chars.

–no-tcp option is written as: --no-tcp

no copy paste. as written, it is working fine.
but If I remove the hash from the code below the addon is crashing with the above error in the moment when I trigger the phonecall via automation (which was all fine before)

tts:
  - platform: google_translate
    service_name: google_translate_say
    language: 'de'
    cache: true
    cache_dir: /config/tts
    time_memory: 300
#    base_url: "http://HOMEASSISTANT-IP:8123"

there was is no change in addon config:

sip_parameters:
  caller_id_uri: sip:[email protected]:5060
  realm: "*"
  username: username
  password: password
  pjsua_custom_options: "--ip-addr=HOMEASSISTANT-IP"
max_call_time: 20

Ok leave this line commented

Have you disabled Fritz box VoIP LAN lock?

If you click here, you can hear your TTS, right?

fritzbox Voip-LAN is locked. there is no reason to disable it from my point of view.

yes the mp3 is there, and available and i can hear what i expect

Here, before base_url option deprecation, I have my FQN url (eg: https://sssss.duckdns.org)

Prevent the use of Internet telephony from the local network
IP phones and applications cannot receive and make calls from the local network. This option activates a filter for outgoing SIP packets in the FRITZ!Box, in particular to protect against malware. Telephony devices configured on the FRITZ!Box can continue to be used without restrictions.

If you leave this option ticked, It will not work. Sorry
Let me know if you can solve your issue without this mandatory config

ah. this is the error

this was a misunderstanding.
the option I was mentioned which is not needed was this

it means that it is not allowed for this IP-Phone(user) to connect from internet to the fritzbox.

but your option was still missing, even if I do not understand why it was possible that the call itself was working but not to transfer the “voice”-data… thanks for the hint, I will try asap

your option was not recognized. If you had place here your full addon log (as requested) I’ve recognized the mistake early. sorry

great, it works. thanks a lot

I have read the entire thread and I have not been able to configure the addon:

CONFIG:

sip_parameters:
  caller_id_uri: sip:[email protected]
  realm: "*"
  username: xxxxxxx
  password: xxxxxxx
pjsua_custom_options: "--no-tcp"
max_call_time: 30

SCRIPT:

alias: call_nicojmb_phone
sequence:
  - service: hassio.addon_stdin
    data_template:
      addon: 89275b70_dss_voip
      input:
        call_sip_uri: sip:[email protected]
        message_tts: Test of message
mode: single
icon: mdi:phone

LOG:

-----------------------------------------------------------
 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 11.2  (amd64 / qemux86-64)
 Home Assistant Core: 2023.12.0
 Home Assistant Supervisor: 2023.11.6
-----------------------------------------------------------
 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'
MAX_CALL_TIME = '30'
[Info] Listening for messages via stdin service call...
[Info] Received messages {"call_sip_uri":"sip:[email protected]","message_tts":"Write here your message"}
Converting audio file 'http://192.168.86.39:8123/api/tts_proxy/3bb4cd06a7898fc0a33665f241cb48f2f2a192ac_en_-_google_translate.mp3'...
Audio succesfully converted...
Starting SIP Client and calling 'sip:[email protected]'...
This call will be terminated after '30' seconds.
16:25:48.324         os_core_unix.c !pjlib 2.11.1 for POSIX initialized
16:25:48.325         sip_endpoint.c  .Creating endpoint instance...
16:25:48.326                  pjlib  .select() I/O Queue created (0x7f31f5c75100)
16:25:48.326         sip_endpoint.c  .Module "mod-msg-print" registered
16:25:48.326        sip_transport.c  .Transport manager created.
16:25:48.326           pjsua_core.c  .PJSUA state changed: NULL --> CREATED
16:25:48.343           pjsua_core.c  .pjsua version 2.11.1 for Linux-6.1.63/x86_64 initialized
16:25:48.346            pjsua_app.c  .Turning sound device -99 -99 ON
16:25:48.346                 main.c  Ready: Success
16:25:48.372            pjsua_app.c  .......Call 0 state changed to CALLING
>>>>
Account list:
  [ 0] <sip:172.30.33.3: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]
>>> 16:25:49.346            pjsua_app.c  .Turning sound device -99 -99 OFF
16:26:18.313            pjsua_app.c  .Call 0 is DISCONNECTED [reason=487 (Request Terminated)]
>>> 16:26:19.852                timer.c  .Dumping timer heap:
16:26:19.852                timer.c  .  Cur size: 0 entries, max: 3070
[Info] Call ended...
[Info] Listening for messages via stdin service call...

@sdesalve can you helpme?

1 Like