Last active
May 15, 2018 02:39
-
-
Save radralph/10625605 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wait(1500) | |
result = ask "enter 3 numbers", { | |
:choices => "[3 DIGITS]", | |
:terminator => '#', | |
:timeout => 15.0, | |
:mode => "dtmf", | |
:onChoice => lambda { |event| | |
say "Thank you." | |
} | |
} | |
say "You said " + result.value | |
# transfer [result.value[1..10].to_s,"sip:21581075@sip.tropo.net"], { | |
# :playvalue => "http://onholdsamples.com/samples/music/IN-110.mp3", | |
# :terminator => "*", | |
# :onSuccess => lambda {|event| | |
# sec = event.connectedDuration.to_i / 1000 | |
# say "http://www.soundjay.com/button/sounds/beep-01a.mp3" if sec == 10 | |
# hangup if sec == 60 | |
# if sec.to_i == 10 | |
# say "5" | |
# end | |
# say sec.to_s | |
# if sec.to_i == 10 | |
# say "10" | |
# end | |
# if sec.to_s == "15" | |
# say "15" | |
# end | |
# if sec.to_s == "20" | |
# say "20" | |
# end | |
# if sec.to_i == 20 | |
# hangup | |
# end | |
# } | |
# } | |
# say "YES YES" | |
# say $currentCall.duration | |
# say "NO NO" | |
# ans = "" | |
# result.value.to_s.split('').each do |c| | |
# ans << "#{c} " | |
# end | |
# ans = "" | |
# event.connectedDuration.to_s.split('').each do |c| | |
# ans << "#{c} " | |
# end | |
# say ans | |
# say ans | |
# say ans |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment