0) { //update $ent['dialplanincludeid'] = $_POST['dialplanincludeid']; } else { //add $ent['dialplanincludeid'] = guid(); } $ent['extensionname'] = $_POST['extensionname']; $ent['order'] = $_POST['order']; //$ent['context'] = $_POST['context']; $ent['context'] = 'default'; $ent['enabled'] = $_POST['enabled']; $ent['descr'] = $_POST['descr']; $ent['opt1name'] = $_POST['opt1name']; $ent['opt1value'] = $_POST['opt1value']; if (isset($id) && $a_dialplan_includes[$id]) { if (count($a_dialplan_includes)>0) { foreach($a_dialplan_includes as $rowhelper) { //$rowhelper['dialplanincludeid']; //$rowhelper['extensionname']; //$rowhelper['context']; //$rowhelper['enabled']; $filenamechanged = false; if ($rowhelper['dialplanincludeid'] == $_POST['dialplanincludeid']) { if ($rowhelper['extensionname'] != $_POST['extensionname']) { //if the extension name has changed then remove the current dialplan xml file //to prepare for the new file $filenamechanged = true; } if ($rowhelper['order'] != $_POST['order']) { //if the order has changed then remove the current dialplan xml file //to prepare for the new file $filenamechanged = true; } if ($_POST['enabled'] == "false") { //if the extension name is disabled then remove the dialplan xml file $filenamechanged = true; } if ($filenamechanged){ $dialplanincludefilename = $rowhelper['order']."_".$rowhelper['extensionname'].".xml"; if (file_exists($v_conf_dir."/dialplan/default/".$dialplanincludefilename)) { unlink($v_conf_dir."/dialplan/default/".$dialplanincludefilename); } unset($dialplanincludefilename); } } unset($filenamechanged); } //end foreach } //end count //update the config $a_dialplan_includes[$id] = $ent; } else { //add to the config $a_dialplan_includes[] = $ent; } write_config(); sync_package_v_dialplan_includes(); header("Location: v_dialplan_includes.php"); exit; } } include("head.inc"); ?> $v_label: Dialplan: Edit

\n"; } ?>

Dialplan:
Dialplan Include general settings.


Extension Name
Supported characters are 'a-z', 'A-Z', '0-9', underscore '_', and period '.'.
Enabled \n"; echo " \n"; switch (htmlspecialchars($pconfig['enabled'])) { case "true": echo " \n"; echo " \n"; break; case "false": echo " \n"; echo " \n"; break; default: echo " \n"; echo " \n"; } echo " \n"; ?>
Order \n"; //echo " \n"; if (strlen(htmlspecialchars($pconfig['order']))> 0) { echo " \n"; } $i=0; while($i<=999) { if (strlen($i) == 1) { echo " \n"; } if (strlen($i) == 2) { echo " \n"; } if (strlen($i) == 3) { echo " \n"; } $i++; } echo " \n"; ?>
Processing of each dialplan include is determined by this order.
Description
You may enter a description here for your reference (not parsed).
  0 && $a_dialplan_includes[$id]) { echo "\n"; echo " \n"; echo " \n"; echo " \n"; } ?>


"; //print_r ($a_dialplan_includes); //echo ""; //if ($savemsg) print_info_box($savemsg); //if (file_exists($d_hostsdirty_path)): echo"

"; //print_info_box_np("The FreeSWITCH recordings have been changed.
You must apply the changes in order for them to take effect."); //echo"
"; //endif; //create a temporary id for the array $i = 0; if (count($a_dialplan_include_details) > 0) { foreach ($a_dialplan_include_details as $ent) { $a_dialplan_include_details[$i]['id'] = $i; $i++; } } //order the array function cmp_number($a, $b) { if ($a["fieldorder"] > $b["fieldorder"]) { return 1; } else { return 0; } } if (count($a_dialplan_include_details) > 0) { usort($a_dialplan_include_details, "cmp_number"); } ?>

Conditions and Actions
The following conditions, actions and anti-actions are used in the dialplan to direct call flow. Each is processed in order until you reach the action tag which tells FreeSWITCH what action to perform. You are not limited to only one condition or action tag for a given extension.


0) { foreach ($a_dialplan_include_details as $ent) { if ($ent['tag'] == "condition" && $dialplanincludeid == $ent['dialplanincludeid']) { ?> 0) { foreach ($a_dialplan_include_details as $ent) { if ($ent['tag'] == "action" && $dialplanincludeid == $ent['dialplanincludeid']) { ?> 0) { foreach ($a_dialplan_include_details as $ent) { if ($ent['tag'] == "anti-action" && $dialplanincludeid == $ent['dialplanincludeid']) { ?> 0) { foreach ($a_dialplan_include_details as $ent) { if ($ent['tag'] == "param" && $dialplanincludeid == $ent['dialplanincludeid']) { ?>
Tag Type Data Order