Skip to content

Instantly share code, notes, and snippets.

@TMcManus
Created December 16, 2012 00:03
Show Gist options
  • Save TMcManus/4301193 to your computer and use it in GitHub Desktop.
Save TMcManus/4301193 to your computer and use it in GitHub Desktop.
This is an example of how you could use Twilio to make a call to another number using one of your Twilio verified called IDs. In this case, our verified caller ID is "+17075550987".
<?php
header("content-type: text/xml");
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
?>
<Response>
<Gather action="make-call.php" timeout="30">
<Say>Please enter the phone number you wish to dial</Say>
</Gather>
</Response>
<?php
header("content-type: text/xml");
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
?>
<Response>
<Dial callerId="+17075550987"><?php echo $_POST['Digits'];?></Dial>
</Response>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment