Skip to content

Instantly share code, notes, and snippets.

@getadeo
Forked from radralph/test.rb
Last active August 17, 2018 06:18
Show Gist options
  • Save getadeo/9dd24b33c39935d5307d4a1aada41285 to your computer and use it in GitHub Desktop.
Save getadeo/9dd24b33c39935d5307d4a1aada41285 to your computer and use it in GitHub Desktop.
call "9263262904", {:callerID => 'sip:21588734@sip.tropo.net'}
ask "Who would you like to call? Just say Joe or John", {
:choices => "Joe, John",
:mode => "speech",
:recognizer => "en-PH",
:minConfidence => 0.6,
:onChoice => lambda { |event| say "You said" + event.value},
:onBadChoice => lambda { |event| say "I'm sorry, I didn't understand what you said."},
:onTimeout => lambda { |event| say "I'm sorry, I didn't hear anything"},
:onHangup => lambda { |event| log "Caller disconnected"}
}
hangup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment