\n";
}
if (!empty($destination_hold_music)) {
@@ -596,7 +603,7 @@
$dialplan["dialplan_xml"] .= "\n";
//dialplan details
- if ($_SESSION['destinations']['dialplan_details']['boolean'] == "true") {
+ if ($settings->get('destinations', 'dialplan_details', '')) {
//set initial value of the row id
$y=0;
@@ -637,8 +644,8 @@
if (!empty($destination_condition_field)) {
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = $destination_condition_field;
}
- elseif (!empty($_SESSION['dialplan']['destination']['text'])) {
- $dialplan["dialplan_details"][$y]["dialplan_detail_type"] = $_SESSION['dialplan']['destination']['text'];
+ elseif (!empty($settings->get('dialplan', 'destination', ''))) {
+ $dialplan["dialplan_details"][$y]["dialplan_detail_type"] = $settings->get('dialplan', 'destination', '');
}
else {
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "regex";
@@ -697,8 +704,8 @@
if (!empty($destination_condition_field)) {
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = $destination_condition_field;
}
- elseif (!empty($_SESSION['dialplan']['destination']['text'])) {
- $dialplan["dialplan_details"][$y]["dialplan_detail_type"] = $_SESSION['dialplan']['destination']['text'];
+ elseif (!empty($settings->get('dialplan', 'destination', ''))) {
+ $dialplan["dialplan_details"][$y]["dialplan_detail_type"] = $settings->get('dialplan', 'destination', '');
}
else {
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "destination_number";
@@ -946,7 +953,7 @@
$dialplan["dialplan_details"][$y]["dialplan_uuid"] = $dialplan_uuid;
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "set";
- $dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "record_name=\${uuid}.\${record_ext}";
+ $dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "record_name=\${uuid}.".$record_extension;
$dialplan["dialplan_details"][$y]["dialplan_detail_inline"] = "true";
$dialplan["dialplan_details"][$y]["dialplan_detail_group"] = $dialplan_detail_group;
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $dialplan_detail_order;
@@ -983,6 +990,20 @@
//increment the dialplan detail order
$dialplan_detail_order = $dialplan_detail_order + 10;
+ //add a variable
+ $dialplan["dialplan_details"][$y]["domain_uuid"] = $domain_uuid;
+ $dialplan["dialplan_details"][$y]["dialplan_uuid"] = $dialplan_uuid;
+ $dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
+ $dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "set";
+ $dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "record_stereo_swap=true";
+ $dialplan["dialplan_details"][$y]["dialplan_detail_inline"] = "true";
+ $dialplan["dialplan_details"][$y]["dialplan_detail_group"] = $dialplan_detail_group;
+ $dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $dialplan_detail_order;
+ $y++;
+
+ //increment the dialplan detail order
+ $dialplan_detail_order = $dialplan_detail_order + 10;
+
//add a variable
$dialplan["dialplan_details"][$y]["domain_uuid"] = $domain_uuid;
$dialplan["dialplan_details"][$y]["dialplan_uuid"] = $dialplan_uuid;
@@ -1164,10 +1185,10 @@
//clear the cache
$cache = new cache;
- if ($_SESSION['destinations']['dialplan_mode']['text'] == 'multiple') {
+ if ($settings->get('destinations', 'dialplan_mode', '') == 'multiple') {
$cache->delete("dialplan:".$destination_context);
}
- if ($_SESSION['destinations']['dialplan_mode']['text'] == 'single') {
+ if ($settings->get('destinations', 'dialplan_mode', '') == 'single') {
if (isset($destination_prefix) && is_numeric($destination_prefix) && isset($destination_number) && is_numeric($destination_number)) {
$cache->delete("dialplan:".$destination_context.":".$destination_prefix.$destination_number);
$cache->delete("dialplan:".$destination_context.":+".$destination_prefix.$destination_number);
@@ -2081,7 +2102,7 @@
echo " ".$text['label-destination_enabled']."\n";
echo "\n";
echo "| \n";
- if (substr($_SESSION['theme']['input_toggle_style']['text'], 0, 6) == 'switch') {
+ if (substr($settings->get('theme', 'input_toggle_style', ''), 0, 6) == 'switch') {
echo " |