Skip to content

Instantly share code, notes, and snippets.

@RobSpectre
Created November 4, 2013 00:23
Show Gist options
  • Save RobSpectre/7296372 to your computer and use it in GitHub Desktop.
Save RobSpectre/7296372 to your computer and use it in GitHub Desktop.
Example of taking a prompt and forwarding to two different numbers.
<?php
header('Content-type: text/xml');
?>
<Response>
<Gather action='/2_handler.php' numDigits='1'>
<Say>Press 1 for US support.</Say>
<Say>Press 2 for other support.</Say>
</Gather>
</Response>
<?php
header('Content-type: text/xml');
$digits = $_REQUEST['Digits'];
?>
<Response>
<Dial><Number>
<?php
if ($digits == '1') {
echo "[ENTER US NUMBER HERE]";
} else {
echo "[ENTER OTHER NUMBER HERE]";
}
</Number></Dial>
</Response>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment