This Twilio API Sample code isn't working in Rails 3:
#voice_controller.rb
def reminder
@postto = BASE_URL + '/directions'
respond_to do |format|
format.xml { @postto }
end
end
#reminder.xml.builder
xml.instruct!
xml.Response do
xml.Gather(:action => @postto, :numDigits => 1) do
xml.Say "Hello this is a call from Twilio. You have an appointment
tomorrow at 9 AM."
xml.Say "Please press 1 to repeat this menu. Press 2 for directions.
Or press 3 if you are done."
end
end
Any ideas?
Twilio seems to successfully make the phone call (I can see the params with my phone number, location, etc.) but then return this vague response code:
Completed 406 Not Acceptable in 0ms