Fix a few a few settings that are required to add extension_uuid to xml cdr.
This commit is contained in:
@@ -43,7 +43,7 @@ else {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//get the http values and set them as php variables
|
//get the http values and set them as php variables
|
||||||
if (count($_POST)>0) {
|
if (count($_POST) > 0) {
|
||||||
//get the values from the HTTP POST and save them as PHP variables
|
//get the values from the HTTP POST and save them as PHP variables
|
||||||
$extension = check_str($_POST["extension"]);
|
$extension = check_str($_POST["extension"]);
|
||||||
$number_alias = check_str($_POST["number_alias"]);
|
$number_alias = check_str($_POST["number_alias"]);
|
||||||
@@ -410,7 +410,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||||||
if ($action == "update" && permission_exists('extension_edit')) {
|
if ($action == "update" && permission_exists('extension_edit')) {
|
||||||
|
|
||||||
if (strlen($password) == 0) {
|
if (strlen($password) == 0) {
|
||||||
$password = generate_password();
|
$password = generate_password(12,4);
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "update v_extensions set ";
|
$sql = "update v_extensions set ";
|
||||||
@@ -422,7 +422,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||||||
$sql .= "vm_password = '$vm_password', ";
|
$sql .= "vm_password = '$vm_password', ";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$sql .= "vm_password = 'user-choose', ";
|
$sql .= "vm_password = '".generate_password(9, 1)."', ";
|
||||||
}
|
}
|
||||||
$sql .= "accountcode = '$accountcode', ";
|
$sql .= "accountcode = '$accountcode', ";
|
||||||
$sql .= "effective_caller_id_name = '$effective_caller_id_name', ";
|
$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));
|
$db->exec(check_sql($sql));
|
||||||
unset($sql);
|
unset($sql);
|
||||||
|
|
||||||
//syncrhonize configuration
|
//synchronize configuration
|
||||||
if (is_readable($_SESSION['switch']['extensions']['dir'])) {
|
if (is_readable($_SESSION['switch']['extensions']['dir'])) {
|
||||||
require_once "app/extensions/resources/extension.php";
|
require_once "app/extensions/resources/classes/extension.php";
|
||||||
$extension = new extension;
|
$ext = new extension;
|
||||||
$extension->xml();
|
$ext->xml();
|
||||||
|
unset($ext);
|
||||||
}
|
}
|
||||||
|
|
||||||
//write the provision files
|
//write the provision files
|
||||||
|
|||||||
@@ -346,6 +346,7 @@
|
|||||||
//apply settings
|
//apply settings
|
||||||
$_SESSION["reload_xml"] = true;
|
$_SESSION["reload_xml"] = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -211,8 +211,8 @@ function process_xml_cdr($db, $leg, $xml_string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//insert the check_str($extension_uuid)
|
//insert the check_str($extension_uuid)
|
||||||
if (check_str($extension_uuid)) {
|
if (strlen($xml->variables->extension_uuid) > 0) {
|
||||||
$database->fields['extension_uuid'] = check_str($extension_uuid);
|
$database->fields['extension_uuid'] = check_str(urldecode($xml->variables->extension_uuid));
|
||||||
}
|
}
|
||||||
|
|
||||||
//insert xml_cdr into the db
|
//insert xml_cdr into the db
|
||||||
|
|||||||
Reference in New Issue
Block a user