Skip to content

Instantly share code, notes, and snippets.

@mplacona
Created April 10, 2016 13:36
Show Gist options
  • Save mplacona/1eafd3cbb7fcfc978aa0ef5e6f4b3e51 to your computer and use it in GitHub Desktop.
Save mplacona/1eafd3cbb7fcfc978aa0ef5e6f4b3e51 to your computer and use it in GitHub Desktop.
def make_call
client = Twilio::REST::Client.new your-sid, your-token
call = client.account.calls.create(
:from => your-twilio-number, # From your Twilio number
:to => your-real-number, # To any number
# Fetch instructions from this URL when the call connects
:url => 'your-ngrok-url'
)
render json: call.sid
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment