Changeset 8169

Show
Ignore:
Timestamp:
08/25/09 18:53:37 (1 year ago)
Author:
p_lindheimer
Message:

fixes #3621 better matching of call recordings with users that occured at the same time

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • freepbx/branches/2.6/amp_conf/htdocs/recordings/modules/callmonitor.module

    r8102 r8169  
    431431      $uniqueid = $data_value['uniqueid']; 
    432432      $userfield = $data_value['userfield']; 
     433      $src = $data_value['src']; 
     434      $dst = $data_value['dst']; 
    433435 
    434436      // timestamps 
     
    509511        }  
    510512 
    511         // try and match a file using the calldate (if no unique number from database)  
     513        // try and match a file using the calldate (if no unique number from database or no unique number in file)  
    512514        if (!$recording) {  
    513515 
    514516          foreach($files as $key => $path) { 
     517            list($path,$filetype) = explode(".",$path,2); 
    515518            $parts = split("-", $path); 
    516             if (strlen($st)>1 &&  
    517                    (strpos($path,$st)!==FALSE) ||  
    518                    (strpos($path,"auto")!==FALSE && $parts[1] >= $st && $parts[1] <= $et)) { 
    519               $recording = $path
     519            if ((strlen($st)>1 && strpos($path,$st)!==FALSE && strlen($uniqueid)<=1) ||  
     520                    (strpos($path,"auto")!==FALSE && $parts[1] >= $st && $parts[1] <= $et && $parts[2] == $src && $parts[3] == $dst) ||  
     521                    (strpos($path,"auto")!==FALSE && $parts[1] >= $st && $parts[1] <= $et && $parts[2] == $dst && $parts[3] == $src)) { 
     522              $recording = $path . "." . $filetype
    520523              $files[$key] = '';  // remove it from the recording files so it will not be matched twice 
    521524              break;