This is an application example implementing an automated phone line using Python 2.7 and Flask web framework.
This project is built using Flask web framework.
-
First clone this repository and
cd
into it.$ git clone [email protected]:TwilioDevEd/ivr-phone-tree-python.git $ cd ivr-phone-tree-python
-
Create a new virtual environment.
-
If using vanilla virtualenv:
virtualenv venv source venv/bin/activate
-
If using virtualenvwrapper:
mkvirtualenv ivr-phone-tree-python
-
-
Install the dependencies.
pip install -r requirements.txt
-
Make sure the tests succeed.
$ coverage run manage.py test
-
Start the server.
python manage.py runserver
-
Expose the application to the wider Internet using ngrok.
ngrok http 5000 -host-header="localhost:5000"
-
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
- No warranty expressed or implied. Software is as is. Diggity.
- MIT License
- Lovingly crafted by Twilio Developer Education.