Skip to content

Instantly share code, notes, and snippets.

@kevinbond
Created August 10, 2014 20:59
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 kevinbond/844762b2f57364f0bff0 to your computer and use it in GitHub Desktop.
Save kevinbond/844762b2f57364f0bff0 to your computer and use it in GitHub Desktop.
<?php
$recorded = false;
function callConnected($event) {
global $recorded;
$recorded = true;
_log("************** starting the recording");
startCallRecording("ftp://username:password@ftp.tropo.com/recordings/connectedRecording.mp3");
}
transfer("+14071234321", array(
"playvalue" => "http://www.phono.com/audio/holdmusic.mp3",
"terminator" => "#",
"timeout" => 40.0,
"onConnect" => "callConnected"
));
if($recorded){
_log("************** killing the recording");
stopCallRecording();
say("ftp://username:password@ftp.tropo.com/recordings/connectedRecording.mp3");
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment