IssabelFoundation / issabel

Open Source Unified Communications Platform
http://www.issabel.org
54 stars 13 forks source link

Call Recordings bugs #1

Open anutator opened 7 years ago

anutator commented 7 years ago
  1. Shows all calls as incoming. You must edit /var/www/html/modules/monitoring/index.php because of new file naming. Change letter O to o, g to r, and everything would work:

              $file = $value['uniqueid'];
                $namefile = basename($value['recordingfile']);
                if ($namefile == 'deleted') {
                    $arrTmp[6] = _tr('Deleted');
                } else switch($namefile[0]){
                      case "O":
                          $arrTmp[6] = _tr("Outgoing");
                      break;
                      case "g":
                          $arrTmp[6] = _tr("Group");
                      break;
                      case "q":
                          $arrTmp[6] = _tr("Queue");
                      break;
                      default :
                          $arrTmp[6] = _tr("Incoming");
                      break;
                }
  2. Filter for type of call doesn't work because you must look for audiofiles in subdirectiories (year/month/day) for several dates between Start Date and End Date. The bug is in /var/www/html/modules/monitoring/libs/paloSantoMonitoring.class.php. The programmer wrote that it was TODO, but nothing changed. I don't know how to find files in different subdirectories. Please, write, If you can.

    private function _getWhereCondRecordingFile($filter_value)
    {
        // TODO: manejar subdirectorios de monitor
        $monitor_dir = '/var/spool/asterisk/monitor';

        $in_val = strtolower($filter_value);
        switch($in_val){
            case "outgoing":
                return "(recordingfile like 'O%' OR recordingfile like '{$monitor_dir}/O%'".
                    " OR recordingfile like 'o%' OR recordingfile like '{$monitor_dir}/o%')";
            case "group":
                return "(recordingfile like 'g%' OR recordingfile like '{$monitor_dir}/g%'".
                    " OR recordingfile like 'r%' OR recordingfile like '{$monitor_dir}/r%')";
            case "queue":
                return "(recordingfile like 'q%' OR recordingfile like '{$monitor_dir}/q%')";
            default :
                // TODO: esto no filtra realmente, deja pasar cualquier número
                return "recordingfile REGEXP '[[:<:]][0-9]' ";
        }
    }
  1. Bug that when you are in Filter (test when mouse is in Start date form) and press Enter on keyboard (not button Show), the window "Are you sure you wish to delete recordings?". So you can delete recordings. I've tested in Firefox.