Call on Congress
Call on Congress is a free telephone service that helps you learn more about what Congress is doing. Find out how your representatives are voting on bills and raising campaign money. You can also be connected with your lawmakers’ Capitol Hill offices or get details on where to vote on Election Day.
Call on Congress targets Heroku, but can be run on other servers using gunicorn. To run:
- Clone the repo
pip install -r requirements.txt
cp calloncongress/local_settings.example.py calloncongress/local_settings.py
- Add your keys
foreman start(if you have foreman installed) or
./runserver.py(will only use a single thread)
You will need API keys and account tokens for the following services:
Log in to your Twilio account and create or edit a phone number. Set the Voice Request URL field to:
Though either GET or POST will work, we recommend setting the initial request type to GET. Save your changes and you are ready to go!
Call on Congress supports a default language set of English, Spanish, and Esperanto. To add a new language:
- Add the language code and name to the LANGUAGES dict in
- Check the languages supported by the Twilio Say command. If your language is not supported, select the closest approximation and add it to the ACCENT_MAP dict in
data/script.jsonmaps lines in the spoken script to a pre-generated file name. Set your audio files to the names specified in the mapping file and place them in the following directory:
A number of twimlets are provided for use in your own applications. The following variables are used in the twimlet URLs:
<lang>Language, must be one of en, es, or eo.
<id>Bioguide ID for the member of Congress. Can be found at the Biographical Directory of the US Congress.
<url>A valid URL for redirection after the twimlet completes.
<zipcode>A valid five-digit zipcode.
Reads a short biography of the specified member.
Top Campaign Donors for a Member
Reads the top ten contributors to the member's campaign for the current election cycle.
Recent Votes by Member
Reads the recent votes taken by the specified member.
Call Member's Office
Connects the call to the member's DC office. The
<next_url> parameter is not supported on this twimlet as forwarding the call ends the Twilio application flow.
List of Upcoming Bills in Congress
Reads a list of bills that are up for consideration in the House and Senate.
Find Local Election Office
Reads the contact information for election offices within the specified zipcode.