diff --git a/includes/lib_switch.php b/includes/lib_switch.php
index 1e49148f66..d39ecd0837 100644
--- a/includes/lib_switch.php
+++ b/includes/lib_switch.php
@@ -3331,165 +3331,6 @@ if (!function_exists('phone_letter_to_number')) {
}
-if (!function_exists('save_ivr_menu_xml')) {
- function save_ivr_menu_xml() {
- global $db, $domain_uuid;
-
- //prepare for dialplan .xml files to be written. delete all dialplan files that are prefixed with dialplan_ and have a file extension of .xml
- if (count($_SESSION["domains"]) > 1) {
- $v_needle = 'v_'.$_SESSION['domain_name'].'_';
- }
- else {
- $v_needle = 'v_';
- }
- if($dh = opendir($_SESSION['switch']['conf']['dir']."/ivr_menus/")) {
- $files = Array();
- while($file = readdir($dh)) {
- if($file != "." && $file != ".." && $file[0] != '.') {
- if(is_dir($dir . "/" . $file)) {
- //this is a directory
- } else {
- if (strpos($file, $v_needle) !== false && substr($file,-4) == '.xml') {
- //echo "file: $file
\n";
- unlink($_SESSION['switch']['conf']['dir']."/ivr_menus/".$file);
- }
- }
- }
- }
- closedir($dh);
- }
-
- $sql = "select * from v_ivr_menus ";
- $sql .= " where domain_uuid = '$domain_uuid' ";
- $prep_statement = $db->prepare(check_sql($sql));
- $prep_statement->execute();
- $result = $prep_statement->fetchAll(PDO::FETCH_ASSOC);
- $result_count = count($result);
- unset ($prep_statement, $sql);
- if ($result_count > 0) {
- foreach($result as $row) {
- $dialplan_uuid = $row["dialplan_uuid"];
- $ivr_menu_uuid = $row["ivr_menu_uuid"];
- $ivr_menu_name = check_str($row["ivr_menu_name"]);
- $ivr_menu_extension = $row["ivr_menu_extension"];
- $ivr_menu_greet_long = $row["ivr_menu_greet_long"];
- $ivr_menu_greet_short = $row["ivr_menu_greet_short"];
- $ivr_menu_invalid_sound = $row["ivr_menu_invalid_sound"];
- $ivr_menu_exit_sound = $row["ivr_menu_exit_sound"];
- $ivr_menu_confirm_macro = $row["ivr_menu_confirm_macro"];
- $ivr_menu_confirm_key = $row["ivr_menu_confirm_key"];
- $ivr_menu_tts_engine = $row["ivr_menu_tts_engine"];
- $ivr_menu_tts_voice = $row["ivr_menu_tts_voice"];
- $ivr_menu_confirm_attempts = $row["ivr_menu_confirm_attempts"];
- $ivr_menu_timeout = $row["ivr_menu_timeout"];
- $ivr_menu_exit_app = $row["ivr_menu_exit_app"];
- $ivr_menu_exit_data = $row["ivr_menu_exit_data"];
- $ivr_menu_inter_digit_timeout = $row["ivr_menu_inter_digit_timeout"];
- $ivr_menu_max_failures = $row["ivr_menu_max_failures"];
- $ivr_menu_max_timeouts = $row["ivr_menu_max_timeouts"];
- $ivr_menu_digit_len = $row["ivr_menu_digit_len"];
- $ivr_menu_direct_dial = $row["ivr_menu_direct_dial"];
- $ivr_menu_enabled = $row["ivr_menu_enabled"];
- $ivr_menu_description = check_str($row["ivr_menu_description"]);
-
- //replace space with an underscore
- $ivr_menu_name = str_replace(" ", "_", $ivr_menu_name);
-
- //add each IVR menu to the XML config
- $tmp = "\n";
- if (strlen($ivr_menu_description) > 0) {
- $tmp .= " \n";
- }
- if (count($_SESSION["domains"]) > 1) {
- $tmp .= " \n";
- $tmp .= "\n";
-
- //remove invalid characters from the file names
- $ivr_menu_name = str_replace(" ", "_", $ivr_menu_name);
- $ivr_menu_name = preg_replace("/[\*\:\\/\<\>\|\'\"\?]/", "", $ivr_menu_name);
-
- //write the file
- if (count($_SESSION["domains"]) > 1) {
- $fout = fopen($_SESSION['switch']['conf']['dir']."/ivr_menus/v_".$_SESSION['domains'][$row['domain_uuid']]['domain_name']."_".$ivr_menu_name.".xml","w");
- }
- else {
- $fout = fopen($_SESSION['switch']['conf']['dir']."/ivr_menus/v_".$ivr_menu_name.".xml","w");
- }
- fwrite($fout, $tmp);
- fclose($fout);
- }
- }
- save_dialplan_xml();
-
- //apply settings
- $_SESSION["reload_xml"] = true;
- }
-}
-
if (!function_exists('save_call_center_xml')) {
function save_call_center_xml() {
global $db, $domain_uuid;
@@ -4098,7 +3939,7 @@ if (!function_exists('save_switch_xml')) {
save_var_xml();
save_call_center_xml();
save_gateway_xml();
- save_ivr_menu_xml();
+ //save_ivr_menu_xml();
save_sip_profile_xml();
}
if (is_readable($_SESSION['switch']['scripts']['dir'])) {