--- callmonitor.module.old 2011-08-10 14:36:31.000000000 -0600 +++ callmonitor.module.new 2011-08-10 14:38:34.000000000 -0600 @@ -454,26 +454,27 @@ // try to find an exact match using the uniqueid if (isset($uniqueid)) { - $check_files = array(); - array_push($check_files,$path . $uniqueid . ".WAV"); - array_push($check_files,$path . $uniqueid . ".wav"); - array_push($check_files,$path . $uniqueid . ".gsm"); + if ($uniqueid && strnatcmp(phpversion(),'5.3.0') >= 0) { + $check_files = glob($path . "*" . $uniqueid . "*"); + } else { + $check_files = array(); + array_push($check_files,$path . $uniqueid . ".WAV"); + array_push($check_files,$path . $uniqueid . ".wav"); + array_push($check_files,$path . $uniqueid . ".gsm"); + array_push($check_files,$path . $unique_file_key . ".WAV"); + array_push($check_files,$path . $unique_file_key . ".wav"); + array_push($check_files,$path . $unique_file_key . ".gsm"); + array_push($check_files,$path . "g" . $extension . "-" . $unique_file_key . ".WAV"); + array_push($check_files,$path . "g" . $extension . "-" . $unique_file_key . ".wav"); + array_push($check_files,$path . "g" . $extension . "-" . $unique_file_key . ".gsm"); + array_push($check_files,$path . "q" . $extension . "-" . $unique_file_key . ".WAV"); + array_push($check_files,$path . "q" . $extension . "-" . $unique_file_key . ".wav"); + array_push($check_files,$path . "q" . $extension . "-" . $unique_file_key . ".gsm"); + array_push($check_files,$path . "OUT" . $extension . "-" . $unique_file_key . ".WAV"); + array_push($check_files,$path . "OUT" . $extension . "-" . $unique_file_key . ".wav"); + array_push($check_files,$path . "OUT" . $extension . "-" . $unique_file_key . ".gsm"); - array_push($check_files,$path . $unique_file_key . ".WAV"); - array_push($check_files,$path . $unique_file_key . ".wav"); - array_push($check_files,$path . $unique_file_key . ".gsm"); - - array_push($check_files,$path . "g" . $extension . "-" . $unique_file_key . ".WAV"); - array_push($check_files,$path . "g" . $extension . "-" . $unique_file_key . ".wav"); - array_push($check_files,$path . "g" . $extension . "-" . $unique_file_key . ".gsm"); - - array_push($check_files,$path . "q" . $extension . "-" . $unique_file_key . ".WAV"); - array_push($check_files,$path . "q" . $extension . "-" . $unique_file_key . ".wav"); - array_push($check_files,$path . "q" . $extension . "-" . $unique_file_key . ".gsm"); - - array_push($check_files,$path . "OUT" . $extension . "-" . $unique_file_key . ".WAV"); - array_push($check_files,$path . "OUT" . $extension . "-" . $unique_file_key . ".wav"); - array_push($check_files,$path . "OUT" . $extension . "-" . $unique_file_key . ".gsm"); + } array_push($check_files,$path . $userfield);