Skip to content

Instantly share code, notes, and snippets.

@cloudvoxcode
Created October 6, 2009 01:11
Show Gist options
  • Save cloudvoxcode/202669 to your computer and use it in GitHub Desktop.
Save cloudvoxcode/202669 to your computer and use it in GitHub Desktop.
Answer call with PHP & Asterisk (more at help.cloudvox.com)
<?php
$call->answer();
$call->exec("Swift", "Thank you for calling Cloudvox. Enter a 6 digit number.");
$call->exec("Read", 'pin||6|skip|2|10');
$pin = $call->get_variable("pin");
$call->exec("Swift", "You entered ");
if (strlen($pin) > 0) {
$call->exec("SayDigits", $pin);
} else {
$call->exec("Playback", "nothing-at-all");
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment