Ticket #4134 (closed Bugs: fixed)

Opened 2 years ago

Last modified 1 year ago

recordings hardcoded path

Reported by: facePlanted Assigned to: sasargen
Priority: minor Milestone: 2.8
Component: ARI Version: 2.7-branch
Keywords: Cc:
Confirmation: Unreviewed SVN Revision (if applicable):
Backend Engine: All Backend Engine Version:

Description

Hi the file:

admin/recordings/includes/main.conf.php

has the variable

$ASTERISK_CALLMONITOR_PATH

hardcoded to /var/spool/asterisk/monitor

instead of reading it from ASTSPOOLDIR in /etc/amportal.conf

or astspooldir in /etc/asterisk/asterisk.conf

Thanks for supporting,

have a nice day.

Mike

Change History

04/07/10 01:31:16 changed by mickecarlsson

Please test this patch and report back:

Index: includes/common.php
===================================================================
--- includes/common.php (revision 9439)
+++ includes/common.php (working copy)
@@ -158,6 +158,8 @@
       $amp_dbpass = $amp_conf["AMPDBPASS"];
       $amp_dbhost = isset($amp_conf["AMPDBHOST"]) ? $amp_conf["AMPDBHOST"] : $LEGACY_AMP_DBHOST;
       $amp_dbname = isset($amp_conf["AMPDBNAME"]) ? $amp_conf["AMPDBNAME"] : $LEGACY_AMP_DBNAME;
+
+      $ast_spool_dir  = isset($amp_conf["ASTSPOOLDIR"]) ? $amp_conf["ASTSPOOLDIR"] : $ASTERISK_CALLMONITOR_PATH;

       $asteriskcdr_dbengine = $ASTERISKCDR_DBENGINE;
       $asteriskcdr_dbfile = $ASTERISKCDR_DBFILE;
Index: modules/callmonitor.module
===================================================================
--- modules/callmonitor.module  (revision 9439)
+++ modules/callmonitor.module  (working copy)
@@ -103,7 +103,7 @@
   function display($args) {

     global $ASTERISK_CALLMONITOR_PATH;
-    global $CALLMONITOR_ALLOW_DELETE;
+    global $ast_spool_dir;
     global $AJAX_PAGE_REFRESH_ENABLE;

     $display = new DisplaySearch();
@@ -131,13 +131,13 @@
     $data = $this->getCdrData($q,$duration_filter,$start,$span,$order,$sort);

     // get the call monitor recording files
-    $paths = split(';',$ASTERISK_CALLMONITOR_PATH);
+    $paths = split(';',$ast_spool_dir);
     foreach($paths as $key => $path) {
       if (!is_dir($path)) {
         $_SESSION['ari_error'] .= sprintf(_("Path is not a directory: %s"),$path) . "<br>";
       }
     }
-    $recordings = $this->getRecordings($ASTERISK_CALLMONITOR_PATH,$data);
+    $recordings = $this->getRecordings($ast_spool_dir,$data);

     // build controls
     if ($CALLMONITOR_ALLOW_DELETE) {

04/07/10 01:46:58 changed by mickecarlsson

Change one line and introduce one bug, try this patch instead:

Index: includes/common.php
===================================================================
--- includes/common.php (revision 9439)
+++ includes/common.php (working copy)
@@ -158,6 +158,8 @@
       $amp_dbpass = $amp_conf["AMPDBPASS"];
       $amp_dbhost = isset($amp_conf["AMPDBHOST"]) ? $amp_conf["AMPDBHOST"] : $LEGACY_AMP_DBHOST;
       $amp_dbname = isset($amp_conf["AMPDBNAME"]) ? $amp_conf["AMPDBNAME"] : $LEGACY_AMP_DBNAME;
+
+      $ast_spool_dir  = isset($amp_conf["ASTSPOOLDIR"]) ? $amp_conf["ASTSPOOLDIR"] : $ASTERISK_CALLMONITOR_PATH;

       $asteriskcdr_dbengine = $ASTERISKCDR_DBENGINE;
       $asteriskcdr_dbfile = $ASTERISKCDR_DBFILE;
Index: modules/callmonitor.module
===================================================================
--- modules/callmonitor.module  (revision 9439)
+++ modules/callmonitor.module  (working copy)
@@ -102,7 +102,7 @@
    */
   function display($args) {

-    global $ASTERISK_CALLMONITOR_PATH;
+    global $ast_spool_dir;
     global $CALLMONITOR_ALLOW_DELETE;
     global $AJAX_PAGE_REFRESH_ENABLE;

@@ -131,13 +131,13 @@
     $data = $this->getCdrData($q,$duration_filter,$start,$span,$order,$sort);

     // get the call monitor recording files
-    $paths = split(';',$ASTERISK_CALLMONITOR_PATH);
+    $paths = split(';',$ast_spool_dir);
     foreach($paths as $key => $path) {
       if (!is_dir($path)) {
         $_SESSION['ari_error'] .= sprintf(_("Path is not a directory: %s"),$path) . "<br>";
       }
     }
-    $recordings = $this->getRecordings($ASTERISK_CALLMONITOR_PATH,$data);
+    $recordings = $this->getRecordings($ast_spool_dir,$data);

     // build controls
     if ($CALLMONITOR_ALLOW_DELETE) {

04/08/10 16:08:01 changed by mickecarlsson

  • status changed from new to closed.
  • resolution set to fixed.

(In [9469]) Close #4134, remove hard coded path for Asterisk spool directory for recordings

08/24/10 18:08:16 changed by p_lindheimer

(In [10226]) fixes #4509 and re #4134 use proper path for call monitor

09/15/10 19:14:00 changed by p_lindheimer

(In [10285]) Merged revisions 10163-10171,10173-10284 via svnmerge from http://www.freepbx.org/v2/svn/freepbx/branches/2.8

........

r10169 | p_lindheimer | 2010-07-21 11:52:03 -0700 (Wed, 21 Jul 2010) | 1 line

fixes #4461 adapt to 1.4+ asterisk syntax. This change will break 1.2 systems

........

r10226 | p_lindheimer | 2010-08-24 16:08:16 -0700 (Tue, 24 Aug 2010) | 1 line

fixes #4509 and re #4134 use proper path for call monitor

........

r10246 | mickecarlsson | 2010-09-06 22:25:50 -0700 (Mon, 06 Sep 2010) | 1 line

Re #3503 Add Chinese language as selection in FreePBX, it was removed in r7337 and I forgot to add it back when proper language files was submitted. This change should be merged to all supported version

........

r10268 | p_lindheimer | 2010-09-14 15:56:42 -0700 (Tue, 14 Sep 2010) | 1 line

fixes #4501 change to 1.4+ syntax (this breaks 1.2 I believe - WARNING)

........