Ticket #3684: callmonitor.module.patch

File callmonitor.module.patch, 1.5 kB (added by ip-rob, 3 years ago)

Patch for callmonitor.module file in recordings/modules for user portal

  • callmonitor.module.old

    old new  
    125125 
    126126    $displayname = $_SESSION['ari_user']['displayname']; 
    127127    $extension = $_SESSION['ari_user']['extension']; 
     128    $outboundCID = $_SESSION['ari_user']['outboundCID']; 
    128129 
    129130    // get data 
    130131    $record_count = $this->getCdrCount($q,$duration_filter); 
     
    513514 
    514515          foreach($files as $key => $path) { 
    515516            $parts = split("-", $path); 
    516             if (strlen($st)>1 &&  
     517            if ((strpos($path,$extension)!==FALSE || strpos($path,$outboundCID)!==FALSE) && 
     518                (strlen($st)!==FALSE &&  
    517519                   (strpos($path,$st)!==FALSE) ||  
    518                    (strpos($path,"auto")!==FALSE && $parts[1] >= $st && $parts[1] <= $et))
     520                   (strpos($path,"auto")!==FALSE && $parts[1] >= $st && $parts[1] <= $et)))
    519521              $recording = $path; 
    520522              $files[$key] = '';  // remove it from the recording files so it will not be matched twice 
    521523              break; 
     
    534536            foreach($files as $key => $path) { 
    535537              $split = explode("-", $path); 
    536538              if (strlen($st)>1  
     539                    && (strpos($path,$extension)>1 ||  
     540                        strpos($path,$outboundCID)>1) 
    537541                    && ((strpos($path,$st_1)!==FALSE) ||  
    538542                        (strpos($path,$st_2)!==FALSE) || 
    539543                        (strpos($path,"auto")!==FALSE && $parts[1] >= $st_1 && $parts[1] <= $et_1) ||