Skip to content

Instantly share code, notes, and snippets.

@danvine
Created August 9, 2012 12:25
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danvine/3303795 to your computer and use it in GitHub Desktop.
Save danvine/3303795 to your computer and use it in GitHub Desktop.
Cron job to call and connect you to your daily scrum via Twilio
require 'twilio-ruby'
require 'yaml'
account_sid = 'AC--------------------------------'
auth_token = '--------------------------------'
config = {
:from => '+15555555555', # your twilio verified phone number
:to => '+15558675309', # your phone number
:url => 'http://yourdomain.com/scrum/?call=18886191583&pass=555555555' # where the Twiml XML file below is hosted
}
@client = Twilio::REST::Client.new account_sid, auth_token
@account = @client.account
@call = @account.calls.create(config)
# <?php
# header("content-type: text/xml");
# echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
# ?>
# <Response>
# <Say>Stay on the line for scrum</Say>
# <Dial>
# <Number sendDigits="wwww<?php echo ($_GET['pass'] * 1) ?>#">
# +<?php echo ($_GET['call'] * 1) ?>
# </Number>
# </Dial>
# </Response>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment