Ticket #3621: callmonitor.module2.patch
| File callmonitor.module2.patch, 1.5 kB (added by Nick_Lewis, 3 years ago) |
|---|
-
old/callmonitor.module
old new 430 430 $lastdata = $data_value['lastdata']; 431 431 $uniqueid = $data_value['uniqueid']; 432 432 $userfield = $data_value['userfield']; 433 $src = $data_value['src']; 434 $dst = $data_value['dst']; 433 435 434 436 // timestamps 435 437 $st = trim(strtotime($calldate)); … … 508 510 } 509 511 } 510 512 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) 512 514 if (!$recording) { 513 515 514 516 foreach($files as $key => $path) { 517 list($path,$filetype) = explode(".",$path,2); 515 518 $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 $recording = $path . "." . $filetype; 520 522 $files[$key] = ''; // remove it from the recording files so it will not be matched twice 521 523 break; 522 524 }
