Skip to content

Instantly share code, notes, and snippets.

@radralph
Last active April 7, 2017 03:35
Show Gist options
  • Select an option

  • Save radralph/88846dfc165abdd5f157 to your computer and use it in GitHub Desktop.

Select an option

Save radralph/88846dfc165abdd5f157 to your computer and use it in GitHub Desktop.
call $caller, {:callerID => 'sip:21581064@sip.tropo.net'}
say "Welcome to our sample A S R"
result = ask "please type in your 8 digit code", {
:choices => "[8 DIGITS]",
:mode => "dtmf",
:timeout => 10.0,
:attempts => 2,
:onBadChoice => lambda { |event|
say "Please try again"
},
:terminator => '#'
}
say result.value
say "Thank you"
hangup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment