An example of a keypad IVR system using Python and Flask
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.
.gitignore
README.md
app.py
requirements.txt

README.md

IVR For Ordering From A Menu

A sample application build using Python and Flask to demonstrate how to create an IVR using Bandwidth's API

Table of Contents

Prereqs

  • Python version 3.7.0
  • Bandwidth Account
  • BANDWIDTH_USER_ID - Saved to environment variable
  • BANDWIDTH_API_TOKEN - Saved to environment variable
  • BANDWIDTH_API_SECRET - Saved to environment variable

Dependencies can be installed by running

pip install -r requirements.txt

after cloning the repo.

Run the app by running

python app.py

How It Works

Before running the IVR application, you need to setup a Bandwidth application at app.bandwidth.com. This Bandwidth application should have an associated phone number, and be a Voice application that makes a POST request on the url running the IVR.

When the user makes a phone call to your Bandwidth number, the user will interact with the automated prompt defined by the variables MAPPINGS and PROMPT, and be charged based on the values in ORDER_COST