Skip to content

Instantly share code, notes, and snippets.

@nathansamson
Last active December 31, 2015 07:19
Show Gist options
  • Save nathansamson/7953398 to your computer and use it in GitHub Desktop.
Save nathansamson/7953398 to your computer and use it in GitHub Desktop.
class OfficeIVR2 < Adhearsion::CallController
before_call do
call.on_end do
logger.info 'ON CALL END CALLBACK'
end
end
def run
dial_status = dial 'user/userb'
success = dial_status.result == :answer
logger.info "CALL ENDED"
play "file://#{Rails.root}/lib/assets/audio/noonefound.wav" if call.active?
logger.info "Played File" if call.active?
hangup if call.active?
logger.info "END OF CONTROLLER"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment