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

Ok, I think did all as per instructions but receive this error


PJSUA_CUSTOM_OPTIONS = '--outbound=sip:sip.messagenet.it:5061;lr'
[Info] Listening for messages via stdin service call...
[Info] Received messages {"call_sip_uri": "sip:[email protected]", "message_tts": "Attenzione e' scattato l'allarme in via xxxxx"}
Converting audio file 'https://xxx.duckdns.org:8123/api/tts_proxy/xxxx5d3b51a423b0b2e7282xxxxxx_it_-_google_translate.mp3'...
[cmd] /run.sh exited 2
[cont-finish.d] executing container finish scripts...
[cont-finish.d] 99-message.sh: executing... 
-----------------------------------------------------------
                Oops! Something went wrong.

 We are so sorry, but something went terribly wrong when
 starting or running this add-on.
 
 Be sure to check the log above, line by line, for hints.
-----------------------------------------------------------
[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.

this is the config and the scripot


{
  "sip_parameters": {
    "caller_id_uri": "sip:[email protected]",
    "realm": "*",
    "username": "53xxx",
    "password": "xxx",
    "sip_server_uri": "sip:sip.messagenet.it:5061"
  },
  "pjsua_custom_options": "--outbound=sip:sip.messagenet.it:5061;lr"
}

  allarme_voip_kla:
    sequence:
    - service: hassio.addon_stdin
      data_template:
        addon: 89275b70_dss_voip
        input: {"call_sip_uri":"sip:[email protected]","message_tts":"Attenzione e' scattato l'allarme in via xxx"}

Ahh I think I know

this command


https://xxx.duckdns.org:8123/api/tts_proxy/xxxx5d3b51a423b0b2e7282xxxxxx_it_-_google_translate.mp3

should be in my case


https://xxx.duckdns.org/api/tts_proxy/xxxx5d3b51a423b0b2e7282xxxxxx_it_-_google_translate.mp3

(without the port number). Any way I can fix this?

As my Pvt message you should arrange base_url key in your Google TTS settings

See

1 Like

Yes! That’s how it should be


tts:
  - platform: google_translate
    service_name: google_say
    cache: true
    cache_dir: /tmp/tts
    time_memory: 300
    language: 'it'
    base_url: https://xxx.duckdns.org
1 Like

A new article in Italian language with a tutorial for Italian user that helps to install and configure this add-on:

DSS VoIP Notifier https://hassiohelp.eu/2019/08/28/ricevere-chiamate-da-homeassistant-dss-voip-notifier/

Add phone calls to your Hassio setup, Have a look!

2 Likes

This looks amazing!! I would 100% have a use for this, but I cant get it installed:

19-08-28 09:49:24 INFO (SyncWorker_9) [hassio.docker.addon] Start build 89275b70/amd64-addon-dss_voip:1.1.0
19-08-28 09:49:38 ERROR (SyncWorker_9) [hassio.docker.addon] Can't build 89275b70/amd64-addon-dss_voip:1.1.0: The command '/bin/ash -o pipefail -c set -o pipefail         && echo '@edge http://dl-cdn.alpinelinux.org/alpine/edge/main' >> /etc/apk/repositories     && echo '@edge http://dl-cdn.alpinelinux.org/alpine/edge/community' >> /etc/apk/repositories     && echo '@edge http://dl-cdn.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories         && apk add --no-cache --virtual .build-dependencies         tar=1.32-r0         && apk add --no-cache         libcrypto1.1=1.1.1c-r0         libssl1.1=1.1.1c-r0         musl-utils=1.1.22-r2         musl=1.1.22-r2         && apk add --no-cache         bash=5.0.0-r0         curl=7.65.1-r0         jq=1.6-r0         tzdata=2019a-r0         && apk add --no-cache         sox=14.4.2-r5         pjsua=2.8-r0         screen=4.6.2-r0         && S6_ARCH="${BUILD_ARCH}"     && if [ "${BUILD_ARCH}" = "i386" ]; then S6_ARCH="x86"; fi     && if [ "${BUILD_ARCH}" = "armv7" ]; then S6_ARCH="arm"; fi         && curl -L -s "https://github.com/just-containers/s6-overlay/releases/download/v1.22.1.0/s6-overlay-${S6_ARCH}.tar.gz"         | tar zxvf - -C /         && mkdir -p /etc/fix-attrs.d     && mkdir -p /etc/services.d         && curl -J -L -o /tmp/bashio.tar.gz         "https://github.com/hassio-addons/bashio/archive/v0.3.2.tar.gz"     && mkdir /tmp/bashio     && tar zxvf         /tmp/bashio.tar.gz         --strip 1 -C /tmp/bashio         && mv /tmp/bashio/lib /usr/lib/bashio     && ln -s /usr/lib/bashio/bashio /usr/bin/bashio         && apk del --purge .build-dependencies     && rm -f -r         /tmp/*' returned a non-zero code: 1

Any help why it wont build? :frowning:

Would be happy to share my automations when I finish getting it up and running!

(I have plans to build a ‘get out of situation’ bot that can call on request and playback a message such as family emergency or something!)

What kind of system are you using?
I’ve tested it on ResinOS/HassOS on Raspberry 3b.
Other users have installed it on Debian+Docker+Hassio and Ubuntu+Docker+Hassio on Intel NUC without problems…

Should be compatible with everything, but let me know other details about your setup…

Hello, i’m trying to install the addon but i receive this error.
I’m running Hassio through VirtualBox

19-08-28 12:51:14 INFO (SyncWorker_3) [hassio.docker.addon] Start build 89275b70/amd64-addon-dss_voip:1.1.0
19-08-28 12:51:33 ERROR (SyncWorker_3) [hassio.docker.addon] Can't build 89275b70/amd64-addon-dss_voip:1.1.0: The command '/bin/ash -o pipefail -c set -o pipefail         && echo '@edge http://dl-cdn.alpinelinux.org/alpine/edge/main' >> /etc/apk/repositories     && echo '@edge http://dl-cdn.alpinelinux.org/alpine/edge/community' >> /etc/apk/repositories     && echo '@edge http://dl-cdn.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories         && apk add --no-cache --virtual .build-dependencies         tar=1.32-r0         && apk add --no-cache         libcrypto1.1=1.1.1c-r0         libssl1.1=1.1.1c-r0         musl-utils=1.1.22-r2         musl=1.1.22-r2         && apk add --no-cache         bash=5.0.0-r0         curl=7.65.1-r0         jq=1.6-r0         tzdata=2019a-r0         && apk add --no-cache         sox=14.4.2-r5         pjsua=2.8-r0         screen=4.6.2-r0         && S6_ARCH="${BUILD_ARCH}"     && if [ "${BUILD_ARCH}" = "i386" ]; then S6_ARCH="x86"; fi     && if [ "${BUILD_ARCH}" = "armv7" ]; then S6_ARCH="arm"; fi         && curl -L -s "https://github.com/just-containers/s6-overlay/releases/download/v1.22.1.0/s6-overlay-${S6_ARCH}.tar.gz"         | tar zxvf - -C /         && mkdir -p /etc/fix-attrs.d     && mkdir -p /etc/services.d         && curl -J -L -o /tmp/bashio.tar.gz         "https://github.com/hassio-addons/bashio/archive/v0.3.2.tar.gz"     && mkdir /tmp/bashio     && tar zxvf         /tmp/bashio.tar.gz         --strip 1 -C /tmp/bashio         && mv /tmp/bashio/lib /usr/lib/bashio     && ln -s /usr/lib/bashio/bashio /usr/bin/bashio         && apk del --purge .build-dependencies     && rm -f -r         /tmp/*' returned a non-zero code: 1

Can you help me?
Thanks a lot
Stefano

I see that you are using an AMD64 system… Let me investigate why setup fail!
I’ll get in touch with you asap

Someone here who has an own sip server running ? Don’t wanna use public one

Thanks !

Yep, Hass.io running on Ubuntu 18.04.3 on an i5 NUC!

I have a 3CX server running that I will be trying to set it up with !

Do you have a link for me ? Would like setting it up also

Really? https://www.3cx.com/

1 Like

I’ve released a fix. Please upgrade and let me know if now it install…

bye

{
  "sip_parameters": {
    "caller_id_uri": "sip:[email protected]",
    "realm": "*",
    "username": "AuthenticationID",
    "password": "AuthenticationPassword"
  }
}

working on latest update!!

Heres my 3CX settings.

Can I have it call non sip numbers? an outbound call to a regular number?

Also, how hard would it be to simply pass a .mp3 file through to be played ? or use a different TTS provider (I want to use google wavenet!)

edit:

You can break it by calling the wrong number… lol

Audio succesfully converted...
Starting SIP Client and calling 'tel:<myphonenumber>'...
12:33:06.524         os_core_unix.c !pjlib 2.8 for POSIX initialized
12:33:06.524         sip_endpoint.c  .Creating endpoint instance...
12:33:06.525                  pjlib  .select() I/O Queue created (0x558cd809ca70)
12:33:06.525         sip_endpoint.c  .Module "mod-msg-print" registered
12:33:06.525        sip_transport.c  .Transport manager created.
12:33:06.525           pjsua_core.c  .PJSUA state changed: NULL --> CREATED
12:33:06.533           pjsua_core.c  .pjsua version 2.8 for Linux-4.15.0.58/x86_64 initialized
12:33:06.534            pjsua_app.c  Error adding buddy: Invalid URI scheme (PJSIP_EINVALIDSCHEME)
./run: line 212: echo: write error: Broken pipe
[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.

edit2:

passing a PSTN number works as follows:

  {
      "addon": "89275b70_dss_voip",
      "input": {
        "call_sip_uri": "sip:[email protected]",
        "message_tts": "This is a test call, please disregard"
      }
    }
1 Like

Cannot seem to get this to work with Linphone so far. I think it just comes down to the fact that i’m not especially experienced when it comes to sip/voip configuration. So if anyone gets it to work with Linphone in the future, i would gladly appreciate any posts with configs!

Please post your config and add-on’s log

Here is my config (replaced with username instead of my own ofc)

{
  "sip_parameters": {
    "caller_id_uri": "sip:[email protected]",
    "realm": "*",
    "username": "username",
    "password": "password",
    "sip_server_uri": "sip.linphone.org"
  }
}

And here is the startup log

 Hass.io Add-on: DSS VoIP Notifier
 VoIP Notifier for HomeAssistant
-----------------------------------------------------------
 Add-on version: 2.0.1
 You are running the latest version of this add-on.
 System: HassOS 1.13  (amd64 / qemux86-64)
 Home Assistant version: 0.98.1
 Supervisor version: 184
-----------------------------------------------------------
 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...
[Info] Registering as SIP Client...
-----------------------------------------------------------
                  SIP Client registered.

 Call <sip:[email protected]>/VoIP phone number
 to check system status.
 You'll find logs in /share/dss_voip/dss_pjsua_autoanswer.log
-----------------------------------------------------------
[Info] Listening for messages via stdin service call...

So it seems to register but when i make this service call

  - service: hassio.addon_stdin
    data_template:
      addon: 89275b70_dss_voip
      input: {"call_sip_uri":"sip:[email protected]","message_tts":"Welcome, the door is unlocked"}

This happens:

16:40:42.244         os_core_unix.c !pjlib 2.8 for POSIX initialized
16:40:42.244         sip_endpoint.c  .Creating endpoint instance...
16:40:42.245                  pjlib  .select() I/O Queue created (0x5646d0209a70)
16:40:42.245         sip_endpoint.c  .Module "mod-msg-print" registered
16:40:42.245        sip_transport.c  .Transport manager created.
16:40:42.245           pjsua_core.c  .PJSUA state changed: NULL --> CREATED
16:40:42.309           pjsua_core.c  .pjsua version 2.8 for Linux-4.14.82/x86_64 initialized
16:40:42.310            pjsua_app.c  .Turning sound device -99 -99 ON
16:40:42.310                 main.c  Ready: Success
16:40:42.324            pjsua_app.c  .......Call 0 state changed to CALLING
>>>>
Account list:
  [ 0] <sip:172.30.33.6:5060>: does not register
       Online status: Online
  [ 1] <sip:172.30.33.6:5060;transport=TCP>: does not register
       Online status: Online
 *[ 2] 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:40:42.356            pjsua_app.c  .....Call 0 is DISCONNECTED [reason=407 (Proxy Authentication Required)]
16:40:42.356     pjsua_app_common.c  .....
  [DISCONNCTD] To: sip:[email protected]
    Call time: 00h:00m:00s, 1st res in 46 ms, conn in 0ms
16:40:43.311            pjsua_app.c  .Turning sound device -99 -99 OFF
[Info] Call ended...
[Info] Listening for messages via stdin service call...

It does not connect to my intercom, seems to be a proxy error right?

SIP Client should register correctly. I need to see dss_pjsua_autoanswer.log file in your /share/dss_voip folder.
Try to call [email protected] to test if it has been registered

As you stated error is related with proxy auth
pjsua_app.c …Call 0 is DISCONNECTED [reason=407 (Proxy Authentication Required)]

I’m searching PjSua option to activate it, if possible