ruby click to call example
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Bandwidth Ruby Click-to-Call

Sip App is simple application which allows to make calls directly to sip account, redirect outgoing calls from sip account to another number, redirect incoming calls from specific number to sip account. Also this application demonstrate how to receive/create an application, domain, endpoint, buy phone numbers.


Before run them fill config file options.yml with right values. Option domain should contains host name (and port) which will be used to access to the server from external network.

How to run

Install required gems

bundler install

Run Sip app demo as

ruby -rubygems sip_app.rb

Use environment variable PORT to change default port (3000)

Open home page in browser first (http://domain) and follow instructions on it

Deploy on heroku

Create account on Heroku and install Heroku Toolbel if need.

Open Procfile in text editor and select which demo you would like to deploy.

# for Sip App
web: ruby -rubygems ./sip_app.rb

Then open options.yml and fill it with valid values (except domain).

Commit your changes.

git add .
git commit -a -m "Deployment"

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

Change option domain in options.yml by assigned by Heroku value (something like Commit your changes by git commit -a.

Run git push heroku master to deploy this project.

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

Open external access via ngrock

As alternative to deployment to external hosting you can open external access to local web server via ngrock.

First instal ngrock on your computer. Run ngrock by

ngrok http 3000 #you can use another free port if need 

You will see url like on console output. Open options.yml and fill value domain by value from console (i.e. like Save changes and run demo app by

# for Sip App
PORT=3000 ruby -rubygems ./sip_app.rb