👋 Hi! This app is outdated and uses an old version of WebRTC.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.


Python Voice Reference App

This application is outdated, but will be updated soon!

⚠️ Bandwidth is no longer Supporting WebRTC per rtcpMuxPolicy until further notice. Some older browsers may still work.

This application demonstrates how to implement voice calling for mobile devices, browsers (WebRTC), and any SIP client using the Bandwidth Application Platform. This reference application makes creating, registering, and implementing voice calling for endpoints (mobile, web, or any SIP client) easy. This application implements the steps documented here.

You can open up the web page at the root of the deployed project for more instructions and for example of voice calling in your web browser using WebRTC. Current browser supported: Chrome and Opera.


Before running, copy src/config.py.example to src/config.py and edit it with your configuration values. The example config.py contains explanations of each configuration option.

After that run pip install -r requirements.txt to install dependencies. (You may wish to use virtualenv to prevent polluting your system python installation). Example assumes linux:

virtualenv --python=python3 venv
source venv/bin/activate
pip install -r requirements.txt

Run locally with ngrok

Run your server locally and and expose it to the internet (even behind a NAT or firewall) via ngrok.

  • Follow the instructions from the installation section
  • Install ngrok
  • Start an ngrok tunnel ngrok http 5000
  • Start the app source venv/bin/activate && cd src && python app.py
  • Visit the your ngrok url e.g. http://6199623a.ngrok.io

Http routes

GET / hompage

POST /users with required json payload {"userName": "", "password": "" } to register a user

POST /users/{userName}/callback with json payload to handle Catapult call events