Last active
December 14, 2015 04:09
-
-
Save caseysoftware/5026156 to your computer and use it in GitHub Desktop.
You can view this file in context here: https://github.com/caseysoftware/upgrading-google-voice-with-Twilio
This file contains hidden or 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 | |
| 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