app/controllers/ivr/calls_controller.rb
# Public: gathers the user response on connection preformance
#
# CallSid - active_call's remote_id from twilio (required)
# Digits - the key pressed user response from twilio (required)
# connection_id - remote_for the target connection (required)
gathers the user response on connection preformance
CallSid - active_call's remote_id from twilio (required)
Digits - the key pressed user response from twilio (required)
connection_id - remote_for the target connection (required)
gathers the user response on connection preformance CallSid - active_call ' s remote_id from twilio ( required ) Digits - the key pressed user response from twilio ( required ) connection_id - remote_for the target connection ( required )
def connection_gather
    active_connection = Ivr::Connection.find(params[:connection_id])
    active_connection.update(status_from_user: Ivr::Connection::USER_RESPONSE_CODES[params['Digits']])
    response = Twilio::TwiML::Response.new do |r|
      if active_call.finished_loop?  || active_call.next_target.nil?
        close_call(r)
      else
        r.Play AudioFileFetcher.encouraging_audio_for_count(active_call.encouraging_count)
        ready_for_connection?(r)
        close_call(r)
      end
    end
    render_twiml response
  end
def connection_gather active_connection = Ivr :: Connection . find ( params [ :connection_id ] ) active_connection . update ( status_from_user : Ivr :: Connection :: USER_RESPONSE_CODES [ params [ 'Digits' ] ] ) response = Twilio :: TwiML :: Response . new do | r | if active_call . finished_loop? || active_call . next_target . nil? close_call ( r ) else r . Play AudioFileFetcher . encouraging_audio_for_count ( active_call . encouraging_count ) ready_for_connection? ( r ) close_call ( r ) end end render_twiml response end
Public: gathers the user response on connection preformance
CallSid - active_call's remote_id from twilio (required)
Digits - the key pressed user response from twilio (required)
connection_id - remote_for the target connection (required)
Public : gathers the user response on connection preformance CallSid - active_call ' s remote_id from twilio ( required ) Digits - the key pressed user response from twilio ( required ) connection_id - remote_for the target connection ( required )