Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WAV location #19

Open
GoogleCodeExporter opened this issue May 13, 2015 · 6 comments
Open

WAV location #19

GoogleCodeExporter opened this issue May 13, 2015 · 6 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. WAV location /var/spool/asterisk/monitor and /Year/mounth/Day. How is set 
this config ?

Original issue reported on code.google.com by [email protected] on 20 Mar 2014 at 10:30

@GoogleCodeExporter
Copy link
Author

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 [email protected] on 23 Mar 2014 at 7:09

@GoogleCodeExporter
Copy link
Author

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 [email protected] on 24 Mar 2014 at 11:58

@GoogleCodeExporter
Copy link
Author

Unfortunately I use only uniqid based file names. I have no system to check / 
reproduce this issue.

Original comment by [email protected] on 6 Apr 2014 at 5:26

@GoogleCodeExporter
Copy link
Author

Original comment by [email protected] on 9 Apr 2014 at 7:02

  • Added labels: Priority-Low
  • Removed labels: Priority-Medium

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

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 [email protected] on 29 Apr 2014 at 11:55

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant