-
-
Save getadeo/14a0ce1e4697c45fca979d713a69c531 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
#call $caller, {:callerID => 'sip:21588260@sip.tropo.net'} | |
call "9273953465", {:callerID => 'sip:21588260@sip.tropo.net'} | |
say "Hello! This is to inform you that we have sent a document you requested to the email you gave us. Kindly check your inbox or your spam folder for the message." | |
result = ask "Were you able to receive the document you requested? Press '1' for YES, or press '2' for NO.", { | |
:choices => "1,2", | |
:timeout => 10.0, | |
:attempts => 3, | |
:terminator => '#' | |
} | |
ans = result.value.to_s | |
if ans == "1" | |
say "We are glad to be of service. Goodbye!" | |
elsif ans == "2" | |
say "You need further assistance. Please wait as we connect you to an agent" | |
transfer ["9263262904","sip:21588260@sip.tropo.net"], { | |
:playvalue => "https://raw.githubusercontent.com/tropo/pre-recorded_audio_library/master/Connecting%20Call/cc_Hold.wav", | |
:terminator => "*", | |
:callerID => "21588260", | |
:onTimeout => lambda { |event| | |
say "Sorry, but nobody answered"}} | |
else | |
say "You selected #{ans} which is not part of the list. Were you able to receive the bill you requested? Press '1' for YES, or press '2' for NO." | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment