Skip to content

Instantly share code, notes, and snippets.

@tsudot
Created July 4, 2012 12:50
Show Gist options
  • Save tsudot/3047171 to your computer and use it in GitHub Desktop.
Save tsudot/3047171 to your computer and use it in GitHub Desktop.
Record XML Plivo
<?php
require_once "plivo.php";
$r = new Response();
$speak_body = "Please leave a message after the beep. Press the star key when done.";
$r->addSpeak($speak_body);
$record_attributes = array (
"action" => "http://www.example.com/get_recording/",
"maxLength" => "30",
"finishOnKey" => "*",
);
$r->addRecord($record_attributes);
echo($r->toXML());
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment