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_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: http://call-roulette.herokuapp.com/calls/create Fallback URL: http://call-roulette.herokuapp.com/calls/exception Status Callback URL: http://call-roulette.herokuapp.com/calls/flow?event=hang_up
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=http://name-of-app.herokuapp.com 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=TWILIO_ACCOUNT_SID=... export=TWILIO_AUTH_TOKEN=... export=TWILIO_TUNNEL_URL=http://name-of-app.herokuapp.com export=CALL_ROULETTE_PHONE_NUMBER="(123) 456 7890" bundle install bundle exec foreman start
Call Flow (Clean)
Call Flow (Full)
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.