diff --git a/app/xml_cdr/resources/classes/xml_cdr.php b/app/xml_cdr/resources/classes/xml_cdr.php index a6f6a5a9d9..f54bc29dc6 100644 --- a/app/xml_cdr/resources/classes/xml_cdr.php +++ b/app/xml_cdr/resources/classes/xml_cdr.php @@ -408,22 +408,34 @@ if (!class_exists('xml_cdr')) { $this->array[$key]['recording_file'] = $recording_file; } - //get the recording name + //get the recording details if (strlen($xml->variables->recording_name) > 0) { $this->array[$key]['recording_name'] = urldecode($xml->variables->recording_name); } + + //get the recording details + if (strlen($xml->variables->record_name) > 0) { + $record_path = urldecode($xml->variables->record_path); + $record_name = urldecode($xml->variables->record_name); + $record_length = urldecode($xml->variables->billsec); + } + if (strlen($xml->variables->sofia_record_file) > 0) { + $record_path = dirname(urldecode($xml->variables->sofia_record_file)); + $record_name = basename(urldecode($xml->variables->sofia_record_file)); + $record_length = urldecode($xml->variables->record_seconds); + } //add the call recording - if (urldecode($xml->variables->record_name) > 0 && file_exists($_SERVER["PROJECT_ROOT"]."/app/call_recordings/app_config.php")) { - if (urldecode($xml->variables->billsec) > 0) { + if (urldecode($record_name) > 0 && file_exists($_SERVER["PROJECT_ROOT"]."/app/call_recordings/app_config.php")) { + if ($record_length > 0) { $x = 0; $array['call_recordings'][$x]['call_recording_uuid'] = $uuid; $array['call_recordings'][$x]['domain_uuid'] = $domain_uuid; - $array['call_recordings'][$x]['call_recording_name'] = check_str(urldecode($xml->variables->record_name)); - $array['call_recordings'][$x]['call_recording_path'] = check_str(urldecode($xml->variables->record_path)); - $array['call_recordings'][$x]['call_recording_length']= check_str(urldecode($xml->variables->billsec)); - $array['call_recordings'][$x]['call_recording_date']= check_str(urldecode($xml->variables->answer_stamp)); - $array['call_recordings'][$x]['call_direction']= check_str(urldecode($xml->variables->call_direction)); + $array['call_recordings'][$x]['call_recording_name'] = $record_name; + $array['call_recordings'][$x]['call_recording_path'] = $record_path; + $array['call_recordings'][$x]['call_recording_length'] = $record_length; + $array['call_recordings'][$x]['call_recording_date'] = urldecode($xml->variables->answer_stamp); + $array['call_recordings'][$x]['call_direction'] = urldecode($xml->variables->call_direction); //$array['call_recordings'][$x]['call_recording_description']= $row['zzz']; //$array['call_recordings'][$x]['call_recording_base64']= $row['zzz'];