-
-
Save marks/2165044 to your computer and use it in GitHub Desktop.
Tropo code for "hareem" on IRC
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
answer(); | |
// if its me, ask me for a number to call | |
if(currentCall.callerID == "_your_phone_number_" || currentCall.callerID == "your_sip_url_"){ | |
var result = ask("Enter the 10 digit phone number now.", { | |
choices: "[10 DIGITS]", | |
attempts: 3 | |
}); | |
transfer("tel:+1"+result.value,{ | |
callerID : "111", | |
answerOnMedia : true | |
}); | |
} | |
// otherwise, send them to my SIP URL | |
else { | |
say("Thank you for contacting Hareem", {voice:"Vanessa"}); | |
say("Please wait while we transfer your call.", {voice:"Vanessa"}); | |
transfer(["sip:hareem@iptel.org"], { | |
playvalue: "http://commondatastorage.googleapis.com/hmedia/gameshowtheme.mp3", | |
terminator: "*", | |
onTimeout: function(event) { | |
say("Sorry, but nobody answered Your Call"); | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment