I'm building a TwiML Application (Twilio Mark Up Language App) that is set to call a user. When I make an outbound call & when the call ends, my server receives the appropriate callback from the Twilio API. But when the end user answers the phone however, my server does not receive a response from Twilio's server. Here's what's on my server:
response = Twilio::TwiML::Response.new do |r|
r.Dial :callerId => our_number, :action => "/twilio/callback_response", :method => "POST", :statusCallbackEvent => ["answered"] do |d|
# d.Number(CGI::escapeHTML number)
d.Number("+1xxxxxxx")
d.Number("+1xxxxxxx")
end
end
It seems the :statusCallbackEvent
parameter isn't working as expected.
My server is written in Rails 4.1.6 (Ruby 2.1.3). I'm using the 'twilio-ruby' gem. My Gemfile has gem 'twilio-ruby, '4.2.0'
which is the most recent version of the gem.