This repository has been archived by the owner. It is now read-only.
👋 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.

Bandwidth Ruby Voice Reference App

⚠️ 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 Catapult API. 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.


Uses the:


Deploy To PaaS

Env Variables Required To Run




Before running export next environment variables :

CATAPULT_DOMAIN_NAME - domain name (it will be created by the app if need),

CATAPULT_USER_ID, CATAPULT_API_TOKEN, CATAPULT_API_TOKEN - auth data for Catapult API (to search and reserve a phone number, etc)

After that run bundle install to install dependencies.

You can run this demo like ruby app.rb on local machine if you have ability to handle external requests or use any external hosting.

Deploy on Heroku

Create account on Heroku and install Heroku Toolbel if need.

Run heroku create to create new app on Heroku and link it with current project.

Configure the app by commands

 heroku config:set CATAPULT_DOMAIN_NAME=your-domain
 heroku config:set CATAPULT_USER_ID=your-user-id
 heroku config:set CATAPULT_API_TOKEN=your-token
 heroku config:set CATAPULT_API_SECRET=your-secret

Run git push heroku master to deploy this project.

Run heroku open to see home page of the app in the browser

Http routes

GET /users/{userName} with json response

PUT /users/{userName}

DELETE /users/{userName}

POST /users with required json payload {"userName": "", "password": "" }  and with json response (register an user)

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