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.
Type Name Latest commit message Commit time
Failed to load latest commit information.

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


  • 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


How It Works

Before running the IVR application, you need to setup a Bandwidth application at 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