Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- answer
- sleep(2)
- say "Welcome to the King County Christmas Tree Recycling Line."
- # Setting up our options for "ask". We accept 5 digits, either spoken or entered
- # by DTMF, and time out after 10 seconds.
- zipcode_options = { :choices => "[5 DIGITS]",
- :repeat => 3,
- :timeout => 10,
- :onBadChoice => lambda { say 'Invalid entry, please try again.' },
- :onTimeout => lambda { say 'Timeout, please try again.' },
- :onChoice => lambda { |zip| lookup_facilities(zip.value) }
- }
- ask 'Enter or say your ZIP code to find a Christmas tree facility in your area.', zipcode_options
Add Comment
Please, Sign In to add comment