Update v_xml_cdr_import.php

This commit is contained in:
FusionPBX
2017-09-14 17:25:51 -05:00
committed by GitHub
parent e1895ee334
commit e2631f20a5

View File

@@ -545,33 +545,35 @@
//add the call recording
if (strlen($xml->variables->record_name) > 0 && file_exists($_SERVER["PROJECT_ROOT"]."/app/call_recordings/app_config.php")) {
$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_description']= $row['zzz'];
//$array['call_recordings'][$x]['call_recording_base64']= $row['zzz'];
if (urldecode($xml->variables->billsec) > 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_description']= $row['zzz'];
//$array['call_recordings'][$x]['call_recording_base64']= $row['zzz'];
//add the temporary permission
$p = new permissions;
$p->add("call_recording_add", "temp");
$p->add("call_recording_edit", "temp");
//add the temporary permission
$p = new permissions;
$p->add("call_recording_add", "temp");
$p->add("call_recording_edit", "temp");
$database = new database;
$database->app_name = 'call_recordings';
$database->app_uuid = '56165644-598d-4ed8-be01-d960bcb8ffed';
$database->domain_uuid = $domain_uuid;
$database->save($array);
$message = $database->message;
unset($array);
//remove the temporary permission
$p->delete("call_recording_add", "temp");
$p->delete("call_recording_edit", "temp");
$database = new database;
$database->app_name = 'call_recordings';
$database->app_uuid = '56165644-598d-4ed8-be01-d960bcb8ffed';
$database->domain_uuid = $domain_uuid;
$database->save($array);
$message = $database->message;
unset($array);
//remove the temporary permission
$p->delete("call_recording_add", "temp");
$p->delete("call_recording_edit", "temp");
}
}
}