-
-
Save mickstevens/e2f32e18f816992330ed 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
<?php | |
// Set the numbers to call | |
$numbers = array("<number to call 1>", "<number to call 2>", "<number to call n>"); | |
$number_index = isset($_REQUEST['number_index']) ? $_REQUEST['number_index'] : "0"; | |
$DialCallStatus = isset($_REQUEST['DialCallStatus']) ? $_REQUEST['DialCallStatus'] : ""; | |
header("content-type: text/xml"); | |
// Check the status of the call and | |
// that there is a valid number to call | |
if($DialCallStatus!="completed" && $number_index<count($numbers)){ | |
?> | |
<Response> | |
<Dial action="attempt_call.php?number_index=<?php echo $number_index+1 ?>"> | |
<Number url="screen_for_machine.php"> | |
<?php echo $numbers[$number_index] ?> | |
</Number> | |
</Dial> | |
</Response> | |
<?php | |
} else { | |
?> | |
<Response> | |
<Hangup/> | |
</Response> | |
<?php | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment