Last active
April 24, 2017 08:08
-
-
Save radralph/d6c2869bd894fd65b50aa0bb06c7395f 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) | |
ask "Please press 1 to play an mp3, press 2 to transfer", { | |
:choices => "1,2", | |
:terminator => '#', | |
:timeout => 15.0, | |
:mode => "dtmf", | |
:interdigitTimeout => 5 , | |
:onChoice => lambda { |event| | |
@answer = event.value | |
}, | |
:onBadChoice => lambda { |event| | |
say "On Bad Choice" | |
} | |
} | |
if @answer.eql? "1" | |
say "http://192.237.229.189/dmp/contents/mp3/1409542370_Viva_La_Vida_Coldplay_Globe_Truetone.mp3" | |
elsif @answer.eql? "2" | |
say "we're now transferring you to a hotline, please wait" | |
transfer ["86236","sip:86236@sip.tropo.net"], { | |
:playvalue => "http://www.phono.com/audio/holdmusic.mp3", | |
:terminator => "*", | |
:onTimeout => lambda { |event| | |
say "Sorry, but nobody answered"} | |
} | |
else | |
hangup | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment