Created
October 6, 2009 01:35
-
-
Save cloudvoxcode/202685 to your computer and use it in GitHub Desktop.
Answer call with Java & Asterisk (more at help.cloudvox.com)
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
public class ExampleCallIn extends BaseAgiScript { | |
public void service(AgiRequest request, AgiChannel channel) throws AgiException { | |
answer(); | |
exec("Swift", "Thank you for calling Cloudvox. Enter a 6 digit number."); | |
exec("Read", "pin||6|2|10"); | |
String pin = get_variable("pin"); | |
exec("Swift", "You entered "); | |
if (pin.length > 0) { | |
sayDigits(pin); | |
} else { | |
streamFile("nothing-at-all"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment