Fix a few a few settings that are required to add extension_uuid to xml cdr.
This commit is contained in:
parent
7af82a6ece
commit
6929af625b
|
|
@ -410,7 +410,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
if ($action == "update" && permission_exists('extension_edit')) {
|
||||
|
||||
if (strlen($password) == 0) {
|
||||
$password = generate_password();
|
||||
$password = generate_password(12,4);
|
||||
}
|
||||
|
||||
$sql = "update v_extensions set ";
|
||||
|
|
@ -422,7 +422,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
$sql .= "vm_password = '$vm_password', ";
|
||||
}
|
||||
else {
|
||||
$sql .= "vm_password = 'user-choose', ";
|
||||
$sql .= "vm_password = '".generate_password(9, 1)."', ";
|
||||
}
|
||||
$sql .= "accountcode = '$accountcode', ";
|
||||
$sql .= "effective_caller_id_name = '$effective_caller_id_name', ";
|
||||
|
|
@ -480,11 +480,12 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
|
||||
//syncrhonize configuration
|
||||
//synchronize configuration
|
||||
if (is_readable($_SESSION['switch']['extensions']['dir'])) {
|
||||
require_once "app/extensions/resources/extension.php";
|
||||
$extension = new extension;
|
||||
$extension->xml();
|
||||
require_once "app/extensions/resources/classes/extension.php";
|
||||
$ext = new extension;
|
||||
$ext->xml();
|
||||
unset($ext);
|
||||
}
|
||||
|
||||
//write the provision files
|
||||
|
|
|
|||
|
|
@ -347,5 +347,6 @@
|
|||
$_SESSION["reload_xml"] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
@ -211,8 +211,8 @@ function process_xml_cdr($db, $leg, $xml_string) {
|
|||
}
|
||||
|
||||
//insert the check_str($extension_uuid)
|
||||
if (check_str($extension_uuid)) {
|
||||
$database->fields['extension_uuid'] = check_str($extension_uuid);
|
||||
if (strlen($xml->variables->extension_uuid) > 0) {
|
||||
$database->fields['extension_uuid'] = check_str(urldecode($xml->variables->extension_uuid));
|
||||
}
|
||||
|
||||
//insert xml_cdr into the db
|
||||
|
|
|
|||
Loading…
Reference in New Issue