Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Ruby HTML CSS JavaScript CoffeeScript
Branch: master
Failed to load latest commit information.
app an exception is no longer raised if there is no ENV['SPECIAL_MESSAGE'…
config Upgrade rails to 3.2.11
db bump rails
doc new app
lib new app
public new app
script new app
spec new app
vendor new app
.gitignore new app
.rvmrc new app
Gemfile Bump rails to v3.2.19
Gemfile.lock Bump rails to v3.2.19
Guardfile Upgrade rails to 3.2.11
Procfile new app Updates LICENSE.
Rakefile new app new app

Call Roulette

Sample Rails 3 app using call_center


Call Roulette is like Chat Roulette but with calls. People call in and are connected to random people. They can "next" their call buddy by pressing '*' until they've talked to their heart's content.


This app requires that you have a Twilio account set up and you have its TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN set up in your environment variables.

You will also need to set up a Twilio number that points to your app (being sure to replace call-roulette with the name of your Heroku app):

Request URL:
Fallback URL:
Status Callback URL:


This app can be deployed to Heroku in the following steps:

# Cedar stack allows us to run multiple processes
heroku create --stack cedar

# First deploy
git push heroku master

# Set up required variables
heroku config:add TWILIO_ACCOUNT_SID=...
heroku config:add TWILIO_AUTH_TOKEN=...
heroku config:add TWILIO_TUNNEL_URL=
heroku config:add CALL_ROULETTE_PHONE_NUMBER="(123) 456 7890"

# Start background process that routes calls
heroku scale web=1 clock=1

Non-heroku deploys can just:

export=CALL_ROULETTE_PHONE_NUMBER="(123) 456 7890"

bundle install

bundle exec foreman start

Call Flow (Clean)

State Diagram Clean

Call Flow (Full)

State Diagram

Copyright and license

Copyright 2013 Zendesk

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Something went wrong with that request. Please try again.