0) {
foreach ($a_recordings as $recordingent) {
$config_recording_list .= $recordingent['filename']."|";
$i++;
}
}
$config_change = 0;
if (is_dir($v_recordings_dir.'/')) {
if ($dh = opendir($v_recordings_dir.'/')) {
while (($file = readdir($dh)) !== false) {
if (filetype($v_recordings_dir.'/' . $file) == "file") {
if (strpos($config_recording_list, $file) === false) {
//$handle = fopen($v_recordings_dir.'/'.$file,'rb');
//$file_content = fread($handle,filesize($v_recordings_dir.'/'.$file));
//fclose($handle);
$a_file = split("\.", $file);
$recordingent = array();
$recordingent['filename'] = $file;
$recordingent['recordingname'] = $a_file[0];
$recordingent['recordingid'] = guid();
//$recordingent['filecontent'] = base64_encode($file_content);
$recordingent['descr'] = 'Auto';
$a_recordings[] = $recordingent;
write_config();
unset($file_content);
}
else {
//echo "The file was found. ";
}
}
}
closedir($dh);
}
}
//saved for future use if and when config.xml scales well
//enough to save the files inside it
//$i = 0;
//if (count($a_recordings) > 0) {
// foreach ($a_recordings as $recordingent) {
// if (!is_file($v_recordings_dir.'/'.$recordingent['filename'])) {
//echo "not found: ".$recordingent['filename']." ";
//recording not found restore the file from the config.xml
//$file_content = $recordingent['filecontent'];
//$handle = fopen($v_recordings_dir.'/'.$recordingent['filename'],'w');
//fwrite ($handle, base64_decode($file_content));
//unset($file_content);
//fclose($handle);
//$recordingent['filecontent'] = base64_encode($file_content);
// loop through recordings in the config.xml
// if the file does not exist remove it from the file system.
//unset($a_recordings[$i]);
// $config_change = 1;
// }
// else {
//echo "found: ".$recordingent['filename']." ";
// }
// $i++;
// }
//}
if ($config_change == 1) {
write_config();
$config_change = 0;
}
//if ($savemsg) print_info_box($savemsg);
//if (file_exists($d_hostsdirty_path)): echo"";
//print_info_box_np("The FreeSWITCH recordings have been changed. You must apply the changes in order for them to take effect.");
//echo" ";
//endif;
?>
Recordings:
To make a recording dial *732673 (record) or you can make a
16bit 8khz/16khz Mono WAV file then copy it to the
following directory then refresh the page to play it back.
Click on the 'Filename' to download it or the 'Recording Name' to
play the audio.
|
Music on Hold:
Music on hold can be in WAV or MP3 format. To play an MP3 file you must have
mod_shout enabled on the 'Modules' tab. You can adjust the volume of the MP3
audio from the 'Settings' tab. For best performance upload 16bit 8khz/16khz Mono WAV files.
|
|