Skip to content
Branch: master
Find file History
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
rootfs/etc 3.0.1 Sep 15, 2019
Dockerfile 3.0.1 Sep 15, 2019
LICENSE.md fix Aug 10, 2019
README.md Merge branch 'master' of https://github.com/sdesalve/hassio-addons Sep 15, 2019
build.json 2.0 Aug 29, 2019
config.json 3.0.1 Sep 15, 2019
icon.png 2.0 Aug 29, 2019
logo.png 2.0 Aug 29, 2019

README.md

SDeSalve Hass.io Add-ons: DSS VoIP Notifier

Supports aarch64 Architecture Supports amd64 Architecture Supports armhf Architecture Supports armv7 Architecture Supports i386 Architecture

Buy me a coffee Support my work on Paypal

This add-on allows you to make VoIP calls from Hass.io.

Features

This add-on provides a way to transform a text in a audio file, make a VoIP call to a SIP url and play them to the attendee. You will need a valid VoIP account and their parameters to customize this addon config.

Obviously you need to setup Google Translate Text-to-Speech. The google_translate text-to-speech platform uses unofficial Google Translate Text-to-Speech engine to read a text with natural sounding voices.

Installation

The installation of this add-on is pretty straightforward and not different in comparison to installing any other Hass.io add-on.

  1. Add my Hass.io add-ons repository (https://github.com/sdesalve/hassio-addons) to your Hass.io instance.
  2. Install the "DSS VoIP Notifier" add-on.
  3. Configure at least the caller_id_uri, username, and password options.
  4. Start the "DSS VoIP Notifier" add-on.
  5. Check the logs of the "DSS VoIP Notifier" add-on to see if everything went well. Addons will wait to be invoked from an automation/script.

Configuration

Note: Remember to restart the add-on when the configuration is changed.

DSS VoIP Notifier add-on configuration:

{
  "sip_parameters": {
    "caller_id_uri": "sip:username@sipserver.com",
    "realm": "*",
    "username": "username",
    "password": "password"
  }
}

Note: This is just an example, don't copy and paste it! Create your own!

Basic options

Option sip_parameters: callerd_id (Required)

Set SIP URL of the caller account (i.e. From header). For example: "sip:username@sipserver.com"

Option sip_parameters: username (If required by outgooing server in call_sip_uri. See below.)

Set authentication user ID.

Option sip_parameters: password (If required by outgooing server in call_sip_uri. See below.)

Set authentication password (clear text).

Option sip_parameters: realm (Optional)

Set authentication realm. The realm is used to match this credential against challenges issued by downstream servers. If the realm is not known beforehand, wildcard character ('*') can be specified to make SIP Client respond to any realms.

Advanced options

Following options are not required for a standard setup. Use them if you know what are you doing.

Option sip_parameters: sip_server_uri (Optional)

Set the URL of the registrar server. If set, addon will auto-answer to call and play a dummy audio so you can check system's status. An example of URL: "sip:sipserver.com"

Option pjsua_custom_options (Optional)

Set optional custom command's line options. For reference see PJSua man page.

Option sox_custom_options (Optional)

Set optional custom command's line options. For reference see SoX man page.

Option max_call_time (Optional)

Set maximum call duration in seconds. Accept value between 10 and 120 seconds. Default value if this option is not specified is 50 seconds. The timer starts working after a call is initiated and is not related to the call status.

Example config for some VoIP providers

Pbxes.com phonebox

{
  "sip_parameters": {
    "caller_id_uri": "sip:extension@pbxes.com",
    "realm": "*",
    "username": "extension",
    "password": "password"
  }
}

Note: call_sip_uri in Hass.io service call must end with @pbxes.com. An example of URL: "sip:+393334455667@pbxes.com"

Vohippo.com VoIP provider

{
  "sip_parameters": {
    "caller_id_uri": "sip:AAAAA12456aaaaaaaa@sip.vohippo.com",
    "realm": "*",
    "username": "AAAAA12456aaaaaaaa",
    "password": "ABCDE123456789FGHI"
  }
}

Note: call_sip_uri in Hass.io service call must end with @sip.vohippo.com. An example of URL: "sip:+393334455667@sip.vohippo.com"

CloudItaliaOrchestra.it VoIP provider

{
  "sip_parameters": {
    "caller_id_uri": "sip:phonenumber@voip.eutelia.it",
    "realm": "*",
    "username": "phonenumber",
    "password": "password"
  }
}

Note: call_sip_uri in Hass.io service call must end with @voip.eutelia.it. An example of URL: "sip:+393334455667@voip.eutelia.it"

FreeVoipDeal/Any other Dellmont/Betamax provider

{
  "sip_parameters": {
    "caller_id_uri": "sip:username_or_phonenumber@sip.freevoipdeal.com",
    "realm": "*",
    "username": "username",
    "password": "password"
  },
  "pjsua_custom_options": "--no-tcp"
}

Note: call_sip_uri in Hass.io service call must end with @sip.freevoipdeal.com. An example of URL: "sip:+393334455667@sip.freevoipdeal.com". Option username_or_phonenumber can be your FreeVoipDeal username or any of authorized numbers. Please note that "pjsua_custom_options": "--no-tcp" option is mandatory.

For a list of all Dellmont/Betamax provider and for compare their prices for your country, please visit Voip-comparison.com

3CX PBX

{
  "sip_parameters": {
    "caller_id_uri": "sip:extension@domain.3cx.com.au",
    "realm": "*",
    "username": "AuthenticationID",
    "password": "AuthenticationPassword"
  }
}

Note: Use the Authentication ID and Password from the Extension settings for username and password, but the SIP extension number for the caller ID URI

Messagenet VoIP provider

{
  "sip_parameters": {
    "caller_id_uri": "sip:numerointerno@sip.messagenet.it",
    "realm": "*",
    "username": "numerointerno",
    "password": "password"
  },
  "pjsua_custom_options": "--outbound=sip:sip.messagenet.it:5061;lr" 
}

Note: numerointerno is a personal ID (aka URI or Internal number) that you have received with a mail from Messagenet. Be aware: is not your Messagenet User ID that you use to login on Messagenet website. call_sip_uri in Hass.io service call must end with @sip.messagenet.it. An example of URL: "sip:+393334455667@sip.messagenet.it"

FreeVoipDeal/Any other Dellmont/Betamax provider

{
  "sip_parameters": {
    "caller_id_uri": "sip:username_or_phonenumber@sip.freevoipdeal.com",
    "realm": "*",
    "username": "username",
    "password": "password"
  },
  "pjsua_custom_options": "--no-tcp"
}

Note: call_sip_uri in Hass.io service call must end with @sip.freevoipdeal.com. An example of URL: "sip:+393334455667@sip.freevoipdeal.com". Option username_or_phonenumber can be your FreeVoipDeal username or any of authorized numbers. Please note that "pjsua_custom_options": "--no-tcp" is mandatory. Without it you'll get an 408 error:

pjsua_app.c ....Call 0 is DISCONNECTED [reason=408 (Request Timeout)]

For a list of all Dellmont/Betamax provider and for get price comparison, please visit Voip-comparison.com.

How to use

You will need to call this addon from your Hass.io automation/script usign following yaml service invoke:

   ...
    - service: hassio.addon_stdin
      data_template:
        addon: 89275b70_dss_voip
        input: {"call_sip_uri":"sip:+393334455667@sipserver.com","message_tts":"Write here your message"}
   ...

Note: Make sure call_sip_uri was a SIP URI and ends with your SIP server. See samples above for some VoIP providers config. If you have to use special character in your JSON string, you can escape it using \ character.

See this list of special character used in JSON :

\b  Backspace (ascii code 08)
\f  Form feed (ascii code 0C)
\n  New line
\r  Carriage return
\t  Tab
\"  Double quote
\\  Backslash character

Option call_sip_uri (Required)

Set SIP URL to call. For example: "sip:username@sipserver.com" or "sip:+393334455667@sipserver.com" Outgooing SIP server can require authentication. Please set an username and password under sip_parameters section in addon config.

Note: To call external PTSN numbers, use the number in the SIP URI accounting for your dialer settings. For example for 3CX you may use "sip:0412345678@domain.3cx.com.au" and this will call the PTSN number if accessible from your PBX / VoIP provider.

Option message_tts (Required if audio_file_url is not specified)

Write here your message that will be played thru TTS to the attendee. If this option is not specified, the add-on will check presence of audio_file_url option. If nor message_tts neither audio_file_url are specified an error will raise.

Option audio_file_url (Required if message_tts is not specified)

Write here a valid URL of a MP3 file that will be played to the attendee. If nor message_tts neither audio_file_url are specified an error will raise.

Note: The length of the audio file should not be longer than 2 minutes 20 seconds. Anything longer and PjSua would start breaking up the voice path after that time. The sound plays fine for the first 2 minutes and 20 seconds and then starts breaking up. With 2 minute audio files, however, the sound plays endlessly.

Support

Got questions?

You have several options to get them answered:

GATracking

Contributing

This is an active project. I'm always open to people who want to use the code or contribute to it.

Thank you for being involved! 😍

Authors & contributors

The original setup of this repository is by SDeSalve.

License

Copyright (c) 2019 SDeSalve

See LICENSE

You can’t perform that action at this time.