
* 🔥 Removes octopress.js * 🔥 Removes use of root_url var * 🔥 Removes Octopress generator reference from feed * 🔥 Removes delicious support * 🔥 Removes support for Pinboard * 🔥 Removes support for Disqus * 🔥 Removes support for Google Plus * ↩️ Migrate custom after_footer to default template * ↩️ Migrate custom footer to default template * ↩️ Migrate custom header to default template * 🔥 Removes unused template files * 🚀 Places time to read directly in post template * 🚀 Removes unneeded capture from archive_post.html template * 🔥 🚀 Removes unused, but heaving sorting call in component page * 🚀 Merged javascripts into a single file * 🔥 Removes more uses of root_url * 🚀 Removal of unneeded captures from head * 🔥 🚀 Removal of expensive liquid HTML compressor * 🔥 Removes unneeded templates * 🚀 Replaces kramdown with GitHub's CommonMark 🚀 * 💄 Adds Prism code syntax highlighting * ✨ Adds support for redirect in Netlify * ↩️ 🔥 Let Netlify handle all developer doc redirects * ✏️ Fixes typo in redirects file: Netify -> Netlify * 🔥 Removes unused .themes folder * 🔥 Removes unused aside.html template * 🔥 Removes Disqus config leftover * 🔥 Removes rouge highlighter config * 🔥 Removes Octopress 🎉 * 💄 Adjust code block font size and adds soft wraps * 💄 Adds styling for inline code blocks * 💄 Improve styling of note/warning/info boxes + div support * 🔨 Rewrites all note/warning/info boxes
4.0 KiB
title, description
title | description |
---|---|
Asterisk Voicemail Server Installation | Instructions on how to integrate your existing Asterisk voicemail within Home Assistant. |
Asterisk Voicemail integration allows Home Assistant to view, listen to and delete voicemails from a Asterisk voicemail mailbox.
There are two components to the integration:
- A server that runs on the Asterisk PBX host and communicates over an open port.
- A client which can request information from the server.
Both parts are necessary for Asterisk voicemail integration.
The server installation is documented below. The client is integrated inside Home Assistant
Prerequisites
Before beginning make sure that you have the following:
- A functional Asterisk PBX setup which is using the default
voicemail
application. - Both Home Assistant and Asterisk PBX running on the same LAN (or the same server).
- The Asterisk PBX server has Python 3.5 or newer installed.
- Administrator access on the Asterisk PBX (for python module installation).
- Account access to the
asterisk
user that runs the Asterisk PBX software.
Installation
-
Apply for a Google API key to enable speech-transcription services
-
Install the
asterisk_mbox_server
python module:$ pip3 install asterisk_mbox_server
-
Create a configuration file for the server
As the
asterisk
user create anasterisk_mbox.ini
file. You can place this in any directory you choose, but the recommended location is/etc/asterisk/asterisk_mbox.ini
.[default] host = IP_ADDRESS port = PORT password = PASSWORD mbox_path = PATH_TO_VOICEMAIL_FILES cache_file = PATH_TO_CACHE_FILE google_key = GOOGLE_API_KEY cdr = mysql+pymysql://<mysql-user>:<mysql-password>@localhost/asterisk/cdr
- host (Optional): The IP address to listen on for client requests. This defaults to all IP addresses on the server. To listen only locally, choose
127.0.0.1
- port (Optional): The port to listen on for client requests. Defaults to 12345.
- password (Required): A password shared between client and server. Use only alpha-numeric characters and spaces
- mbox_path (Required): The path to the storage location of mailbox files. This is typically
/var/spool/asterisk/voicemail/default/<mailbox>/
- cache_file (Required): A fully-qualified path to a file that can be written by the server containing transcriptions of voicemails. Example:
/var/spool/asterisk/transcription.cache
- google_key (Required): Your 40 characters Google API key.
- cdr (Optional): Where to find CDR data. Supports various SQL databases as well as a file log. Configuring the CDR will enable the
asterisk_cdr
platfom.
Once complete, ensure this file is only accessible by the Asterisk user:
$ sudo chown asterisk:asterisk /etc/asterisk/asterisk_mbox.ini $ sudo chmod 600 /etc/asterisk/asterisk_mbox.ini
- host (Optional): The IP address to listen on for client requests. This defaults to all IP addresses on the server. To listen only locally, choose
-
Interactively start the server to verify it is functioning
$ sudo -u asterisk asterisk_mbox_server -v --cfg /etc/asterisk/asterisk_mbox.ini
Now complete the Home Assistant configuration and verify that Home Assistant can communicate with the server
You can use
Ctrl-c
to terminate the server when done testing -
Configure the server to start automatically
Copy the following code into
/etc/systemd/system/asterisk_mbox.service
:[Unit] Description=Asterisk PBX voicemail server for Home Assistant Wants=network.target After=network.target [Service] Type=simple User=asterisk Group=asterisk ExecStart=/usr/local/bin/asterisk_mbox_server -cfg /etc/asterisk/asterisk_mbox.ini Restart=on-failure [Install] WantedBy=multi-user.target
This assumes that your Asterisk PBX server is using systemd
for init handling. If not, you will need to create the appropriate configuration files yourself.