Skip to content

Instantly share code, notes, and snippets.

Created December 28, 2015 06:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/8eed141b1b4214110592 to your computer and use it in GitHub Desktop.
Save anonymous/8eed141b1b4214110592 to your computer and use it in GitHub Desktop.
//browser-phone.php
<?php
// @start snippet
include 'Services/Twilio/Capability.php';
$accountSid = 'ACXXX'; //from myaccount
$authToken = 'XXX'; //from myaccount
$token = new Services_Twilio_Capability($accountSid, $authToken);
$token->allowClientOutgoing('AP19471819473945b0d234ba2007a351c4'); //default sandbox appsid
$token->allowClientIncoming("alice"); //default name as given
// @end snippet
?>
//dial_number.php
//calledId: number generated from my twilio account
<?php
header('Content-type: text/xml');
?>
<Response>
<Dial callerId="+17067487754"><?php echo htmlspecialchars($_REQUEST["tocall"]); ?></Dial>
</Response>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment