-
Notifications
You must be signed in to change notification settings - Fork 36
User Guide
Bruce Schubert edited this page Aug 7, 2020
·
34 revisions
This section describes how to install the hardware and the software.
Connecting the Raspberry Pi and modem to your home phone system...
- Download the latest code or choose a specific release.
- Unzip the downloaded version. The unzpped folder will be named
callattendant-master
orcallattendant-<version>
depending on what you downloaded. Here's how unzip it into your home folder, using the latest version (master) in the example:
cd
unzip ~/Downloads/callattendant-master.zip
cd callattendant-master
You can rename the callattendant-<version>
folder if you wish.
- Delete the
callattendant-<version>
folder and its contents.
- If you are updating from a previous release, you should copy/move the
callattendant.db
file from the previous release todata/callattendant.db
in the new release.
Configuration file ...
# SCREENING_MODE: A tuple containing: "whitelist" and/or "blacklist", or empty
SCREENING_MODE = ("whitelist", "blacklist")
# BLOCK_ENABLED: if True calls that fail screening will be blocked
BLOCK_ENABLED = True
# BLOCK_NAME_PATTERNS: A regex expression dict applied to the CID names
# Example: {"V[0-9]{15}": "Telemarketer Caller ID", "O": "Unknown caller"}
BLOCK_NAME_PATTERNS = {"V[0-9]{15}": "Telemarketer Caller ID", }
# BLOCK_NUMBER_PATTERNS: A regx expression dict applied to the CID numbers
# Example: {"P": "Private number",}
BLOCK_NUMBER_PATTERNS = {}
# BLOCKED_ACTIONS: A tuple containing a combination of the following actions:
# "greeting", "record_message", "voice_mail".
#
# These actions are performed before hanging up.
#
# Note: the "record_message", "voice_mail" actions are mutually exclusive.
# Also Note: A trailing comma is REQUIRED for a tuple with just one item
#
# Example: No actions, just hang_up
# BLOCKED_ACTIONS = ()
#
# Example: Play an announcement before hanging up
# BLOCKED_ACTIONS = ("greeting", )
#
# Example: Record a message before hanging up, no keypress required
# BLOCKED_ACTIONS = ("record_message", )
#
# Example: Option to record a message; keypress required to leave message
# BLOCKED_ACTIONS = ("voice_mail", )
#
# Example: Play announcment and record a message; no keypress required
# BLOCKED_ACTIONS = ("greeting", "record_message" )
#
# Example: Play announcment and voice mail menu; keypress required to leave message
# BLOCKED_ACTIONS = ("greeting", "voice_mail" )
#
BLOCKED_ACTIONS = ("greeting", "voice_mail")
# BLOCKED_GREETING_FILE: The wav file to be played to blocked callers.
# Example: "We're sorry, this call has been blocked by the Raspberry Pi
# call attendant. To be unblocked, leave a message with your
# justification to be unblocked."
BLOCKED_GREETING_FILE = "resources/blocked_greeting.wav"
# VOICE_MAIL_GREETING_FILE: The wav file played after answering: a general greeting
# Example: "I'm sorry we missed your call..."
VOICE_MAIL_GREETING_FILE = "resources/general_greeting.wav"
# VOICE_MAIL_GOODBYE_FILE: The wav file play just before hanging up
# Example:Goodbye"
VOICE_MAIL_GOODBYE_FILE = "resources/goodbye.wav"
# VOICE_MAIL_INVALID_RESPONSE_FILE: The wav file played on an invalid keypress
# Example: "That was an invalid response.."
VOICE_MAIL_INVALID_RESPONSE_FILE = "resources/invalid_response.wav"
# VOICE_MAIL_LEAVE_MESSAGE_FILE: The wav file played be before recording a message
# Example: "Please leave a message"
VOICE_MAIL_LEAVE_MESSAGE_FILE = "resources/please_leave_message.wav"
# VOICE_MAIL_MENU_FILE: The wav file with message instructions, played after the greeting
# Example: "Press 1 to leave a message..."
VOICE_MAIL_MENU_FILE = "resources/voice_mail_menu.wav"
To start the system, run the Python 3 callantendant.py
program with an optional configuration file.
Here are a couple of examples assuming you installed the callattendant under the home folder on your Raspberry Pi:
cd ~
cd callattendant<-version>
python3 src/callattendant.py
cd ~
cd callattendant<-version>
python3 src/callattendant.py --config app.cfg
To view the callattendant web interface, simply point your browser to port 5000 on your Raspberry Pi, e.g.,
http://<pi address|name>:5000
You can view the web interface from the Raspberry Pi itself and from phones and computers on the same network as your Pi.