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.
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
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
Procfile in text editor and select which demo you would like to deploy.
# for Sip App web: ruby -rubygems ./sip_app.rb
options.yml and fill it with valid values (except
Commit your changes.
git add . git commit -a -m "Deployment"
heroku create to create new app on Heroku and link it with current project.
domain in options.yml by assigned by Heroku value (something like XXXX-XXXXX-XXXX.heroku.com). Commit your changes by
git commit -a.
git push heroku master to deploy this project.
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 http://XXXXXXX.ngrok.io on console output. Open
options.yml and fill value
domain by value from console (i.e. like XXXXXXX.ngrock.io). Save changes and run demo app by
# for Sip App PORT=3000 ruby -rubygems ./sip_app.rb