Enhanced Code of Conduct Hotline
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
download_recording
tests
webservice
.gitignore
.pyup.yml
.travis.yml
LICENSE
Procfile
dev-requirements.txt
readme.rst
requirements.txt
runtime.txt
wistia_music_-_let_em_in_license_readme.txt

readme.rst

Enhanced CoC Hotline

This is an enhanced version of the PyCascades Code of Conduct Hotline.

This hotline uses Nexmo Voice API + Zapier integration.

Purpose

When a caller calls the hotline, it will dial each of the PyCascades organizers, and the caller will be connected to the first person who answered.

All calls to this hotline are automatically recorded.

For additional details of how to set up the hotline, please read my Nexmo Developer Spotlight tutorial, posted November 15, 2018.

Requirements

Python 3.6.5+ because of f-strings.

Library Dependencies

  • aiohttp
  • nexmo
  • click

Deployment

Deploy

In Heroku, set the environment variables:

  • NEXMO_APP_ID: The Nexmo App ID

  • NEXMO_PRIVATE_KEY_VOICE_APP: The content of the private key (from private.key file).

    It looks like the following: ----- BEGIN PRIVATE KEY ---- blablahblah ---- END PRIVATE KEY ----

  • PHONE_NUMBERS: A list of staff name and phone number dictionaries.

    Example:

    [{"name": "Mariatta", "phone": "16040000000"}, {"name": "Miss Islington", "phone": "1778111111"}]
    
  • ZAPIER_CATCH_HOOK_RECORDING_URL: The Webhooks By Zapier url.

Downloading the recording

Requires click 7.0+

Set the environment variables:

  • NEXMO_APP_ID: The Nexmo App ID
  • NEXMO_PRIVATE_KEY_VOICE_APP: The content of the private key (from private.key file). It looks like the following: `----- BEGIN PRIVATE KEY ---- blablahblah ---- END PRIVATE KEY ----`

In the enhanced-coc-hotline directory, run:

$ python3 -m download_recording url1 url2 url3 ...

License

GNU General Public License v3.0.