Open GoogleCodeExporter opened 9 years ago
Hi,
asterisk-cr-viewer currently support only one root directory as recording
location.
if you use /var/spool/asterisk/monitor/Year/mounth/Day/uniq.wav try to use code
by Dein аdmin[AT]sаdmin.ru. You can found it in include/function.inc
Original comment by igor.oku...@gmail.com
on 23 Mar 2014 at 7:09
Hello, thanks for answer. I open Dein Code. But i now see only "SOME ERROR,
dirlist is empty" error message. :(
if (!function_exists('get_dir_list')) {
function get_dir_list($dir){
global $dirlist;
$dirlist=array();
if (!function_exists('find_dirs_recursive')) {
function find_dirs_recursive($sdir) {
global $dirlist;
foreach(glob($sdir) as $filename) {
echo $filename;
if(is_dir($filename)) {
$dirlist[]=$filename;
find_dirs_recursive($filename."/*");
};//endif
};//endforeach
}; //endfunc
};//endif exists
find_dirs_recursive($dir."/*");
};//endfunc
}
//*************** Main function ************
if (!function_exists('find_record_by_uniqid')) {
function find_record_by_uniqid($path,$uniqid){
//echo $path;
global $dirlist;
if (sizeof($dirlist) == 0 ){
get_dir_list($path);
};//endif size==0
if (sizeof($dirlist) == 0 ) {return "SOME ERROR, dirlist is empty";};
$found = "NOTHING FOUND";
foreach ($dirlist as $curdir) {
$res=glob($curdir."/*".$uniqid.".*");
if ($res) {$found=$res[0]; break;};
};//endforeach
$res=str_replace($path,"",$found); //cut $path from full filename
return $res; //to be compartable with func. formatFiles($row)
};//endfunc
}
$recorded_file = find_record_by_uniqid($system_monitor_dir,$row['uniqueid']);
Original comment by tulay.de...@gmail.com
on 24 Mar 2014 at 11:58
Unfortunately I use only uniqid based file names. I have no system to check /
reproduce this issue.
Original comment by igor.oku...@gmail.com
on 6 Apr 2014 at 5:26
Original comment by igor.oku...@gmail.com
on 9 Apr 2014 at 7:02
[deleted comment]
I have got the sane error only if apache (httpd) have no permissions to read
$system_monitor_dir, check it please.
By the way, try to disable SELinux if enabled
Original comment by vushte...@gmail.com
on 29 Apr 2014 at 11:55
Original issue reported on code.google.com by
oktaydem...@gmail.com
on 20 Mar 2014 at 10:30