-
Notifications
You must be signed in to change notification settings - Fork 36
User Guide
This section describes how to install the hardware and the software.
- The USR5637 Modem is connect to your Raspberry Pi via USB
- Your home phone system is connected to the USR5637 Modem via the RJ11 connection to a wall jack, or to a splitter connected to a wall jack and shared with a phone, or a splitter connected to your Telco modem and shared with the house phone wiring.
- Your Raspberry Pi is connected to your home network via wireless or an RJ45 network connection.
TODO: Raspberry PI LED connections
- 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.
To override the default configuration, copy the src/app.example
file to a new file, e.g. src/app.cfg
and edit its contents.
Use an editor that provides Python syntax highlighting, like nano
. Then use your configuration file when starting the
callattendant. See Starting the Call Attendant for an example.
Following are select configuration elements that may be of interest, the default values are shown:
Set to False to disable call blocking (for whatever reason)
# BLOCK_ENABLED: if True calls that fail screening will be blocked
BLOCK_ENABLED = True
Determines whether the permitted (whitelist) and blocked (blacklist) number lists are processed.
# SCREENING_MODE: A tuple containing: "whitelist" and/or "blacklist", or empty
SCREENING_MODE = ("whitelist", "blacklist")
Blocks callers whose caller ID name match a regular expression:
# 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", }
Blocks callers whose number match a regular expression, for example an area code:
# BLOCK_NUMBER_PATTERNS: A regx expression dict applied to the CID numbers
# Example: {"P": "Private number",}
BLOCK_NUMBER_PATTERNS = {}
Determines what action is taken for a blocked caller:
# BLOCKED_ACTIONS: A tuple containing a combination of the following actions:
# "greeting", "record_message", "voice_mail".
# 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 key-press required
# BLOCKED_ACTIONS = ("record_message", )
# Example: Option to record a message; key-press required to leave message
# BLOCKED_ACTIONS = ("voice_mail", )
# Example: Play announcement and record a message; no key-press required
# BLOCKED_ACTIONS = ("greeting", "record_message" )
# Example: Play announcement and voice mail menu; key-press required to leave message
# BLOCKED_ACTIONS = ("greeting", "voice_mail" )
#
BLOCKED_ACTIONS = ("greeting", "voice_mail")
Various audio wav files may be played to the caller. You can record your own and specify them with these settings:
# 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.
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 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 how 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.
- 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.
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.
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.
The Permitted Numbers page is where you view the permitted numbers. This page is accessed by selecting Permitted from the main menu.
The Blocked Numbers page is where you view the blocked numbers. This page is accessed by selecting Blocked from the main menu.