-
Notifications
You must be signed in to change notification settings - Fork 471
TwiML
Andrew Benton edited this page Jul 20, 2011
·
11 revisions
TwiML support is based on the builder library. You can construct a TwiML response like this:
# Build up a response
response = Twilio::TwiML::Response.new do |r|
r.Say 'hello there', :voice => 'woman'
r.Dial :callerId => '+14159992222' do |d|
d.Conference '1234'
end
end
# print the result
puts response.textThis will print the following (except for the whitespace):
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Say voice="woman">hello there</Say>
<Dial callerId="+14159992222">
<Conference>1234</Conference>
</Dial>
</Response>