/ivr-phone-tree-python

Create an IVR phone tree with Python and Twilio.

Primary LanguagePython

Twilio

IVR Phone Tree: IVR for beginners. Powered by Twilio - Python/Flask

Build Status

This is an application example implementing an automated phone line using Python 2.7 and Flask web framework.

Read the full tutorial here!

Local Development

This project is built using Flask web framework.

  1. First clone this repository and cd into it.

    $ git clone git@github.com:TwilioDevEd/ivr-phone-tree-python.git
    $ cd ivr-phone-tree-python
  2. Create a new virtual environment.

  3. Install the dependencies.

    pip install -r requirements.txt
  4. Make sure the tests succeed.

    $ coverage run manage.py test
  5. Start the server.

    python manage.py runserver
  6. Expose the application to the wider Internet using ngrok.

    ngrok http 5000 -host-header="localhost:5000"
  7. Configure Twilio to call your webhooks

You will also need to configure Twilio to call your application when calls are received in your Twilio Number. The voice url should look something like this:

http://<your-ngrok-subdomain>.ngrok.io/ivr/welcome

Configure Voice

Meta

  • No warranty expressed or implied. Software is as is. Diggity.
  • MIT License
  • Lovingly crafted by Twilio Developer Education.