Last active
December 17, 2015 13:29
-
-
Save hunnycode/5617224 to your computer and use it in GitHub Desktop.
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 'rubygems' # not necessary with ruby 1.9 but included for completeness | |
require 'twilio-ruby' | |
# put your own credentials here - from twilio.com/user/account | |
account_sid = '[account SID]' | |
auth_token = '[Auth Token]' | |
# set up a client to talk to the Twilio REST API | |
@client = Twilio::REST::Client.new account_sid, auth_token | |
@call = @client.account.calls.create( | |
:from => '+8150xxxxxxxx', # From your Twilio number | |
:to => '+8180xxxxxxxx', # To any number | |
# Fetch instructions from this URL when the call connects | |
:url => 'http://your URL/call.xml' | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment