Skip to content

Instantly share code, notes, and snippets.

@RobSpectre
Created April 29, 2016 17:13
Show Gist options
  • Save RobSpectre/bf317717ca11cf0d19ad01233212c934 to your computer and use it in GitHub Desktop.
Save RobSpectre/bf317717ca11cf0d19ad01233212c934 to your computer and use it in GitHub Desktop.
Inbound TwiML
def connect
# Our response to this request will be an XML document in the "TwiML"
# format. Our Ruby library provides a helper for generating one
# of these documents
response = Twilio::TwiML::Response.new do |r|
r.Dial '[INSERT AGENT PHONE NUMBER HERE]'
end
render text: response.text
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment