//add the sip profile setting
    $sql = "insert into v_sip_profile_settings ";
    $sql .= "(";
    $sql .= "sip_profile_setting_uuid, ";
    $sql .= "sip_profile_uuid, ";
    $sql .= "sip_profile_setting_name, ";
    $sql .= "sip_profile_setting_value, ";
    $sql .= "sip_profile_setting_enabled, ";
    $sql .= "sip_profile_setting_description ";
    $sql .= ")";
    $sql .= "values ";
    $sql .= "(";
    $sql .= "'" . uuid() . "', ";
    $sql .= "'{$sip_profile_uuid_new}', ";
    $sql .= "'{$sip_profile_setting_name}', ";
    $sql .= "'{$sip_profile_setting_value}', ";
    $sql .= "'{$sip_profile_setting_enabled}', ";
    $sql .= "'{$sip_profile_setting_description}' ";
    $sql .= ")";
    $db->exec(check_sql($sql));
    unset($sql);
}
unset($prep_statement);
//save the sip profile xml
save_sip_profile_xml();
//apply settings reminder
$_SESSION["reload_xml"] = true;
//redirect the user
$_SESSION["message"] = $text['message-copy'];
header("Location: " . PROJECT_PATH . "/app/sip_profiles/sip_profiles.php");
return;
Exemple #2
0
 function save_switch_xml()
 {
     if (is_readable($_SESSION['switch']['dialplan']['dir'])) {
         save_dialplan_xml();
     }
     if (is_readable($_SESSION['switch']['extensions']['dir'])) {
         if (file_exists($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "/app/extensions/resources/classes/extension.php")) {
             require_once $_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "app/extensions/resources/classes/extension.php";
             $extension = new extension();
             $extension->xml();
         }
     }
     if (is_readable($_SESSION['switch']['conf']['dir'])) {
         if (file_exists($_SERVER['DOCUMENT_ROOT'] . PROJECT_PATH . "/app/settings/app_config.php")) {
             save_setting_xml();
         }
         if (file_exists($_SERVER['DOCUMENT_ROOT'] . PROJECT_PATH . "/app/modules/app_config.php")) {
             save_module_xml();
         }
         if (file_exists($_SERVER['DOCUMENT_ROOT'] . PROJECT_PATH . "/app/vars/app_config.php")) {
             save_var_xml();
         }
         if (file_exists($_SERVER['DOCUMENT_ROOT'] . PROJECT_PATH . "/app/call_center/app_config.php")) {
             save_call_center_xml();
         }
         if (file_exists($_SERVER['DOCUMENT_ROOT'] . PROJECT_PATH . "/app/gateways/app_config.php")) {
             save_gateway_xml();
         }
         //if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/ivr_menu/app_config.php")) {
         //	save_ivr_menu_xml();
         //}
         if (file_exists($_SERVER['DOCUMENT_ROOT'] . PROJECT_PATH . "/app/sip_profiles/app_config.php")) {
             save_sip_profile_xml();
         }
     }
 }