Skip to content

Instantly share code, notes, and snippets.

@wwalker
Created May 29, 2009 00:21
Show Gist options
  • Save wwalker/119692 to your computer and use it in GitHub Desktop.
Save wwalker/119692 to your computer and use it in GitHub Desktop.
def initial_question(voice_message, query, retries = 3)
response = nil
while retries > 0 do
response = input 1,
:timeout => DTMF_TIMEOUT_SECONDS,
:play => [ query, '247/press_one_for_yes', '247/press_two_for_no', '247/press_three_to_hear_this_message_again']
break if ((response == '1') || (response == '2'))
play voice_message
retries -= 1
end
response
end
dialplan calls with ('247_messages/4', '247/are_you_able_to_respond')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment