Skip to content

Instantly share code, notes, and snippets.

@caseysoftware
Last active December 14, 2015 04:09
Show Gist options
  • Select an option

  • Save caseysoftware/5026156 to your computer and use it in GitHub Desktop.

Select an option

Save caseysoftware/5026156 to your computer and use it in GitHub Desktop.
<?php
include 'functions.php';
header("Content-type: text/xml");
$from = preg_replace("/[^0-9]/", "", $_POST['From']);
$response = new Services_Twilio_Twiml();
$response->dial($toPhone, array('timeout' => 5));
$response->say('Please leave your message after the tone');
$response->record(array(
'action' => 'rev2-recorded.php?From=' . $from,
'transcribeCallback' => 'rev2-transcribed.php?From=' . $from,
// Note: since we used transcribeCallback, 'transcribe' => 'true' is assumed
));
print $response;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment