Created
August 9, 2012 12:25
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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