Skip to content
Bruce Schubert edited this page Aug 7, 2020 · 34 revisions

Contents

  1. Installation
  2. Configuration
  3. Operation
  4. Web Interface

Installation

This section describes how to install the hardware and the software.

Hardware

Connecting the Raspberry Pi and modem to your home phone system...

Software

Install

  1. Download the latest code or choose a specific release.
  2. Unzip the downloaded version. The unzpped folder will be named callattendant-master or callattendant-<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.

Removal

  • Delete the callattendant-<version> folder and its contents.

Update

  • If you are updating from a previous release, you should copy/move the callattendant.db file from the previous release to data/callattendant.db in the new release.

Configuration

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"

Operation

Starting the Call Attendant

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:

Using the default configuration
cd ~
cd callattendant<-version>
python3 src/callattendant.py
Using a configuration file named app.cfg
cd ~
cd callattendant<-version> 
python3 src/callattendant.py --config app.cfg

Web Interface

To view the callattendant web interface, simply point your browser to port 5000 on your Raspberry Pi. You can view the web interface from the Raspberry Pi itself and from any phone or computer that's on the same network as your Pi. Example URL:

http://<pi address|name>:5000

The Call Log

The Call Log is the main screen. It can be viewed by selecting Calls from the main menu. It lists all the calls that have been screened by the callattendant. The Action column shows hows the callattendant handled the call. Clicking on a caller will take you to the Manage Caller page where you can manage the caller's membership in the Permitted Numbers and/or Blocked Numbers lists.

Action
  • Permitted: the caller is in the Permitted Numbers list. The call was not blocked.
  • Blocked: the caller is in the Blocked Numbers list or was found to be a robocaller or other nuisance. The call was blocked.
  • Screened: the caller was not found in the Blocked Numbers list and did not appear as a robocaller or other nuisance. The call was not blocked.
Call Log example

Call Log

Managing Callers

The Manage Caller page is where you manage the caller's membership in the Permitted Numbers and/or Blocked Numbers lists. A caller can be a member of both lists, however the Permitted Number membership will have precedence over the Blocked Number. This page is accessed by clicking/selecting a caller on the Call Log page.

Manage Callers example

Manage Caller

Managing Voice Messages

The Messages page is where you listen to and/or delete voices messages left by blocked callers. This page is accessed by selecting Messages from the main menu.

Messages example

Messages

Viewing Permitted Numbers

The Permitted Numbers page is where you view the permitted numbers. This page is accessed by selecting Permitted from the main menu.

Permitted Numbers example

Permitted Numbers

Viewing Blocked Numbers

The Blocked Numbers page is where you view the blocked numbers. This page is accessed by selecting Blocked from the main menu.

Blocked Numbers example

Blocked Numbers