mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Multilinguified Dialplan Manager, tweaked Inbound and Outbound Routes
This commit is contained in:
110
app/dialplan/app_languages.php
Normal file
110
app/dialplan/app_languages.php
Normal file
@@ -0,0 +1,110 @@
|
||||
<?php
|
||||
|
||||
//Dialplan
|
||||
|
||||
$text['title-dialplan_manager']['en-us'] = 'Dialplan Manager';
|
||||
$text['title-inbound_routes']['en-us'] = 'Inbound Routes';
|
||||
$text['title-outbound_routes']['en-us'] = 'Outbound Routes';
|
||||
$text['title-time_conditions']['en-us'] = 'Time Conditions';
|
||||
$text['title-dialplan_add']['en-us'] = 'Dialplan Add';
|
||||
$text['title-dialplan_edit']['en-us'] = 'Dialplan Edit';
|
||||
$text['title-dialplan_detail']['en-us'] = 'Dialplan Detail';
|
||||
$text['title-default_dialplan']['en-us'] = 'Default Dialplan';
|
||||
|
||||
$text['header-dialplan_manager']['en-us'] = 'Dialplan Manager';
|
||||
$text['header-inbound_routes']['en-us'] = 'Inbound Routes';
|
||||
$text['header-outbound_routes']['en-us'] = 'Outbound Routes';
|
||||
$text['header-time_conditions']['en-us'] = 'Time Conditions';
|
||||
$text['header-dial_plan-add']['en-us'] = 'Dialplan Add';
|
||||
$text['header-dial_plan-edit']['en-us'] = 'Dialplan Edit';
|
||||
$text['header-conditions_and_actions']['en-us'] = 'Conditions and Actions';
|
||||
$text['header-dial_plan_detail']['en-us'] = 'Dialplan Detail';
|
||||
$text['header-default_dialplan']['en-us'] = 'Default Dialplan';
|
||||
|
||||
$text['description-dialplan_manager']['en-us'] = 'The dialplan provides a view of some of the feature codes, as well as the IVR Menu, Conferences, Queues and other destinations.';
|
||||
$text['description-dialplan_manager-superadmin']['en-us'] = 'The dialplan is used to setup call destinations based on conditions and context. You can use the dialplan to send calls to gateways, auto attendants, external numbers, to scripts, or any destination.';
|
||||
$text['description-inbound_routes']['en-us'] = 'Route incoming calls to destinations based on one or more conditions. It can send incoming calls to an IVR Menu, Call Group, Extension, External Number, Script. Order is important when an anti-action is used or when there are multiple conditions that match.';
|
||||
$text['description-outbound_routes']['en-us'] = 'Route outbound calls to gateways, tdm, enum and more. When a call matches the conditions the call to outbound routes.';
|
||||
$text['description-time_conditions']['en-us'] = 'Time conditions route calls based on time conditions. You can use time conditions to send calls to an IVR Menu, External numbers, Scripts, or other destinations.';
|
||||
$text['description-dial_plan-edit']['en-us'] = 'Dialplan include general settings.';
|
||||
$text['description-conditions_and_actions']['en-us'] = 'The following conditions, actions and anti-actions are used in the dialplan to direct call flow. Each is processed in order that it is given. Use as many conditions, actions or anti-actions as needed.';
|
||||
$text['description-default_dialplan']['en-us'] = 'The default dialplan is used to setup call destinations based on conditions and context. You can use the dialplan to send calls to gateways, auto attendants, external numbers, to scripts, or any destination.';
|
||||
|
||||
$text['label-name']['en-us'] = 'Name';
|
||||
$text['label-condition_1']['en-us'] = 'Condition 1';
|
||||
$text['label-condition_2']['en-us'] = 'Condition 2';
|
||||
$text['label-field']['en-us'] = 'Field';
|
||||
$text['label-expression']['en-us'] = 'Expression';
|
||||
$text['label-action_1']['en-us'] = 'Action 1';
|
||||
$text['label-action_2']['en-us'] = 'Action 2';
|
||||
$text['label-number']['en-us'] = 'Number';
|
||||
$text['label-context']['en-us'] = 'Context';
|
||||
$text['label-continue']['en-us'] = 'Continue';
|
||||
$text['label-order']['en-us'] = 'Order';
|
||||
$text['label-enabled']['en-us'] = 'Enabled';
|
||||
$text['label-description']['en-us'] = 'Description';
|
||||
$text['label-tag']['en-us'] = 'Tag';
|
||||
$text['label-type']['en-us'] = 'Type';
|
||||
$text['label-data']['en-us'] = 'Data';
|
||||
$text['label-group']['en-us'] = 'Group';
|
||||
$text['label-break']['en-us'] = 'Break';
|
||||
$text['label-inline']['en-us'] = 'Inline';
|
||||
$text['label-application']['en-us'] = 'Application';
|
||||
$text['label-value']['en-us'] = 'Value';
|
||||
|
||||
$text['optgroup-conditions_or_regular_expressions']['en-us'] = 'Conditions or Regular Expressions';
|
||||
$text['optgroup-applications']['en-us'] = 'Applications';
|
||||
$text['option-context']['en-us'] = 'Context';
|
||||
$text['option-username']['en-us'] = 'Username';
|
||||
$text['option-rdnis']['en-us'] = 'RDNIS';
|
||||
$text['option-destination_number']['en-us'] = 'Destination Number';
|
||||
$text['option-dialplan']['en-us'] = 'Dialplan';
|
||||
$text['option-public']['en-us'] = 'Public';
|
||||
$text['option-caller_id_name']['en-us'] = 'Caller ID Name';
|
||||
$text['option-caller_id_number']['en-us'] = 'Caller ID Number';
|
||||
$text['option-ani']['en-us'] = 'ANI';
|
||||
$text['option-ani2']['en-us'] = 'ANI2';
|
||||
$text['option-uuid']['en-us'] = 'UUID';
|
||||
$text['option-source']['en-us'] = 'Source';
|
||||
$text['option-chan_name']['en-us'] = 'Channel Name';
|
||||
$text['option-network_addr']['en-us'] = 'Network Address';
|
||||
$text['option-hour']['en-us'] = 'Hour';
|
||||
$text['option-minute']['en-us'] = 'Minute';
|
||||
$text['option-minute_of_day']['en-us'] = 'Minute of Day';
|
||||
$text['option-day_of_month']['en-us'] = 'Day of Month';
|
||||
$text['option-week_of_month']['en-us'] = 'Week of Month';
|
||||
$text['option-month']['en-us'] = 'Month';
|
||||
$text['option-day_of_year']['en-us'] = 'Day of Year';
|
||||
$text['option-year']['en-us'] = 'Year';
|
||||
$text['option-day_of_week']['en-us'] = 'Day of Week';
|
||||
$text['option-week']['en-us'] = 'Week';
|
||||
$text['option-true']['en-us'] = 'True';
|
||||
$text['option-false']['en-us'] = 'False';
|
||||
$text['option-condition']['en-us'] = 'Condition';
|
||||
$text['option-action']['en-us'] = 'Action';
|
||||
$text['option-anti-action']['en-us'] = 'Anti-Action';
|
||||
$text['option-regex']['en-us'] = 'Regular Expression';
|
||||
$text['option-on_true']['en-us'] = 'On True';
|
||||
$text['option-on_false']['en-us'] = 'On False';
|
||||
$text['option-always']['en-us'] = 'Always';
|
||||
$text['option-never']['en-us'] = 'Never';
|
||||
|
||||
$text['button-add']['en-us'] = 'Add';
|
||||
$text['button-edit']['en-us'] = 'Edit';
|
||||
$text['button-delete']['en-us'] = 'Delete';
|
||||
$text['button-advanced']['en-us'] = 'Advanced';
|
||||
$text['button-back']['en-us'] = 'Back';
|
||||
$text['button-copy']['en-us'] = 'Copy';
|
||||
$text['button-save']['en-us'] = 'Save';
|
||||
$text['button-restore']['en-us'] = 'Restore Default';
|
||||
|
||||
$text['confirm-delete']['en-us'] = 'Do you really want to delete this?';
|
||||
$text['confirm-copy']['en-us'] = 'Do you really want to copy this?';
|
||||
|
||||
$text['message-add']['en-us'] = 'Add Completed';
|
||||
$text['message-update']['en-us'] = 'Update Completed';
|
||||
$text['message-delete']['en-us'] = 'Delete Completed';
|
||||
$text['message-copy']['en-us'] = 'Copy Completed';
|
||||
$text['message-required']['en-us'] = 'Please provide: ';
|
||||
|
||||
?>
|
||||
@@ -33,7 +33,15 @@ else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
//add multi-lingual support
|
||||
require_once "app_languages.php";
|
||||
foreach($text as $key => $value) {
|
||||
$text[$key] = $value[$_SESSION['domain']['language']['code']];
|
||||
}
|
||||
|
||||
require_once "includes/header.php";
|
||||
$page["title"] = $text['title-dialplan_add'];
|
||||
require_once "includes/paging.php";
|
||||
|
||||
$order_by = $_GET["order_by"];
|
||||
@@ -73,13 +81,13 @@ $order = $_GET["order"];
|
||||
|
||||
if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
//check for all required data
|
||||
if (strlen($domain_uuid) == 0) { $msg .= "Please provide: domain_uuid<br>\n"; }
|
||||
if (strlen($dialplan_name) == 0) { $msg .= "Please provide: Extension Name<br>\n"; }
|
||||
if (strlen($condition_field_1) == 0) { $msg .= "Please provide: Condition Field<br>\n"; }
|
||||
if (strlen($condition_expression_1) == 0) { $msg .= "Please provide: Condition Expression<br>\n"; }
|
||||
if (strlen($action_application_1) == 0) { $msg .= "Please provide: Action Application<br>\n"; }
|
||||
//if (strlen($dialplan_enabled) == 0) { $msg .= "Please provide: Enabled True or False<br>\n"; }
|
||||
//if (strlen($dialplan_description) == 0) { $msg .= "Please provide: Description<br>\n"; }
|
||||
if (strlen($domain_uuid) == 0) { $msg .= $text['message-required']."domain_uuid<br>\n"; }
|
||||
if (strlen($dialplan_name) == 0) { $msg .= $text['message-required'].$text['label-name']."<br>\n"; }
|
||||
if (strlen($condition_field_1) == 0) { $msg .= $text['message-required'].$text['label-condition_1']." ".$text['label-field']."<br>\n"; }
|
||||
if (strlen($condition_expression_1) == 0) { $msg .= $text['message-required'].$text['label-condition_1']." ".$text['label-expression']."<br>\n"; }
|
||||
if (strlen($action_application_1) == 0) { $msg .= $text['message-required'].$text['label-action_1']."<br>\n"; }
|
||||
//if (strlen($dialplan_enabled) == 0) { $msg .= $text['message-required'].$text['label-enabled']."<br>\n"; }
|
||||
//if (strlen($dialplan_description) == 0) { $msg .= $text['message-required'].$text['label-description']."<br>\n"; }
|
||||
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
require_once "includes/header.php";
|
||||
require_once "includes/persistformvar.php";
|
||||
@@ -251,7 +259,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
require_once "includes/header.php";
|
||||
echo "<meta http-equiv=\"refresh\" content=\"2;url=".PROJECT_PATH."/app/dialplan/dialplans.php\">\n";
|
||||
echo "<div align='center'>\n";
|
||||
echo "Update Complete\n";
|
||||
echo $text['message-update']."\n";
|
||||
echo "</div>\n";
|
||||
require_once "includes/footer.php";
|
||||
return;
|
||||
@@ -299,32 +307,26 @@ echo "<div align='center'>\n";
|
||||
|
||||
echo " <table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td align='left'><span class=\"vexpl\"><span class=\"red\"><strong>Dialplan\n";
|
||||
echo " </strong></span></span>\n";
|
||||
echo " <td align='left'>\n";
|
||||
echo " <span class=\"vexpl\"><span class=\"red\"><strong>".$text['header-dial_plan-add']."</strong></span></span>\n";
|
||||
echo " </td>\n";
|
||||
echo " <td align='right'>\n";
|
||||
echo " <input type='button' class='btn' name='' alt='back' onclick=\"window.location='dialplans.php'\" value='Back'>\n";
|
||||
echo " <input type='button' class='btn' name='' alt='".$text['button-back']."' onclick=\"window.location='dialplans.php'\" value='".$text['button-back']."'>\n";
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td align='left' colspan='2'>\n";
|
||||
echo " <span class=\"vexpl\">\n";
|
||||
echo " The dialplan is used to setup call destinations based on conditions and context.\n";
|
||||
echo " You can use the dialplan to send calls to gateways, auto attendants, external numbers,\n";
|
||||
echo " to scripts, or any destination.\n";
|
||||
echo " </span>\n";
|
||||
echo " <br><span class=\"vexpl\">".$text['description-dialplan_manager-superadmin']."</span>\n";
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
echo " </table>";
|
||||
|
||||
echo "<br />\n";
|
||||
echo "<br />\n";
|
||||
|
||||
echo "<table width='100%' border='0' cellpadding='6' cellspacing='0'>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
|
||||
echo " Name:\n";
|
||||
echo " ".$text['label-name'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' style='width: 60%;' type='text' name='dialplan_name' maxlength='255' value=\"$dialplan_name\">\n";
|
||||
@@ -340,13 +342,13 @@ echo "</tr>\n";
|
||||
//echo "<td class='vtable' align='left'>\n";
|
||||
//echo " <select class='formfld' name='dialplan_continue' style='width: 60%;'>\n";
|
||||
//echo " <option value=''></option>\n";
|
||||
//if ($dialplan_continue == "true") {
|
||||
//if ($dialplan_continue == "true") {
|
||||
// echo " <option value='true' SELECTED >true</option>\n";
|
||||
//}
|
||||
//else {
|
||||
// echo " <option value='true'>true</option>\n";
|
||||
//}
|
||||
//if ($dialplan_continue == "false") {
|
||||
//if ($dialplan_continue == "false") {
|
||||
// echo " <option value='false' SELECTED >false</option>\n";
|
||||
//}
|
||||
//else {
|
||||
@@ -360,7 +362,7 @@ echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " Condition 1:\n";
|
||||
echo " ".$text['label-condition_1'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
?>
|
||||
@@ -397,7 +399,7 @@ function Replace_condition_field_1(obj){
|
||||
<?php
|
||||
echo " <table style='width: 60%;' border='0'>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td style='width: 62px;'>Field:</td>\n";
|
||||
echo " <td style='width: 62px;'>".$text['label-field'].":</td>\n";
|
||||
echo " <td style='width: 35%;' nowrap='nowrap'>\n";
|
||||
echo " <select class='formfld' name='condition_field_1' id='condition_field_1' onchange='changeToInput_condition_field_1(this);this.style.visibility = \"hidden\";' style='width:85%'>\n";
|
||||
echo " <option value=''></option>\n";
|
||||
@@ -405,37 +407,37 @@ if (strlen($condition_field_1) > 0) {
|
||||
echo " <option value='$condition_field_1' selected='selected'>$condition_field_1</option>\n";
|
||||
}
|
||||
echo " <optgroup label='Field'>\n";
|
||||
echo " <option value='context'>context</option>\n";
|
||||
echo " <option value='username'>username</option>\n";
|
||||
echo " <option value='rdnis'>rdnis</option>\n";
|
||||
echo " <option value='destination_number'>destination_number</option>\n";
|
||||
echo " <option value='public'>public</option>\n";
|
||||
echo " <option value='caller_id_name'>caller_id_name</option>\n";
|
||||
echo " <option value='caller_id_number'>caller_id_number</option>\n";
|
||||
echo " <option value='ani'>ani</option>\n";
|
||||
echo " <option value='ani2'>ani2</option>\n";
|
||||
echo " <option value='uuid'>uuid</option>\n";
|
||||
echo " <option value='source'>source</option>\n";
|
||||
echo " <option value='chan_name'>chan_name</option>\n";
|
||||
echo " <option value='network_addr'>network_addr</option>\n";
|
||||
echo " <option value='context'>".$text['option-context']."</option>\n";
|
||||
echo " <option value='username'>".$text['option-username']."</option>\n";
|
||||
echo " <option value='rdnis'>".$text['option-rdnis']."</option>\n";
|
||||
echo " <option value='destination_number'>".$text['option-destination_number']."</option>\n";
|
||||
echo " <option value='public'>".$text['option-public']."</option>\n";
|
||||
echo " <option value='caller_id_name'>".$text['option-caller_id_name']."</option>\n";
|
||||
echo " <option value='caller_id_number'>".$text['option-caller_id_number']."</option>\n";
|
||||
echo " <option value='ani'>".$text['option-ani']."</option>\n";
|
||||
echo " <option value='ani2'>".$text['option-ani2']."</option>\n";
|
||||
echo " <option value='uuid'>".$text['option-uuid']."</option>\n";
|
||||
echo " <option value='source'>".$text['option-source']."</option>\n";
|
||||
echo " <option value='chan_name'>".$text['option-chan_name']."</option>\n";
|
||||
echo " <option value='network_addr'>".$text['option-network_addr']."</option>\n";
|
||||
echo " </optgroup>\n";
|
||||
echo " <optgroup label='Time'>\n";
|
||||
echo " <option value='hour'>hour</option>\n";
|
||||
echo " <option value='minute'>minute</option>\n";
|
||||
echo " <option value='minute-of-day'>minute of day</option>\n";
|
||||
echo " <option value='mday'>day of month</option>\n";
|
||||
echo " <option value='mweek'>week of month</option>\n";
|
||||
echo " <option value='mon'>month</option>\n";
|
||||
echo " <option value='yday'>day of year</option>\n";
|
||||
echo " <option value='year'>year</option>\n";
|
||||
echo " <option value='wday'>day of week</option>\n";
|
||||
echo " <option value='week'>week</option>\n";
|
||||
echo " <option value='hour'>".$text['option-hour']."</option>\n";
|
||||
echo " <option value='minute'>".$text['option-minute']."</option>\n";
|
||||
echo " <option value='minute-of-day'>".$text['option-minute_of_day']."</option>\n";
|
||||
echo " <option value='mday'>".$text['option-day_of_month']."</option>\n";
|
||||
echo " <option value='mweek'>".$text['option-week_of_month']."</option>\n";
|
||||
echo " <option value='mon'>".$text['option-month']."</option>\n";
|
||||
echo " <option value='yday'>".$text['option-day_of_year']."</option>\n";
|
||||
echo " <option value='year'>".$text['option-year']."</option>\n";
|
||||
echo " <option value='wday'>".$text['option-day_of_week']."</option>\n";
|
||||
echo " <option value='week'>".$text['option-week']."</option>\n";
|
||||
echo " </optgroup>\n";
|
||||
echo " </select>\n";
|
||||
echo " <input type='button' id='btn_select_to_input_condition_field_1' class='btn' name='' alt='back' onclick='changeToInput_condition_field_1(document.getElementById(\"condition_field_1\"));this.style.visibility = \"hidden\";' value='<'>\n";
|
||||
echo " <input type='button' id='btn_select_to_input_condition_field_1' class='btn' name='' alt='".$text['button-back']."' onclick='changeToInput_condition_field_1(document.getElementById(\"condition_field_1\"));this.style.visibility = \"hidden\";' value='<'>\n";
|
||||
echo " <br />\n";
|
||||
echo " </td>\n";
|
||||
echo " <td style='width: 73px;'> Expression:</td>\n";
|
||||
echo " <td style='width: 73px;'> ".$text['label-expression'].":</td>\n";
|
||||
echo " <td>\n";
|
||||
echo " <input class='formfld' type='text' name='condition_expression_1' maxlength='255' style='width:100%' value=\"$condition_expression_1\">\n";
|
||||
echo " </td>\n";
|
||||
@@ -447,14 +449,14 @@ echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
||||
echo " Condition 2:\n";
|
||||
echo " ".$text['label-condition_2'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
|
||||
echo " <table style='width: 60%;' border='0'>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td align='left' style='width: 62px;'>\n";
|
||||
echo " Field:\n";
|
||||
echo " ".$text['label-field'].":\n";
|
||||
echo " </td>\n";
|
||||
echo " <td style='width: 35%;' align='left' nowrap='nowrap'>\n";
|
||||
?>
|
||||
@@ -495,38 +497,38 @@ if (strlen($condition_field_2) > 0) {
|
||||
echo " <option value='$condition_field_2' selected>$condition_field_2</option>\n";
|
||||
}
|
||||
echo " <optgroup label='Field'>\n";
|
||||
echo " <option value='context'>context</option>\n";
|
||||
echo " <option value='username'>username</option>\n";
|
||||
echo " <option value='rdnis'>rdnis</option>\n";
|
||||
echo " <option value='destination_number'>destination_number</option>\n";
|
||||
echo " <option value='public'>public</option>\n";
|
||||
echo " <option value='caller_id_name'>caller_id_name</option>\n";
|
||||
echo " <option value='caller_id_number'>caller_id_number</option>\n";
|
||||
echo " <option value='ani'>ani</option>\n";
|
||||
echo " <option value='ani2'>ani2</option>\n";
|
||||
echo " <option value='uuid'>uuid</option>\n";
|
||||
echo " <option value='source'>source</option>\n";
|
||||
echo " <option value='chan_name'>chan_name</option>\n";
|
||||
echo " <option value='network_addr'>network_addr</option>\n";
|
||||
echo " <option value='context'>".$text['option-context']."</option>\n";
|
||||
echo " <option value='username'>".$text['option-username']."</option>\n";
|
||||
echo " <option value='rdnis'>".$text['option-rdnis']."</option>\n";
|
||||
echo " <option value='destination_number'>".$text['option-destination_number']."</option>\n";
|
||||
echo " <option value='public'>".$text['option-public']."</option>\n";
|
||||
echo " <option value='caller_id_name'>".$text['option-caller_id_name']."</option>\n";
|
||||
echo " <option value='caller_id_number'>".$text['option-caller_id_number']."</option>\n";
|
||||
echo " <option value='ani'>".$text['option-ani']."</option>\n";
|
||||
echo " <option value='ani2'>".$text['option-ani2']."</option>\n";
|
||||
echo " <option value='uuid'>".$text['option-uuid']."</option>\n";
|
||||
echo " <option value='source'>".$text['option-source']."</option>\n";
|
||||
echo " <option value='chan_name'>".$text['option-chan_name']."</option>\n";
|
||||
echo " <option value='network_addr'>".$text['option-network_addr']."</option>\n";
|
||||
echo " </optgroup>\n";
|
||||
echo " <optgroup label='Time'>\n";
|
||||
echo " <option value='hour'>hour</option>\n";
|
||||
echo " <option value='minute'>minute</option>\n";
|
||||
echo " <option value='minute-of-day'>minute of day</option>\n";
|
||||
echo " <option value='mday'>day of month</option>\n";
|
||||
echo " <option value='mweek'>week of month</option>\n";
|
||||
echo " <option value='mon'>month</option>\n";
|
||||
echo " <option value='yday'>day of year</option>\n";
|
||||
echo " <option value='year'>year</option>\n";
|
||||
echo " <option value='wday'>day of week</option>\n";
|
||||
echo " <option value='week'>week</option>\n";
|
||||
echo " <option value='hour'>".$text['option-hour']."</option>\n";
|
||||
echo " <option value='minute'>".$text['option-minute']."</option>\n";
|
||||
echo " <option value='minute-of-day'>".$text['option-minute_of_day']."</option>\n";
|
||||
echo " <option value='mday'>".$text['option-day_of_month']."</option>\n";
|
||||
echo " <option value='mweek'>".$text['option-week_of_month']."</option>\n";
|
||||
echo " <option value='mon'>".$text['option-month']."</option>\n";
|
||||
echo " <option value='yday'>".$text['option-day_of_year']."</option>\n";
|
||||
echo " <option value='year'>".$text['option-year']."</option>\n";
|
||||
echo " <option value='wday'>".$text['option-day_of_week']."</option>\n";
|
||||
echo " <option value='week'>".$text['option-week']."</option>\n";
|
||||
echo " </optgroup>\n";
|
||||
echo " </select>\n";
|
||||
echo " <input type='button' id='btn_select_to_input_condition_field_2' class='btn' name='' alt='back' onclick='changeToInput_condition_field_2(document.getElementById(\"condition_field_2\"));this.style.visibility = \"hidden\";' value='<'>\n";
|
||||
echo " <input type='button' id='btn_select_to_input_condition_field_2' class='btn' name='' alt='".$text['button-back']."' onclick='changeToInput_condition_field_2(document.getElementById(\"condition_field_2\"));this.style.visibility = \"hidden\";' value='<'>\n";
|
||||
echo " <br />\n";
|
||||
echo " </td>\n";
|
||||
echo " <td style='width: 73px;' align='left'>\n";
|
||||
echo " Expression:\n";
|
||||
echo " ".$text['label-expression'].":\n";
|
||||
echo " </td>\n";
|
||||
echo " <td>\n";
|
||||
echo " <input class='formfld' type='text' name='condition_expression_2' maxlength='255' style='width:100%' value=\"$condition_expression_2\">\n";
|
||||
@@ -539,60 +541,13 @@ echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
|
||||
echo " Action 1:\n";
|
||||
echo " ".$text['label-action_1'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
|
||||
//switch_select_destination(select_type, select_label, select_name, select_value, select_style, action);
|
||||
switch_select_destination("dialplan", "", "action_1", $action_1, "width: 60%;", "");
|
||||
|
||||
/*
|
||||
echo " <table style='width: 60%;' border='0' >\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td style='width: 62px;'>Application: </td>\n";
|
||||
echo " <td style='width: 35%;'>\n";
|
||||
echo " <select class='formfld' style='width:100%' id='action_application_1' name='action_application_1' onchange='type_onchange(\"action_application_1\");'>\n";
|
||||
echo " <option value=''></option>\n";
|
||||
if (strlen($action_application_1) > 0) {
|
||||
echo " <option value='$action_application_1' selected>$action_application_1</option>\n";
|
||||
}
|
||||
echo " <option value='answer'>answer</option>\n";
|
||||
echo " <option value='bridge'>bridge</option>\n";
|
||||
echo " <option value='cond'>cond</option>\n";
|
||||
echo " <option value='db'>db</option>\n";
|
||||
echo " <option value='global_set'>global_set</option>\n";
|
||||
echo " <option value='group'>group</option>\n";
|
||||
echo " <option value='expr'>expr</option>\n";
|
||||
echo " <option value='export'>export</option>\n";
|
||||
echo " <option value='hangup'>hangup</option>\n";
|
||||
echo " <option value='info'>info</option>\n";
|
||||
echo " <option value='javascript'>javascript</option>\n";
|
||||
echo " <option value='read'>read</option>\n";
|
||||
echo " <option value='reject'>reject</option>\n";
|
||||
echo " <option value='playback'>playback</option>\n";
|
||||
echo " <option value='reject'>reject</option>\n";
|
||||
echo " <option value='respond'>respond</option>\n";
|
||||
echo " <option value='ring_ready'>ring_ready</option>\n";
|
||||
echo " <option value='set'>set</option>\n";
|
||||
echo " <option value='set_user'>set_user</option>\n";
|
||||
echo " <option value='sleep'>sleep</option>\n";
|
||||
echo " <option value='sofia_contact'>sofia_contact</option>\n";
|
||||
echo " <option value='transfer'>transfer</option>\n";
|
||||
echo " <option value='voicemail'>voicemail</option>\n";
|
||||
echo " <option value='conference'>conference</option>\n";
|
||||
echo " <option value='conference_set_auto_outcall'>conference_set_auto_outcall</option>\n";
|
||||
echo " </select><br />\n";
|
||||
echo " </td>\n";
|
||||
echo " <td style='width: 73px;'>\n";
|
||||
echo " Data: \n";
|
||||
echo " </td>\n";
|
||||
echo " <td>\n";
|
||||
echo " <input class='formfld' style='width: 100%;' type='text' name='action_data_1' maxlength='255' value=\"$action_data_1\">\n";
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
echo " </table>\n";
|
||||
echo " <div id='desc_action_data_1'></div>\n";
|
||||
*/
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
@@ -601,66 +556,19 @@ echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
||||
echo " Action 2:\n";
|
||||
echo " ".$text['label-action_2'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
|
||||
//switch_select_destination(select_type, select_label, select_name, select_value, select_style, action);
|
||||
switch_select_destination("dialplan", "", "action_2", $action_2, "width: 60%;", "");
|
||||
|
||||
/*
|
||||
echo " <table style='width: 60%;' border='0' >\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td style='width: 62px;'>Application: </td>\n";
|
||||
echo " <td style='width: 35%;'>\n";
|
||||
echo " <select class='formfld' style='width:100%' id='action_application_2' name='action_application_2' onchange='type_onchange(\"action_application_2\");'>\n";
|
||||
echo " <option value=''></option>\n";
|
||||
if (strlen($action_application_2) > 0) {
|
||||
echo " <option value='$action_application_2' selected>$action_application_2</option>\n";
|
||||
}
|
||||
echo " <option value='answer'>answer</option>\n";
|
||||
echo " <option value='bridge'>bridge</option>\n";
|
||||
echo " <option value='cond'>cond</option>\n";
|
||||
echo " <option value='db'>db</option>\n";
|
||||
echo " <option value='global_set'>global_set</option>\n";
|
||||
echo " <option value='group'>group</option>\n";
|
||||
echo " <option value='expr'>expr</option>\n";
|
||||
echo " <option value='export'>export</option>\n";
|
||||
echo " <option value='hangup'>hangup</option>\n";
|
||||
echo " <option value='info'>info</option>\n";
|
||||
echo " <option value='javascript'>javascript</option>\n";
|
||||
echo " <option value='read'>read</option>\n";
|
||||
echo " <option value='reject'>reject</option>\n";
|
||||
echo " <option value='playback'>playback</option>\n";
|
||||
echo " <option value='reject'>reject</option>\n";
|
||||
echo " <option value='respond'>respond</option>\n";
|
||||
echo " <option value='ring_ready'>ring_ready</option>\n";
|
||||
echo " <option value='set'>set</option>\n";
|
||||
echo " <option value='set_user'>set_user</option>\n";
|
||||
echo " <option value='sleep'>sleep</option>\n";
|
||||
echo " <option value='sofia_contact'>sofia_contact</option>\n";
|
||||
echo " <option value='transfer'>transfer</option>\n";
|
||||
echo " <option value='voicemail'>voicemail</option>\n";
|
||||
echo " <option value='conference'>conference</option>\n";
|
||||
echo " <option value='conference_set_auto_outcall'>conference_set_auto_outcall</option>\n";
|
||||
echo " </select><br />\n";
|
||||
echo " </td>\n";
|
||||
echo " <td style='width: 73px;'>\n";
|
||||
echo " Data: \n";
|
||||
echo " </td>\n";
|
||||
echo " <td>\n";
|
||||
echo " <input class='formfld' style='width: 100%;' type='text' name='action_data_2' maxlength='255' value=\"$action_data_2\">\n";
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
echo " </table>\n";
|
||||
echo " <div id='desc_action_data_2'></div>\n";
|
||||
*/
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
|
||||
echo " Order:\n";
|
||||
echo " ".$text['label-order'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select name='dialplan_order' class='formfld' style='width: 60%;'>\n";
|
||||
@@ -683,22 +591,21 @@ echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
|
||||
echo " Enabled:\n";
|
||||
echo " ".$text['label-enabled'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select class='formfld' name='dialplan_enabled' style='width: 60%;'>\n";
|
||||
//echo " <option value=''></option>\n";
|
||||
if ($dialplan_enabled == "true") {
|
||||
echo " <option value='true' SELECTED >true</option>\n";
|
||||
if ($dialplan_enabled == "true") {
|
||||
echo " <option value='true' SELECTED >".$text['option-true']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='true'>true</option>\n";
|
||||
echo " <option value='true'>".$text['option-true']."</option>\n";
|
||||
}
|
||||
if ($dialplan_enabled == "false") {
|
||||
echo " <option value='false' SELECTED >false</option>\n";
|
||||
if ($dialplan_enabled == "false") {
|
||||
echo " <option value='false' SELECTED >".$text['option-false']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='false'>false</option>\n";
|
||||
echo " <option value='false'>".$text['option-false']."</option>\n";
|
||||
}
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
@@ -708,10 +615,9 @@ echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
||||
echo " Description:\n";
|
||||
echo " ".$text['label-description'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td colspan='4' class='vtable' align='left'>\n";
|
||||
//echo " <textarea class='formfld' name='dialplan_description' rows='4'>$dialplan_description</textarea>\n";
|
||||
echo " <input class='formfld' style='width: 60%;' type='text' name='dialplan_description' maxlength='255' value=\"$dialplan_description\">\n";
|
||||
echo "<br />\n";
|
||||
echo "\n";
|
||||
@@ -723,7 +629,7 @@ echo " <td colspan='5' align='right'>\n";
|
||||
if ($action == "update") {
|
||||
echo " <input type='hidden' name='dialplan_uuid' value='$dialplan_uuid'>\n";
|
||||
}
|
||||
echo " <input type='submit' name='submit' class='btn' value='Save'>\n";
|
||||
echo " <input type='submit' name='submit' class='btn' value='".$text['button-save']."'>\n";
|
||||
echo " </td>\n";
|
||||
echo "</tr>";
|
||||
|
||||
|
||||
@@ -33,7 +33,15 @@ else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
//add multi-lingual support
|
||||
require_once "app_languages.php";
|
||||
foreach($text as $key => $value) {
|
||||
$text[$key] = $value[$_SESSION['domain']['language']['code']];
|
||||
}
|
||||
|
||||
require_once "includes/header.php";
|
||||
$page["title"] = $text['title-default_dialplan'];
|
||||
|
||||
if ($_GET['a'] == "default" && permission_exists('dialplan_advanced_edit')) {
|
||||
//create the dialplan/default.xml for single tenant or dialplan/domain.xml
|
||||
@@ -55,7 +63,7 @@ if ($_POST['a'] == "save" && permission_exists('dialplan_advanced_edit')) {
|
||||
}
|
||||
fwrite($fd, $v_content);
|
||||
fclose($fd);
|
||||
$savemsg = "Saved";
|
||||
$savemsg = $text['message-update'];
|
||||
}
|
||||
|
||||
if (file_exists($_SESSION['switch']['dialplan']['dir']."/".$_SESSION['domain_name'].".xml")) {
|
||||
@@ -81,7 +89,7 @@ function sf() { document.forms[0].savetopath.focus(); }
|
||||
,start_highlight: true
|
||||
,allow_toggle: false
|
||||
,language: "en"
|
||||
,syntax: "html"
|
||||
,syntax: "html"
|
||||
,toolbar: "search, go_to_line,|, fullscreen, |, undo, redo, |, select_font, |, syntax_selection, |, change_smooth_selection, highlight, reset_highlight, |, help"
|
||||
,syntax_selection_allow: "css,html,js,php,xml,c,cpp,sql"
|
||||
,show_line_colors: true
|
||||
@@ -92,17 +100,20 @@ function sf() { document.forms[0].savetopath.focus(); }
|
||||
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td class="" >
|
||||
<br>
|
||||
<form action="dialplan_advanced.php" method="post" name="iform" id="iform">
|
||||
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td align='left' width='100%'><span class="vexpl"><span class="red"><strong>Default Dialplan<br>
|
||||
<td align='left' width='100%'><span class="vexpl"><span class="red"><strong><?=$text['header-default_dialplan']?><br><br>
|
||||
</strong></span>
|
||||
The default dialplan is used to setup call destinations based on conditions and context.
|
||||
You can use the dialplan to send calls to gateways, auto attendants, external numbers, to scripts, or any destination.
|
||||
<?=$text['description-default_dialplan']?>
|
||||
<br />
|
||||
<br />
|
||||
</td>
|
||||
<td width='10%' align='right' valign='top'><input type='submit' class='btn' value='save' /></td>
|
||||
<td width='10%' align='right' valign='top'>
|
||||
<input type='button' class='btn' name='' alt='<?=$text['button-back']?>' onclick="window.location='dialplans.php'" value='<?=$text['button-back']?>'>
|
||||
<input type='submit' class='btn' value='<?=$text['button-save']?>' />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2' class='' valign='top' align='left' nowrap>
|
||||
@@ -124,7 +135,7 @@ function sf() { document.forms[0].savetopath.focus(); }
|
||||
<input type='hidden' name='a' value='save' />
|
||||
<?php
|
||||
if (permission_exists('dialplan_advanced_edit')) {
|
||||
echo "<input type='button' class='btn' value='Restore Default' onclick=\"document.location.href='dialplan_advanced.php?a=default&f=default.xml';\" />";
|
||||
echo "<input type='button' class='btn' value='".$text['button-restore']."' onclick=\"document.location.href='dialplan_advanced.php?a=default&f=default.xml';\" />";
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
|
||||
@@ -27,9 +27,9 @@ include "root.php";
|
||||
require_once "includes/require.php";
|
||||
require_once "includes/checkauth.php";
|
||||
require_once "includes/paging.php";
|
||||
if (permission_exists('dialplan_add')
|
||||
|| permission_exists('inbound_route_add')
|
||||
|| permission_exists('outbound_route_add')
|
||||
if (permission_exists('dialplan_add')
|
||||
|| permission_exists('inbound_route_add')
|
||||
|| permission_exists('outbound_route_add')
|
||||
|| permission_exists('time_conditions_add')) {
|
||||
//access granted
|
||||
}
|
||||
@@ -38,12 +38,18 @@ else {
|
||||
exit;
|
||||
}
|
||||
|
||||
//add multi-lingual support
|
||||
require_once "app_languages.php";
|
||||
foreach($text as $key => $value) {
|
||||
$text[$key] = $value[$_SESSION['domain']['language']['code']];
|
||||
}
|
||||
|
||||
//set the http get/post variable(s) to a php variable
|
||||
if (isset($_REQUEST["id"])) {
|
||||
$dialplan_uuid = check_str($_REQUEST["id"]);
|
||||
}
|
||||
|
||||
//get the dialplan data
|
||||
//get the dialplan data
|
||||
$dialplan_uuid = $_GET["id"];
|
||||
$sql = "select * from v_dialplans ";
|
||||
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||
@@ -163,7 +169,7 @@ else {
|
||||
break;
|
||||
}
|
||||
echo "<div align='center'>\n";
|
||||
echo "Copy Complete\n";
|
||||
echo $text['message-copy']."\n";
|
||||
echo "</div>\n";
|
||||
require_once "includes/footer.php";
|
||||
return;
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
include "root.php";
|
||||
require_once "includes/require.php";
|
||||
require_once "includes/checkauth.php";
|
||||
if (permission_exists('dialplan_delete')
|
||||
if (permission_exists('dialplan_delete')
|
||||
|| permission_exists('inbound_route_delete')
|
||||
|| permission_exists('outbound_route_delete')
|
||||
|| permission_exists('time_conditions_delete')) {
|
||||
@@ -37,6 +37,12 @@ else {
|
||||
exit;
|
||||
}
|
||||
|
||||
//add multi-lingual support
|
||||
require_once "app_languages.php";
|
||||
foreach($text as $key => $value) {
|
||||
$text[$key] = $value[$_SESSION['domain']['language']['code']];
|
||||
}
|
||||
|
||||
if (count($_GET)>0) {
|
||||
$dialplan_uuid = check_str($_GET["id"]);
|
||||
}
|
||||
@@ -107,7 +113,7 @@ if (strlen($dialplan_uuid)>0) {
|
||||
break;
|
||||
}
|
||||
echo "<div align='center'>\n";
|
||||
echo "Delete Complete\n";
|
||||
echo $text['message-delete']."\n";
|
||||
echo "</div>\n";
|
||||
require_once "includes/footer.php";
|
||||
return;
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
include "root.php";
|
||||
require_once "includes/require.php";
|
||||
require_once "includes/checkauth.php";
|
||||
if (permission_exists('dialplan_delete')
|
||||
|| permission_exists('inbound_route_delete')
|
||||
if (permission_exists('dialplan_delete')
|
||||
|| permission_exists('inbound_route_delete')
|
||||
|| permission_exists('outbound_route_delete')
|
||||
|| permission_exists('time_conditions_delete')) {
|
||||
//access granted
|
||||
@@ -37,6 +37,12 @@ else {
|
||||
exit;
|
||||
}
|
||||
|
||||
//add multi-lingual support
|
||||
require_once "app_languages.php";
|
||||
foreach($text as $key => $value) {
|
||||
$text[$key] = $value[$_SESSION['domain']['language']['code']];
|
||||
}
|
||||
|
||||
if (count($_GET)>0) {
|
||||
$id = $_GET["id"];
|
||||
$dialplan_uuid = check_str($_REQUEST["id2"]);
|
||||
@@ -68,7 +74,7 @@ if (strlen($id)>0) {
|
||||
require_once "includes/header.php";
|
||||
echo "<meta http-equiv=\"refresh\" content=\"2;url=dialplan_edit.php?id=".$dialplan_uuid."\">\n";
|
||||
echo "<div align='center'>\n";
|
||||
echo "Delete Complete\n";
|
||||
echo $text['message-delete']."\n";
|
||||
echo "</div>\n";
|
||||
require_once "includes/footer.php";
|
||||
|
||||
|
||||
@@ -26,13 +26,13 @@
|
||||
include "root.php";
|
||||
require_once "includes/require.php";
|
||||
require_once "includes/checkauth.php";
|
||||
if (permission_exists('dialplan_add')
|
||||
|| permission_exists('dialplan_edit')
|
||||
|| permission_exists('inbound_route_add')
|
||||
|| permission_exists('inbound_route_edit')
|
||||
|| permission_exists('outbound_route_add')
|
||||
|| permission_exists('outbound_route_edit')
|
||||
|| permission_exists('time_conditions_add')
|
||||
if (permission_exists('dialplan_add')
|
||||
|| permission_exists('dialplan_edit')
|
||||
|| permission_exists('inbound_route_add')
|
||||
|| permission_exists('inbound_route_edit')
|
||||
|| permission_exists('outbound_route_add')
|
||||
|| permission_exists('outbound_route_edit')
|
||||
|| permission_exists('time_conditions_add')
|
||||
|| permission_exists('time_conditions_edit')) {
|
||||
//access granted
|
||||
}
|
||||
@@ -41,6 +41,12 @@ else {
|
||||
exit;
|
||||
}
|
||||
|
||||
//add multi-lingual support
|
||||
require_once "app_languages.php";
|
||||
foreach($text as $key => $value) {
|
||||
$text[$key] = $value[$_SESSION['domain']['language']['code']];
|
||||
}
|
||||
|
||||
//set the action as an add or update
|
||||
if (isset($_REQUEST["id"])) {
|
||||
$action = "update";
|
||||
@@ -76,10 +82,10 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
}
|
||||
|
||||
//check for all required data
|
||||
if (strlen($dialplan_detail_tag) == 0) { $msg .= "Please provide: Tag<br>\n"; }
|
||||
if (strlen($dialplan_detail_order) == 0) { $msg .= "Please provide: Order<br>\n"; }
|
||||
//if (strlen($dialplan_detail_type) == 0) { $msg .= "Please provide: Type<br>\n"; }
|
||||
//if (strlen($dialplan_detail_data) == 0) { $msg .= "Please provide: Data<br>\n"; }
|
||||
if (strlen($dialplan_detail_tag) == 0) { $msg .= $text['message-required'].$text['label-tag']."<br>\n"; }
|
||||
if (strlen($dialplan_detail_order) == 0) { $msg .= $text['message-required'].$text['label-order']."<br>\n"; }
|
||||
//if (strlen($dialplan_detail_type) == 0) { $msg .= $text['message-required'].$text['label-type']."<br>\n"; }
|
||||
//if (strlen($dialplan_detail_data) == 0) { $msg .= $text['message-required'].$text['label-data']."<br>\n"; }
|
||||
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
require_once "includes/header.php";
|
||||
require_once "includes/persistformvar.php";
|
||||
@@ -144,7 +150,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
require_once "includes/header.php";
|
||||
echo "<meta http-equiv=\"refresh\" content=\"2;url=dialplan_edit.php?id=".$dialplan_uuid."\">\n";
|
||||
echo "<div align='center'>\n";
|
||||
echo "Add Complete\n";
|
||||
echo $text['message-add']."\n";
|
||||
echo "</div>\n";
|
||||
require_once "includes/footer.php";
|
||||
return;
|
||||
@@ -183,12 +189,12 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
require_once "includes/header.php";
|
||||
echo "<meta http-equiv=\"refresh\" content=\"2;url=dialplan_edit.php?id=".$dialplan_uuid."\">\n";
|
||||
echo "<div align='center'>\n";
|
||||
echo "Update Complete\n";
|
||||
echo $text['message-update']."\n";
|
||||
echo "</div>\n";
|
||||
require_once "includes/footer.php";
|
||||
return;
|
||||
} //if ($action == "update")
|
||||
} //if ($_POST["persistformvar"] != "true") {
|
||||
} //if ($_POST["persistformvar"] != "true") {
|
||||
} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
|
||||
|
||||
//pre-populate the form
|
||||
@@ -216,6 +222,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
|
||||
//show the header
|
||||
require_once "includes/header.php";
|
||||
$page["title"] = $text['title-dialplan_detail'];
|
||||
|
||||
//show the content
|
||||
echo "<div align='center'>";
|
||||
@@ -228,8 +235,8 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
echo "<div align='center'>\n";
|
||||
echo "<table width='100%' border='0' cellpadding='6' cellspacing='0'>\n";
|
||||
echo "<tr>\n";
|
||||
echo "<td align='left' width='30%' nowrap><b>Dialplan Detail</b></td>\n";
|
||||
echo "<td width='70%' align='right'><input type='button' class='btn' name='' alt='back' onclick=\"window.location='dialplan_edit.php?id=".$dialplan_uuid."'\" value='Back'></td>\n";
|
||||
echo "<td align='left' width='30%' nowrap><b>".$text['header-dial_plan_detail']."</b></td>\n";
|
||||
echo "<td width='70%' align='right'><input type='button' class='btn' name='' alt='".$text['button-back']."' onclick=\"window.location='dialplan_edit.php?id=".$dialplan_uuid."'\" value='".$text['button-back']."'></td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
?>
|
||||
@@ -237,28 +244,28 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
function public_include_details_tag_onchange() {
|
||||
var dialplan_detail_tag = document.getElementById("form_tag").value;
|
||||
if (dialplan_detail_tag == "condition") {
|
||||
document.getElementById("label_field_type").innerHTML = "Field";
|
||||
document.getElementById("label_field_data").innerHTML = "Expression";
|
||||
document.getElementById("label_field_type").innerHTML = "<?=$text['label-field']?>";
|
||||
document.getElementById("label_field_data").innerHTML = "<?=$text['label-expression']?>";
|
||||
}
|
||||
else if (dialplan_detail_tag == "regex") {
|
||||
document.getElementById("label_field_type").innerHTML = "Field";
|
||||
document.getElementById("label_field_data").innerHTML = "Expression";
|
||||
document.getElementById("label_field_type").innerHTML = "<?=$text['label-field']?>";
|
||||
document.getElementById("label_field_data").innerHTML = "<?=$text['label-expression']?>";
|
||||
}
|
||||
else if (dialplan_detail_tag == "action") {
|
||||
document.getElementById("label_field_type").innerHTML = "Application";
|
||||
document.getElementById("label_field_data").innerHTML = "Data";
|
||||
document.getElementById("label_field_type").innerHTML = "<?=$text['label-application']?>";
|
||||
document.getElementById("label_field_data").innerHTML = "<?=$text['label-data']?>";
|
||||
}
|
||||
else if (dialplan_detail_tag == "anti-action") {
|
||||
document.getElementById("label_field_type").innerHTML = "Application";
|
||||
document.getElementById("label_field_data").innerHTML = "Data";
|
||||
document.getElementById("label_field_type").innerHTML = "<?=$text['label-application']?>";
|
||||
document.getElementById("label_field_data").innerHTML = "<?=$text['label-data']?>";
|
||||
}
|
||||
else if (dialplan_detail_tag == "param") {
|
||||
document.getElementById("label_field_type").innerHTML = "Name";
|
||||
document.getElementById("label_field_data").innerHTML = "Value";
|
||||
document.getElementById("label_field_type").innerHTML = "<?=$text['label-name']?>";
|
||||
document.getElementById("label_field_data").innerHTML = "<?=$text['label-value']?>";
|
||||
}
|
||||
if (dialplan_detail_tag == "") {
|
||||
document.getElementById("label_field_type").innerHTML = "Type";
|
||||
document.getElementById("label_field_data").innerHTML = "Data";
|
||||
document.getElementById("label_field_type").innerHTML = "<?=$text['label-type']?>";
|
||||
document.getElementById("label_field_data").innerHTML = "<?=$text['label-data']?>";
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -266,53 +273,47 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
|
||||
echo " Tag:\n";
|
||||
echo " ".$text['label-tag'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select name='dialplan_detail_tag' class='formfld' id='form_tag' onchange='public_include_details_tag_onchange();'>\n";
|
||||
echo " <option></option>\n";
|
||||
switch ($dialplan_detail_tag) {
|
||||
case "condition":
|
||||
echo " <option selected='yes'>condition</option>\n";
|
||||
echo " <option>action</option>\n";
|
||||
echo " <option>anti-action</option>\n";
|
||||
echo " <option>regex</option>\n";
|
||||
//echo " <option>param</option>\n";
|
||||
echo " <option value='condition' selected='yes'>".$text['option-condition']."</option>\n";
|
||||
echo " <option value='action'>".$text['option-action']."</option>\n";
|
||||
echo " <option value='anti-action'>".$text['option-anti-action']."</option>\n";
|
||||
echo " <option value='regex'>".$text['option-regex']."</option>\n";
|
||||
break;
|
||||
case "regex":
|
||||
echo " <option>condition</option>\n";
|
||||
echo " <option>action</option>\n";
|
||||
echo " <option>anti-action</option>\n";
|
||||
echo " <option selected='yes'>regex</option>\n";
|
||||
//echo " <option>param</option>\n";
|
||||
echo " <option value='condition'>".$text['option-condition']."</option>\n";
|
||||
echo " <option value='action'>".$text['option-action']."</option>\n";
|
||||
echo " <option value='anti-action'>".$text['option-anti-action']."</option>\n";
|
||||
echo " <option value='regex' selected='yes'>".$text['option-regex']."</option>\n";
|
||||
break;
|
||||
case "action":
|
||||
echo " <option>condition</option>\n";
|
||||
echo " <option selected='yes'>action</option>\n";
|
||||
echo " <option>anti-action</option>\n";
|
||||
echo " <option>regex</option>\n";
|
||||
//echo " <option>param</option>\n";
|
||||
echo " <option value='condition'>".$text['option-condition']."</option>\n";
|
||||
echo " <option value='action' selected='yes'>".$text['option-action']."</option>\n";
|
||||
echo " <option value='anti-action'>".$text['option-anti-action']."</option>\n";
|
||||
echo " <option value='regex'>".$text['option-regex']."</option>\n";
|
||||
break;
|
||||
case "anti-action":
|
||||
echo " <option>condition</option>\n";
|
||||
echo " <option>action</option>\n";
|
||||
echo " <option selected='yes'>anti-action</option>\n";
|
||||
echo " <option>regex</option>\n";
|
||||
//echo " <option>param</option>\n";
|
||||
echo " <option value='condition'>".$text['option-condition']."</option>\n";
|
||||
echo " <option value='action'>".$text['option-action']."</option>\n";
|
||||
echo " <option value='anti-action' selected='yes'>".$text['option-anti-action']."</option>\n";
|
||||
echo " <option value='regex'>".$text['option-regex']."</option>\n";
|
||||
break;
|
||||
case "param":
|
||||
echo " <option>condition</option>\n";
|
||||
echo " <option>action</option>\n";
|
||||
echo " <option>anti-action</option>\n";
|
||||
echo " <option>regex</option>\n";
|
||||
//echo " <option selected='yes'>param</option>\n";
|
||||
echo " <option value='condition'>".$text['option-condition']."</option>\n";
|
||||
echo " <option value='action'>".$text['option-action']."</option>\n";
|
||||
echo " <option value='anti-action'>".$text['option-anti-action']."</option>\n";
|
||||
echo " <option value='regex'>".$text['option-regex']."</option>\n";
|
||||
break;
|
||||
default:
|
||||
echo " <option>condition</option>\n";
|
||||
echo " <option>action</option>\n";
|
||||
echo " <option>anti-action</option>\n";
|
||||
echo " <option>regex</option>\n";
|
||||
//echo " <option>param</option>\n";
|
||||
echo " <option value='condition'>".$text['option-condition']."</option>\n";
|
||||
echo " <option value='action'>".$text['option-action']."</option>\n";
|
||||
echo " <option value='anti-action'>".$text['option-anti-action']."</option>\n";
|
||||
echo " <option value='regex'>".$text['option-regex']."</option>\n";
|
||||
}
|
||||
echo " </select>\n";
|
||||
|
||||
@@ -335,7 +336,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
|
||||
echo " Order:\n";
|
||||
echo " ".$text['label-order'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select name='dialplan_detail_order' class='formfld'>\n";
|
||||
@@ -395,7 +396,7 @@ function Replaceivr_menu_option_param(obj){
|
||||
<?php
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
||||
echo " Type:\n";
|
||||
echo " ".$text['label-type'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo "<select name='dialplan_detail_type' id='dialplan_detail_type' class='formfld' onchange='changeToInput_dialplan_detail_type(this);'>\n";
|
||||
@@ -408,20 +409,20 @@ function Replaceivr_menu_option_param(obj){
|
||||
echo " <option value=''></option>\n";
|
||||
}
|
||||
if (strlen($dialplan_detail_tag) == 0 || $dialplan_detail_tag == "condition" || $dialplan_detail_tag == "regex") {
|
||||
echo " <optgroup label='conditions or regex'>\n";
|
||||
echo " <option value='context'>context</option>\n";
|
||||
echo " <option value='username'>username</option>\n";
|
||||
echo " <option value='rdnis'>rdnis</option>\n";
|
||||
echo " <option value='destination_number'>destination_number</option>\n";
|
||||
echo " <option value='dialplan'>dialplan</option>\n";
|
||||
echo " <option value='caller_id_name'>caller_id_name</option>\n";
|
||||
echo " <option value='caller_id_number'>caller_id_number</option>\n";
|
||||
echo " <option value='ani'>ani</option>\n";
|
||||
echo " <option value='ani2'>ani2</option>\n";
|
||||
echo " <option value='uuid'>uuid</option>\n";
|
||||
echo " <option value='source'>source</option>\n";
|
||||
echo " <option value='chan_name'>chan_name</option>\n";
|
||||
echo " <option value='network_addr'>network_addr</option>\n";
|
||||
echo " <optgroup label='".$text['optgroup-conditions_or_regular_expressions']."'>\n";
|
||||
echo " <option value='context'>".$text['option-context']."</option>\n";
|
||||
echo " <option value='username'>".$text['option-username']."</option>\n";
|
||||
echo " <option value='rdnis'>".$text['option-rdnis']."</option>\n";
|
||||
echo " <option value='destination_number'>".$text['option-destination_number']."</option>\n";
|
||||
echo " <option value='dialplan'>".$text['option-dialplan']."</option>\n";
|
||||
echo " <option value='caller_id_name'>".$text['option-caller_id_name']."</option>\n";
|
||||
echo " <option value='caller_id_number'>".$text['option-caller_id_number']."</option>\n";
|
||||
echo " <option value='ani'>".$text['option-ani']."</option>\n";
|
||||
echo " <option value='ani2'>".$text['option-ani2']."</option>\n";
|
||||
echo " <option value='uuid'>".$text['option-uuid']."</option>\n";
|
||||
echo " <option value='source'>".$text['option-source']."</option>\n";
|
||||
echo " <option value='chan_name'>".$text['option-chan_name']."</option>\n";
|
||||
echo " <option value='network_addr'>".$text['option-network_addr']."</option>\n";
|
||||
echo " <option value='\${number_alias}'>\${number_alias}</option>\n";
|
||||
echo " <option value='\${sip_from_uri}'>\${sip_from_uri}</option>\n";
|
||||
echo " <option value='\${sip_from_user}'>\${sip_from_user}</option>\n";
|
||||
@@ -435,7 +436,7 @@ function Replaceivr_menu_option_param(obj){
|
||||
echo "</optgroup>\n";
|
||||
}
|
||||
if (strlen($dialplan_detail_tag) == 0 || $dialplan_detail_tag == "action" || $dialplan_detail_tag == "anti-action") {
|
||||
echo "<optgroup label='applications'>\n";
|
||||
echo "<optgroup label='".$text['optgroup-applications']."'>\n";
|
||||
//get the list of applications
|
||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||
$result = event_socket_request($fp, 'api show application');
|
||||
@@ -451,13 +452,13 @@ function Replaceivr_menu_option_param(obj){
|
||||
}
|
||||
echo "</optgroup>\n";
|
||||
}
|
||||
echo "<input type='button' id='btn_select_to_input_dialplan_detail_type' class='btn' name='' alt='back' onclick='changeToInput_dialplan_detail_type(document.getElementById(\"dialplan_detail_type\"));this.style.visibility = \"hidden\";' value='<'>\n";
|
||||
echo "<input type='button' id='btn_select_to_input_dialplan_detail_type' class='btn' name='' alt='".$text['button-back']."' onclick='changeToInput_dialplan_detail_type(document.getElementById(\"dialplan_detail_type\"));this.style.visibility = \"hidden\";' value='<'>\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
||||
echo " Data:\n";
|
||||
echo " ".$text['label-data'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='dialplan_detail_data' value=\"".htmlspecialchars($dialplan_detail_data)."\">\n";
|
||||
@@ -468,7 +469,7 @@ function Replaceivr_menu_option_param(obj){
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
||||
echo " Group:\n";
|
||||
echo " ".$text['label-group'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select name='dialplan_detail_group' class='formfld'>\n";
|
||||
@@ -491,34 +492,34 @@ function Replaceivr_menu_option_param(obj){
|
||||
if ($dialplan_detail_tag == "condition") {
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
||||
echo " Break:\n";
|
||||
echo " ".$text['label-break'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select name='dialplan_detail_break' class='formfld'>\n";
|
||||
echo " <option></option>\n";
|
||||
if ($dialplan_detail_break == "on-true") {
|
||||
echo " <option selected='selected' value='on-true'>on-true</option>\n";
|
||||
echo " <option selected='selected' value='on-true'>".$text['option-on_true']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='on-true'>on-true</option>\n";
|
||||
echo " <option value='on-true'>".$text['option-on_true']."</option>\n";
|
||||
}
|
||||
if ($dialplan_detail_break == "on-false") {
|
||||
echo " <option selected='selected' value='on-false'>on-false</option>\n";
|
||||
echo " <option selected='selected' value='on-false'>".$text['option-on_false']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='on-false'>on-false</option>\n";
|
||||
echo " <option value='on-false'>".$text['option-on_false']."</option>\n";
|
||||
}
|
||||
if ($dialplan_detail_break == "always") {
|
||||
echo " <option selected='selected' value='always'>always</option>\n";
|
||||
echo " <option selected='selected' value='always'>".$text['option-always']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='always'>always</option>\n";
|
||||
echo " <option value='always'>".$text['option-always']."</option>\n";
|
||||
}
|
||||
if ($dialplan_detail_break == "never") {
|
||||
echo " <option selected='selected' value='never'>never</option>\n";
|
||||
echo " <option selected='selected' value='never'>".$text['option-never']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='never'>never</option>\n";
|
||||
echo " <option value='never'>".$text['option-never']."</option>\n";
|
||||
}
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
@@ -530,22 +531,22 @@ function Replaceivr_menu_option_param(obj){
|
||||
if ($dialplan_detail_tag == "action") {
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
||||
echo " Inline:\n";
|
||||
echo " ".$text['label-inline'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select name='dialplan_detail_inline' class='formfld'>\n";
|
||||
echo " <option></option>\n";
|
||||
if ($dialplan_detail_inline == "true") {
|
||||
echo " <option selected='selected' value='true'>true</option>\n";
|
||||
echo " <option selected='selected' value='true'>".$text['option-true']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='true'>true</option>\n";
|
||||
echo " <option value='true'>".$text['option-true']."</option>\n";
|
||||
}
|
||||
if ($dialplan_detail_inline == "false") {
|
||||
echo " <option selected='selected' value='false'>false</option>\n";
|
||||
echo " <option selected='selected' value='false'>".$text['option-false']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='false'>false</option>\n";
|
||||
echo " <option value='false'>".$text['option-false']."</option>\n";
|
||||
}
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
@@ -561,7 +562,7 @@ function Replaceivr_menu_option_param(obj){
|
||||
if ($action == "update") {
|
||||
echo " <input type='hidden' name='dialplan_detail_uuid' value='$dialplan_detail_uuid'>\n";
|
||||
}
|
||||
echo " <input type='submit' name='submit' class='btn' value='Save'>\n";
|
||||
echo " <input type='submit' name='submit' class='btn' value='".$text['button-save']."'>\n";
|
||||
echo " </td>\n";
|
||||
echo " </tr>";
|
||||
echo "</table>";
|
||||
|
||||
@@ -27,13 +27,13 @@ include "root.php";
|
||||
require_once "includes/require.php";
|
||||
require_once "includes/checkauth.php";
|
||||
require_once "includes/paging.php";
|
||||
if (permission_exists('dialplan_add')
|
||||
|| permission_exists('dialplan_edit')
|
||||
|| permission_exists('inbound_route_add')
|
||||
if (permission_exists('dialplan_add')
|
||||
|| permission_exists('dialplan_edit')
|
||||
|| permission_exists('inbound_route_add')
|
||||
|| permission_exists('inbound_route_edit')
|
||||
|| permission_exists('outbound_route_add')
|
||||
|| permission_exists('outbound_route_add')
|
||||
|| permission_exists('outbound_route_edit')
|
||||
|| permission_exists('time_conditions_add')
|
||||
|| permission_exists('time_conditions_add')
|
||||
|| permission_exists('time_conditions_edit')) {
|
||||
//access granted
|
||||
}
|
||||
@@ -42,6 +42,12 @@ else {
|
||||
exit;
|
||||
}
|
||||
|
||||
//add multi-lingual support
|
||||
require_once "app_languages.php";
|
||||
foreach($text as $key => $value) {
|
||||
$text[$key] = $value[$_SESSION['domain']['language']['code']];
|
||||
}
|
||||
|
||||
//set the action as an add or an update
|
||||
if (isset($_REQUEST["id"])) {
|
||||
$action = "update";
|
||||
@@ -74,12 +80,12 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
}
|
||||
|
||||
//check for all required data
|
||||
if (strlen($dialplan_name) == 0) { $msg .= "Please provide: Extension Name<br>\n"; }
|
||||
if (strlen($dialplan_order) == 0) { $msg .= "Please provide: Order<br>\n"; }
|
||||
if (strlen($dialplan_continue) == 0) { $msg .= "Please provide: Continue<br>\n"; }
|
||||
if (strlen($dialplan_context) == 0) { $msg .= "Please provide: Context<br>\n"; }
|
||||
if (strlen($dialplan_enabled) == 0) { $msg .= "Please provide: Enabled<br>\n"; }
|
||||
//if (strlen($dialplan_description) == 0) { $msg .= "Please provide: Description<br>\n"; }
|
||||
if (strlen($dialplan_name) == 0) { $msg .= $text['message-required'].$text['label-name']."<br>\n"; }
|
||||
if (strlen($dialplan_order) == 0) { $msg .= $text['message-required'].$text['label-order']."<br>\n"; }
|
||||
if (strlen($dialplan_continue) == 0) { $msg .= $text['message-required'].$text['label-continue']."<br>\n"; }
|
||||
if (strlen($dialplan_context) == 0) { $msg .= $text['message-required'].$text['label-context']."<br>\n"; }
|
||||
if (strlen($dialplan_enabled) == 0) { $msg .= $text['message-required'].$text['label-enabled']."<br>\n"; }
|
||||
//if (strlen($dialplan_description) == 0) { $msg .= $text['message-required'].$text['label-description']."<br>\n"; }
|
||||
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
require_once "includes/header.php";
|
||||
require_once "includes/persistformvar.php";
|
||||
@@ -155,7 +161,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
break;
|
||||
}
|
||||
echo "<div align='center'>\n";
|
||||
echo "Add Complete\n";
|
||||
echo $text['message-add']."\n";
|
||||
echo "</div>\n";
|
||||
require_once "includes/footer.php";
|
||||
return;
|
||||
@@ -206,7 +212,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
break;
|
||||
}
|
||||
echo "<div align='center'>\n";
|
||||
echo "Update Complete\n";
|
||||
echo $text['message-update']."\n";
|
||||
echo "</div>\n";
|
||||
require_once "includes/footer.php";
|
||||
return;
|
||||
@@ -238,6 +244,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
|
||||
//show the header
|
||||
require_once "includes/header.php";
|
||||
$page["title"] = $text['title-dialplan_edit'];
|
||||
|
||||
//show the content
|
||||
echo "<div align='center'>";
|
||||
@@ -252,32 +259,32 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
echo "<table width=\"100%\" border=\"0\" cellpadding=\"1\" cellspacing=\"0\">\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td align='left' width='30%'>\n";
|
||||
echo" <span class=\"vexpl\"><strong>Dialplan</strong></span><br />\n";
|
||||
echo" <span class=\"vexpl\"><strong>".$text['title-dialplan_edit']."</strong></span><br />\n";
|
||||
echo " </td>\n";
|
||||
echo " <td width='70%' align='right'>\n";
|
||||
echo " <input type='button' class='btn' name='' alt='copy' onclick=\"if (confirm('Do you really want to copy this?')){window.location='dialplan_copy.php?id=".$row['dialplan_uuid']."';}\" value='Copy'>\n";
|
||||
echo " <input type='button' class='btn' name='' alt='".$text['button-copy']."' onclick=\"if (confirm('".$text['confirm-copy']."')){window.location='dialplan_copy.php?id=".$row['dialplan_uuid']."';}\" value='".$text['button-copy']."'>\n";
|
||||
switch ($app_uuid) {
|
||||
case "c03b422e-13a8-bd1b-e42b-b6b9b4d27ce4":
|
||||
//inbound routes
|
||||
echo " <input type='button' class='btn' name='' alt='back' onclick=\"window.location='dialplans.php?app_uuid=$app_uuid'\" value='Back'>\n";
|
||||
echo " <input type='button' class='btn' name='' alt='".$text['button-back']."' onclick=\"window.location='dialplans.php?app_uuid=$app_uuid'\" value='".$text['button-back']."'>\n";
|
||||
break;
|
||||
case "8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3":
|
||||
//outbound routes
|
||||
echo " <input type='button' class='btn' name='' alt='back' onclick=\"window.location='dialplans.php?app_uuid=$app_uuid'\" value='Back'>\n";
|
||||
echo " <input type='button' class='btn' name='' alt='".$text['button-back']."' onclick=\"window.location='dialplans.php?app_uuid=$app_uuid'\" value='".$text['button-back']."'>\n";
|
||||
break;
|
||||
case "4b821450-926b-175a-af93-a03c441818b1":
|
||||
//time conditions
|
||||
echo " <input type='button' class='btn' name='' alt='back' onclick=\"window.location='dialplans.php?app_uuid=$app_uuid'\" value='Back'>\n";
|
||||
echo " <input type='button' class='btn' name='' alt='".$text['button-back']."' onclick=\"window.location='dialplans.php?app_uuid=$app_uuid'\" value='".$text['button-back']."'>\n";
|
||||
break;
|
||||
default:
|
||||
echo " <input type='button' class='btn' name='' alt='back' onclick=\"window.location='dialplans.php'\" value='Back'>\n";
|
||||
echo " <input type='button' class='btn' name='' alt='".$text['button-back']."' onclick=\"window.location='dialplans.php'\" value='".$text['button-back']."'>\n";
|
||||
break;
|
||||
}
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td align='left' colspan='2'>\n";
|
||||
echo " Dialplan Include general settings. \n";
|
||||
echo " ".$text['description-dial_plan-edit']."\n";
|
||||
echo " \n";
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
@@ -287,7 +294,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
echo "<table width='100%' border='0' cellpadding='6' cellspacing='0'>\n";
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " Name:\n";
|
||||
echo " ".$text['label-name'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='dialplan_name' maxlength='255' value=\"".htmlspecialchars($dialplan_name)."\">\n";
|
||||
@@ -298,7 +305,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " Number:\n";
|
||||
echo " ".$text['label-number'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='dialplan_number' maxlength='255' value=\"".htmlspecialchars($dialplan_number)."\">\n";
|
||||
@@ -309,7 +316,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " Context:\n";
|
||||
echo " ".$text['label-context'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='dialplan_context' maxlength='255' value=\"$dialplan_context\">\n";
|
||||
@@ -320,22 +327,22 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " Continue:\n";
|
||||
echo " ".$text['label-continue'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select class='formfld' name='dialplan_continue'>\n";
|
||||
echo " <option value=''></option>\n";
|
||||
if ($dialplan_continue == "true") {
|
||||
echo " <option value='true' selected='selected'>true</option>\n";
|
||||
if ($dialplan_continue == "true") {
|
||||
echo " <option value='true' selected='selected'>".$text['option-true']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='true'>true</option>\n";
|
||||
echo " <option value='true'>".$text['option-true']."</option>\n";
|
||||
}
|
||||
if ($dialplan_continue == "false") {
|
||||
echo " <option value='false' selected='selected'>false</option>\n";
|
||||
if ($dialplan_continue == "false") {
|
||||
echo " <option value='false' selected='selected'>".$text['option-false']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='false'>false</option>\n";
|
||||
echo " <option value='false'>".$text['option-false']."</option>\n";
|
||||
}
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
@@ -344,11 +351,10 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " Order:\n";
|
||||
echo " ".$text['label-order'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select name='dialplan_order' class='formfld'>\n";
|
||||
//echo " <option></option>\n";
|
||||
if (strlen(htmlspecialchars($dialplan_order))> 0) {
|
||||
echo " <option selected='yes' value='".htmlspecialchars($dialplan_order)."'>".htmlspecialchars($dialplan_order)."</option>\n";
|
||||
}
|
||||
@@ -373,22 +379,22 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " Enabled:\n";
|
||||
echo " ".$text['label-enabled'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select class='formfld' name='dialplan_enabled'>\n";
|
||||
echo " <option value=''></option>\n";
|
||||
if ($dialplan_enabled == "true") {
|
||||
echo " <option value='true' SELECTED >true</option>\n";
|
||||
if ($dialplan_enabled == "true") {
|
||||
echo " <option value='true' SELECTED >".$text['option-true']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='true'>true</option>\n";
|
||||
echo " <option value='true'>".$text['option-true']."</option>\n";
|
||||
}
|
||||
if ($dialplan_enabled == "false") {
|
||||
echo " <option value='false' SELECTED >false</option>\n";
|
||||
if ($dialplan_enabled == "false") {
|
||||
echo " <option value='false' SELECTED >".$text['option-false']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='false'>false</option>\n";
|
||||
echo " <option value='false'>".$text['option-false']."</option>\n";
|
||||
}
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
@@ -398,7 +404,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " Description:\n";
|
||||
echo " ".$text['label-description'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <textarea class='formfld' name='dialplan_description' rows='4'>".htmlspecialchars($dialplan_description)."</textarea>\n";
|
||||
@@ -411,7 +417,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
if ($action == "update") {
|
||||
echo " <input type='hidden' name='dialplan_uuid' value='$dialplan_uuid'>\n";
|
||||
}
|
||||
echo " <input type='submit' name='submit' class='btn' value='Save'>\n";
|
||||
echo " <input type='submit' name='submit' class='btn' value='".$text['button-save']."'>\n";
|
||||
echo " </td>\n";
|
||||
echo " </tr>";
|
||||
echo "</table>";
|
||||
@@ -431,12 +437,9 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
|
||||
echo "<table width=\"100%\" border=\"0\" cellpadding=\"6\" cellspacing=\"0\">\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td align='left'><p><span class=\"vexpl\"><span class=\"red\"><strong>Conditions and Actions<br />\n";
|
||||
echo " </strong></span>\n";
|
||||
echo " The following conditions, actions and anti-actions are used in the dialplan to direct \n";
|
||||
echo " call flow. Each is processed in order that it is given. \n";
|
||||
echo " Use as many conditions, actions or anti-actions as needed. \n";
|
||||
echo " </span></p></td>\n";
|
||||
echo " <td align='left'><p><span class=\"vexpl\"><span class=\"red\"><strong>".$text['header-conditions_and_actions']."</strong></span>\n";
|
||||
echo " <br /><br />\n";
|
||||
echo " ".$text['description-conditions_and_actions']."</span></p></td>\n";
|
||||
echo " </tr>\n";
|
||||
echo "</table>";
|
||||
echo "<br />\n";
|
||||
@@ -505,13 +508,12 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
echo "<div align='center'>\n";
|
||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||
echo "<tr>\n";
|
||||
echo "<th align='center' width='90px;'>Tag</th>\n";
|
||||
echo "<th align='center' width='150px;'>Type</th>\n";
|
||||
echo "<th align='center' width='70%'>Data</th>\n";
|
||||
echo "<th align='center'>Order</th>\n";
|
||||
//echo "<th align='center'>Group</th>\n";
|
||||
echo "<th align='center' width='90px;'>".$text['label-tag']."</th>\n";
|
||||
echo "<th align='center' width='150px;'>".$text['label-type']."</th>\n";
|
||||
echo "<th align='center' width='70%'>".$text['label-data']."</th>\n";
|
||||
echo "<th align='center'>".$text['label-order']."</th>\n";
|
||||
echo "<td align='right' width='42'>\n";
|
||||
echo " <a href='dialplan_details_edit.php?id2=".$dialplan_uuid."' alt='add'>$v_link_label_add</a>\n";
|
||||
echo " <a href='dialplan_details_edit.php?id2=".$dialplan_uuid."' alt='".$text['button-add']."'>$v_link_label_add</a>\n";
|
||||
echo "</td>\n";
|
||||
echo "<tr>\n";
|
||||
|
||||
@@ -526,7 +528,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
echo " <td width='33.3%' nowrap='nowrap'> </td>\n";
|
||||
echo " <td width='33.3%' align='center' nowrap='nowrap'>$paging_controls</td>\n";
|
||||
echo " <td width='33.3%' align='right'>\n";
|
||||
echo " <a href='dialplan_details_edit.php?id2=".$dialplan_uuid."' alt='add'>$v_link_label_add</a>\n";
|
||||
echo " <a href='dialplan_details_edit.php?id2=".$dialplan_uuid."' alt='".$text['button-add']."'>$v_link_label_add</a>\n";
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
echo " </table>\n";
|
||||
@@ -539,13 +541,12 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
echo "<div align='center'>\n";
|
||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||
echo "<tr>\n";
|
||||
echo "<th align='center' width='90px;'>Tag</th>\n";
|
||||
echo "<th align='center' width='150px;'>Type</th>\n";
|
||||
echo "<th align='center' width='70%'>Data</th>\n";
|
||||
echo "<th align='center'>Order</th>\n";
|
||||
//echo "<th align='center'>Group</th>\n";
|
||||
echo "<th align='center' width='90px;'>".$text['label-tag']."</th>\n";
|
||||
echo "<th align='center' width='150px;'>".$text['label-type']."</th>\n";
|
||||
echo "<th align='center' width='70%'>".$text['label-data']."</th>\n";
|
||||
echo "<th align='center'>".$text['label-order']."</th>\n";
|
||||
echo "<td align='right' width='42'>\n";
|
||||
echo " <a href='dialplan_details_edit.php?id2=".$dialplan_uuid."' alt='add'>$v_link_label_add</a>\n";
|
||||
echo " <a href='dialplan_details_edit.php?id2=".$dialplan_uuid."' alt='".$text['button-add']."'>$v_link_label_add</a>\n";
|
||||
echo "</td>\n";
|
||||
echo "<tr>\n";
|
||||
}
|
||||
@@ -556,10 +557,9 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
echo " <td valign='top' class='".$row_style[$c]."'> ".$row['dialplan_detail_type']."</td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'> ".wordwrap($row['dialplan_detail_data'],180,"<br>",1)."</td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'> ".$row['dialplan_detail_order']."</td>\n";
|
||||
//echo " <td valign='top' class='".$row_style[$c]."'> ".$row['dialplan_detail_group']."</td>\n";
|
||||
echo " <td valign='top' align='right' nowrap='nowrap'>\n";
|
||||
echo " <a href='dialplan_details_edit.php?id=".$row['dialplan_detail_uuid']."&id2=".$dialplan_uuid."' alt='edit'>$v_link_label_edit</a>\n";
|
||||
echo " <a href='dialplan_details_delete.php?id=".$row['dialplan_detail_uuid']."&id2=".$dialplan_uuid."' alt='delete' onclick=\"return confirm('Do you really want to delete this?')\">$v_link_label_delete</a>\n";
|
||||
echo " <a href='dialplan_details_edit.php?id=".$row['dialplan_detail_uuid']."&id2=".$dialplan_uuid."' alt='".$text['button-edit']."'>$v_link_label_edit</a>\n";
|
||||
echo " <a href='dialplan_details_delete.php?id=".$row['dialplan_detail_uuid']."&id2=".$dialplan_uuid."' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>\n";
|
||||
echo " </td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
@@ -576,7 +576,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
echo " <td width='33.3%' nowrap='nowrap'> </td>\n";
|
||||
echo " <td width='33.3%' align='center' nowrap='nowrap'>$paging_controls</td>\n";
|
||||
echo " <td width='33.3%' align='right'>\n";
|
||||
echo " <a href='dialplan_details_edit.php?id2=".$dialplan_uuid."' alt='add'>$v_link_label_add</a>\n";
|
||||
echo " <a href='dialplan_details_edit.php?id2=".$dialplan_uuid."' alt='".$text['button-add']."'>$v_link_label_add</a>\n";
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
echo " </table>\n";
|
||||
|
||||
@@ -34,9 +34,11 @@ else {
|
||||
exit;
|
||||
}
|
||||
|
||||
//includes
|
||||
require_once "includes/header.php";
|
||||
require_once "includes/paging.php";
|
||||
//add multi-lingual support
|
||||
require_once "app_languages.php";
|
||||
foreach($text as $key => $value) {
|
||||
$text[$key] = $value[$_SESSION['domain']['language']['code']];
|
||||
}
|
||||
|
||||
//set the http values as php variables
|
||||
$order_by = $_GET["order_by"];
|
||||
@@ -44,6 +46,23 @@ else {
|
||||
$dialplan_context = $_GET["dialplan_context"];
|
||||
$app_uuid = $_GET["app_uuid"];
|
||||
|
||||
//includes
|
||||
require_once "includes/header.php";
|
||||
if ($app_uuid == "c03b422e-13a8-bd1b-e42b-b6b9b4d27ce4") {
|
||||
$page["title"] = $text['title-inbound_routes'];
|
||||
}
|
||||
elseif ($app_uuid == "8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3") {
|
||||
$page["title"] = $text['title-outbound_routes'];
|
||||
}
|
||||
elseif ($app_uuid == "4b821450-926b-175a-af93-a03c441818b1") {
|
||||
$page["title"] = $text['title-time_conditions'];
|
||||
}
|
||||
else {
|
||||
$page["title"] = $text['title-dialplan_manager'];
|
||||
}
|
||||
|
||||
require_once "includes/paging.php";
|
||||
|
||||
//show the content
|
||||
echo "<div align='center'>";
|
||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='2'>\n";
|
||||
@@ -56,23 +75,23 @@ else {
|
||||
echo " <td align='left'>\n";
|
||||
echo " <span class=\"vexpl\">\n";
|
||||
if ($app_uuid == "c03b422e-13a8-bd1b-e42b-b6b9b4d27ce4") {
|
||||
echo " <strong>Inbound Routes</strong>\n";
|
||||
echo " <strong>".$text['header-inbound_routes']."</strong>\n";
|
||||
}
|
||||
elseif ($app_uuid == "8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3") {
|
||||
echo " <strong>Outbound Routes</strong>\n";
|
||||
echo " <strong>".$text['header-outbound_routes']."</strong>\n";
|
||||
}
|
||||
elseif ($app_uuid == "4b821450-926b-175a-af93-a03c441818b1") {
|
||||
echo " <strong>Time Conditions</strong>\n";
|
||||
echo " <strong>".$text['header-time_conditions']."</strong>\n";
|
||||
}
|
||||
else {
|
||||
echo " <strong>Dialplan</strong>\n";
|
||||
echo " <strong>".$text['header-dialplan_manager']."</strong>\n";
|
||||
}
|
||||
|
||||
|
||||
echo " </span>\n";
|
||||
echo " </td>\n";
|
||||
echo " <td align='right'>\n";
|
||||
if (permission_exists('dialplan_advanced_view') && strlen($app_uuid) == 0) {
|
||||
echo " <input type='button' class='btn' value='advanced' onclick=\"document.location.href='dialplan_advanced.php';\">\n";
|
||||
echo " <input type='button' class='btn' value='".$text['button-advanced']."' onclick=\"document.location.href='dialplan_advanced.php';\">\n";
|
||||
}
|
||||
else {
|
||||
echo " \n";
|
||||
@@ -81,44 +100,29 @@ else {
|
||||
echo " </tr>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td align='left' colspan='2'>\n";
|
||||
echo " <span class=\"vexpl\">\n";
|
||||
echo " <span class=\"vexpl\"><br>\n";
|
||||
|
||||
if ($app_uuid == "c03b422e-13a8-bd1b-e42b-b6b9b4d27ce4") {
|
||||
//inbound routes
|
||||
echo " Route incoming calls to destinations based on one \n";
|
||||
echo " or more conditions. It can send incoming calls to an IVR Menu, \n";
|
||||
echo " Call Group, Extension, External Number, Script. Order is important when an \n";
|
||||
echo " anti-action is used or when there are multiple conditions that match. \n";
|
||||
echo $text['description-inbound_routes'];
|
||||
}
|
||||
elseif ($app_uuid == "8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3") {
|
||||
//outbound routes
|
||||
echo " Route outbound calls to gateways, tdm, enum and more. \n";
|
||||
echo " When a call matches the conditions the call to outbound routes . \n";
|
||||
echo $text['description-outbound_routes'];
|
||||
}
|
||||
elseif ($app_uuid == "4b821450-926b-175a-af93-a03c441818b1") {
|
||||
//time conditions
|
||||
echo " Time conditions route calls based on time conditions. You can \n";
|
||||
echo " use time conditions to send calls to an IVR Menu, External numbers, \n";
|
||||
echo " Scripts, or other destinations. \n";
|
||||
echo $text['description-time_conditions'];
|
||||
}
|
||||
else {
|
||||
//dialplan
|
||||
if (if_group("superadmin")) {
|
||||
echo " The dialplan is used to setup call destinations based on conditions and context.\n";
|
||||
echo " You can use the dialplan to send calls to gateways, auto attendants, external numbers,\n";
|
||||
echo " to scripts, or any destination.\n";
|
||||
echo $text['description-dialplan_manager-superadmin'];
|
||||
}
|
||||
else {
|
||||
echo " The dialplan provides a view of some of the feature codes, as well as the IVR Menu, \n";
|
||||
echo " Conferences, Queues and other destinations.\n";
|
||||
echo $text['description-dialplan_manager'];
|
||||
}
|
||||
}
|
||||
echo " </span>\n";
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
echo " </table>";
|
||||
|
||||
echo " <br />";
|
||||
echo " <br />";
|
||||
|
||||
//get the number of rows in the dialplan
|
||||
@@ -150,8 +154,8 @@ else {
|
||||
$param = "";
|
||||
if (strlen($app_uuid) > 0) { $param = "&app_uuid=".$app_uuid; }
|
||||
$page = $_GET['page'];
|
||||
if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
|
||||
list($paging_controls, $rows_per_page, $var_3) = paging($num_rows, $param, $rows_per_page);
|
||||
if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
|
||||
list($paging_controls, $rows_per_page, $var_3) = paging($num_rows, $param, $rows_per_page);
|
||||
$offset = $rows_per_page * $page;
|
||||
|
||||
$sql = "select * from v_dialplans ";
|
||||
@@ -180,30 +184,30 @@ else {
|
||||
echo "<div align='center'>\n";
|
||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||
echo "<tr>\n";
|
||||
echo th_order_by('dialplan_name', 'Name', $order_by, $order);
|
||||
echo th_order_by('dialplan_number', 'Number', $order_by, $order);
|
||||
echo th_order_by('dialplan_order', 'Order', $order_by, $order);
|
||||
echo th_order_by('dialplan_enabled', 'Enabled', $order_by, $order);
|
||||
echo th_order_by('dialplan_description', 'Description', $order_by, $order);
|
||||
echo th_order_by('dialplan_name', $text['label-name'], $order_by, $order);
|
||||
echo th_order_by('dialplan_number', $text['label-number'], $order_by, $order);
|
||||
echo th_order_by('dialplan_order', $text['label-order'], $order_by, $order);
|
||||
echo th_order_by('dialplan_enabled', $text['label-enabled'], $order_by, $order);
|
||||
echo th_order_by('dialplan_description', $text['label-description'], $order_by, $order);
|
||||
echo "<td align='right' width='42'>\n";
|
||||
if ($app_uuid == "c03b422e-13a8-bd1b-e42b-b6b9b4d27ce4") {
|
||||
if (permission_exists('inbound_route_add')) {
|
||||
echo " <a href='".PROJECT_PATH."/app/dialplan_inbound/dialplan_inbound_add.php' alt='add'>$v_link_label_add</a>\n";
|
||||
echo " <a href='".PROJECT_PATH."/app/dialplan_inbound/dialplan_inbound_add.php' alt='".$text['button-add']."'>$v_link_label_add</a>\n";
|
||||
}
|
||||
}
|
||||
elseif ($app_uuid == "8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3") {
|
||||
if (permission_exists('outbound_route_add')) {
|
||||
echo " <a href='".PROJECT_PATH."/app/dialplan_outbound/dialplan_outbound_add.php' alt='add'>$v_link_label_add</a>\n";
|
||||
echo " <a href='".PROJECT_PATH."/app/dialplan_outbound/dialplan_outbound_add.php' alt='".$text['button-add']."'>$v_link_label_add</a>\n";
|
||||
}
|
||||
}
|
||||
elseif ($app_uuid == "4b821450-926b-175a-af93-a03c441818b1") {
|
||||
if (permission_exists('time_conditions_add')) {
|
||||
echo " <a href='".PROJECT_PATH."/app/time_conditions/time_condition_add.php' alt='add'>$v_link_label_add</a>\n";
|
||||
echo " <a href='".PROJECT_PATH."/app/time_conditions/time_condition_add.php' alt='".$text['button-add']."'>$v_link_label_add</a>\n";
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (permission_exists('dialplan_add')) {
|
||||
echo " <a href='dialplan_add.php' alt='add'>$v_link_label_add</a>\n";
|
||||
echo " <a href='dialplan_add.php' alt='".$text['button-add']."'>$v_link_label_add</a>\n";
|
||||
}
|
||||
}
|
||||
echo "</td>\n";
|
||||
@@ -246,34 +250,34 @@ else {
|
||||
echo " <td valign='top' align='right'>\n";
|
||||
if ($app_uuid == "c03b422e-13a8-bd1b-e42b-b6b9b4d27ce4") {
|
||||
if (permission_exists('inbound_route_edit')) {
|
||||
echo " <a href='dialplan_edit.php?id=".$row['dialplan_uuid']."&app_uuid=$app_uuid' alt='edit'>$v_link_label_edit</a>\n";
|
||||
echo " <a href='dialplan_edit.php?id=".$row['dialplan_uuid']."&app_uuid=$app_uuid' alt='".$text['button-edit']."'>$v_link_label_edit</a>\n";
|
||||
}
|
||||
if (permission_exists('inbound_route_delete')) {
|
||||
echo " <a href='dialplan_delete.php?id=".$row['dialplan_uuid']."&app_uuid=$app_uuid' alt='delete' onclick=\"return confirm('Do you really want to delete this?')\">$v_link_label_delete</a>\n";
|
||||
echo " <a href='dialplan_delete.php?id=".$row['dialplan_uuid']."&app_uuid=$app_uuid' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>\n";
|
||||
}
|
||||
}
|
||||
elseif ($app_uuid == "8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3") {
|
||||
if (permission_exists('outbound_route_edit')) {
|
||||
echo " <a href='dialplan_edit.php?id=".$row['dialplan_uuid']."&app_uuid=$app_uuid' alt='edit'>$v_link_label_edit</a>\n";
|
||||
echo " <a href='dialplan_edit.php?id=".$row['dialplan_uuid']."&app_uuid=$app_uuid' alt='".$text['button-edit']."'>$v_link_label_edit</a>\n";
|
||||
}
|
||||
if (permission_exists('outbound_route_delete')) {
|
||||
echo " <a href='dialplan_delete.php?id=".$row['dialplan_uuid']."&app_uuid=$app_uuid' alt='delete' onclick=\"return confirm('Do you really want to delete this?')\">$v_link_label_delete</a>\n";
|
||||
echo " <a href='dialplan_delete.php?id=".$row['dialplan_uuid']."&app_uuid=$app_uuid' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>\n";
|
||||
}
|
||||
}
|
||||
elseif ($app_uuid == "4b821450-926b-175a-af93-a03c441818b1") {
|
||||
if (permission_exists('time_conditions_edit')) {
|
||||
echo " <a href='dialplan_edit.php?id=".$row['dialplan_uuid']."&app_uuid=$app_uuid' alt='edit'>$v_link_label_edit</a>\n";
|
||||
echo " <a href='dialplan_edit.php?id=".$row['dialplan_uuid']."&app_uuid=$app_uuid' alt='".$text['button-edit']."'>$v_link_label_edit</a>\n";
|
||||
}
|
||||
if (permission_exists('time_conditions_delete')) {
|
||||
echo " <a href='dialplan_delete.php?id=".$row['dialplan_uuid']."&app_uuid=$app_uuid' alt='delete' onclick=\"return confirm('Do you really want to delete this?')\">$v_link_label_delete</a>\n";
|
||||
echo " <a href='dialplan_delete.php?id=".$row['dialplan_uuid']."&app_uuid=$app_uuid' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>\n";
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (permission_exists('dialplan_edit')) {
|
||||
echo " <a href='dialplan_edit.php?id=".$row['dialplan_uuid']."&app_uuid=$app_uuid' alt='edit'>$v_link_label_edit</a>\n";
|
||||
echo " <a href='dialplan_edit.php?id=".$row['dialplan_uuid']."&app_uuid=$app_uuid' alt='".$text['button-edit']."'>$v_link_label_edit</a>\n";
|
||||
}
|
||||
if (permission_exists('dialplan_delete')) {
|
||||
echo " <a href='dialplan_delete.php?id=".$row['dialplan_uuid']."&app_uuid=$app_uuid' alt='delete' onclick=\"return confirm('Do you really want to delete this?')\">$v_link_label_delete</a>\n";
|
||||
echo " <a href='dialplan_delete.php?id=".$row['dialplan_uuid']."&app_uuid=$app_uuid' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>\n";
|
||||
}
|
||||
}
|
||||
echo " </td>\n";
|
||||
@@ -288,27 +292,27 @@ else {
|
||||
echo " <table width='100%' cellpadding='0' cellspacing='0'>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td width='33.3%' nowrap> </td>\n";
|
||||
echo " <td width='33.3%' align='center' nowrap>$paging_controls</td>\n";
|
||||
echo " <td width='33.3%' align='center' nowrap>".$paging_controls."</td>\n";
|
||||
echo " <td width='33.3%' align='right'>\n";
|
||||
echo " ";
|
||||
if ($app_uuid == "c03b422e-13a8-bd1b-e42b-b6b9b4d27ce4") {
|
||||
if (permission_exists('inbound_route_add')) {
|
||||
echo " <a href='".PROJECT_PATH."/app/dialplan_inbound/dialplan_inbound_add.php' alt='add'>$v_link_label_add</a>\n";
|
||||
echo " <a href='".PROJECT_PATH."/app/dialplan_inbound/dialplan_inbound_add.php' alt='".$text['button-add']."'>$v_link_label_add</a>\n";
|
||||
}
|
||||
}
|
||||
elseif ($app_uuid == "8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3") {
|
||||
if (permission_exists('outbound_route_add')) {
|
||||
echo " <a href='".PROJECT_PATH."/app/dialplan_outbound/dialplan_outbound_add.php' alt='add'>$v_link_label_add</a>\n";
|
||||
echo " <a href='".PROJECT_PATH."/app/dialplan_outbound/dialplan_outbound_add.php' alt='".$text['button-add']."'>$v_link_label_add</a>\n";
|
||||
}
|
||||
}
|
||||
elseif ($app_uuid == "4b821450-926b-175a-af93-a03c441818b1") {
|
||||
if (permission_exists('time_conditions_add')) {
|
||||
echo " <a href='".PROJECT_PATH."/app/time_conditions/time_condition_add.php' alt='add'>$v_link_label_add</a>\n";
|
||||
echo " <a href='".PROJECT_PATH."/app/time_conditions/time_condition_add.php' alt='".$text['button-add']."'>$v_link_label_add</a>\n";
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (permission_exists('dialplan_add')) {
|
||||
echo " <a href='dialplan_add.php' alt='add'>$v_link_label_add</a>\n";
|
||||
echo " <a href='dialplan_add.php' alt='".$text['button-add']."'>$v_link_label_add</a>\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php
|
||||
|
||||
// main
|
||||
$text['title-dialplan-inbound-add']['en-us'] = 'Inbound Call Routing';
|
||||
@@ -44,10 +44,10 @@
|
||||
$text['label-enabled']['en-us'] = 'Enabled';
|
||||
$text['label-enabled']['pt-pt'] = '';
|
||||
|
||||
$text['label-true']['en-us'] = 'true';
|
||||
$text['label-true']['en-us'] = 'True';
|
||||
$text['label-true']['pt-pt'] = '';
|
||||
|
||||
$text['label-false']['en-us'] = 'false';
|
||||
$text['label-false']['en-us'] = 'False';
|
||||
$text['label-false']['pt-pt'] = '';
|
||||
|
||||
$text['label-description']['en-us'] = 'Description';
|
||||
@@ -76,6 +76,45 @@
|
||||
$text['label-expression']['en-us'] = 'Expression';
|
||||
$text['label-expression']['pt-pt'] = '';
|
||||
|
||||
$text['option-context']['en-us'] = 'Context';
|
||||
$text['option-context']['pt-pt'] = '';
|
||||
|
||||
$text['option-username']['en-us'] = 'Username';
|
||||
$text['option-username']['pt-pt'] = '';
|
||||
|
||||
$text['option-rdnis']['en-us'] = 'RDNIS';
|
||||
$text['option-rdnis']['pt-pt'] = '';
|
||||
|
||||
$text['option-destination_number']['en-us'] = 'Destination Number';
|
||||
$text['option-destination_number']['pt-pt'] = '';
|
||||
|
||||
$text['option-public']['en-us'] = 'Public';
|
||||
$text['option-public']['pt-pt'] = '';
|
||||
|
||||
$text['option-caller_id_name']['en-us'] = 'Caller ID Name';
|
||||
$text['option-caller_id_name']['pt-pt'] = '';
|
||||
|
||||
$text['option-caller_id_number']['en-us'] = 'Caller ID Number';
|
||||
$text['option-caller_id_number']['pt-pt'] = '';
|
||||
|
||||
$text['option-ani']['en-us'] = 'ANI';
|
||||
$text['option-ani']['pt-pt'] = '';
|
||||
|
||||
$text['option-ani2']['en-us'] = 'ANI2';
|
||||
$text['option-ani2']['pt-pt'] = '';
|
||||
|
||||
$text['option-uuid']['en-us'] = 'UUID';
|
||||
$text['option-uuid']['pt-pt'] = '';
|
||||
|
||||
$text['option-source']['en-us'] = 'Source';
|
||||
$text['option-source']['pt-pt'] = '';
|
||||
|
||||
$text['option-chan_name']['en-us'] = 'Channel Name';
|
||||
$text['option-chan_name']['pt-pt'] = '';
|
||||
|
||||
$text['option-network_addr']['en-us'] = 'Network Address';
|
||||
$text['option-network_addr']['pt-pt'] = '';
|
||||
|
||||
// general
|
||||
$text['button-save']['en-us'] = 'Save';
|
||||
$text['button-save']['pt-pt'] = '';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php
|
||||
/*
|
||||
FusionPBX
|
||||
Version: MPL 1.1
|
||||
@@ -33,8 +33,6 @@ else {
|
||||
echo $text['label-access-denied'];
|
||||
exit;
|
||||
}
|
||||
require_once "includes/header.php";
|
||||
require_once "includes/paging.php";
|
||||
|
||||
//add multi-lingual support
|
||||
require_once "app_languages.php";
|
||||
@@ -42,6 +40,12 @@ foreach($text as $key => $value) {
|
||||
$text[$key] = $value[$_SESSION['domain']['language']['code']];
|
||||
}
|
||||
|
||||
require_once "includes/header.php";
|
||||
$page["title"] = $text['title-dialplan-inbound-add'];
|
||||
|
||||
require_once "includes/paging.php";
|
||||
|
||||
|
||||
//get the http get values and set them as php variables
|
||||
$order_by = $_GET["order_by"];
|
||||
$order = $_GET["order"];
|
||||
@@ -97,7 +101,7 @@ foreach($text as $key => $value) {
|
||||
}
|
||||
else {
|
||||
if (strlen($condition_field_1) == 0) { $condition_field_1 = "destination_number"; }
|
||||
if (is_numeric($condition_expression_1)) {
|
||||
if (is_numeric($condition_expression_1)) {
|
||||
//the number is numeric
|
||||
$condition_expression_1 = str_replace("+", "\+", $condition_expression_1);
|
||||
$condition_expression_1 = '^('.$condition_expression_1.')$';
|
||||
@@ -640,12 +644,12 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
echo " </td>\n";
|
||||
echo " <td align='right'>\n";
|
||||
if (permission_exists("inbound_route_edit") && $action == "advanced") {
|
||||
echo " <input type='button' class='btn' name='' alt='basic' onclick=\"window.location='dialplan_inbound_add.php?action=basic'\" value='".$text['button-basic']."'>\n";
|
||||
echo " <input type='button' class='btn' name='' alt='".$text['button-basic']."' onclick=\"window.location='dialplan_inbound_add.php?action=basic'\" value='".$text['button-basic']."'>\n";
|
||||
}
|
||||
else {
|
||||
echo " <input type='button' class='btn' name='' alt='advanced' onclick=\"window.location='dialplan_inbound_add.php?action=advanced'\" value='".$text['button-advanced']."'>\n";
|
||||
echo " <input type='button' class='btn' name='' alt='".$text['button-advanced']."' onclick=\"window.location='dialplan_inbound_add.php?action=advanced'\" value='".$text['button-advanced']."'>\n";
|
||||
}
|
||||
echo " <input type='button' class='btn' name='' alt='back' onclick=\"window.location='".PROJECT_PATH."/app/dialplan/dialplans.php?app_uuid=c03b422e-13a8-bd1b-e42b-b6b9b4d27ce4'\" value='".$text['button-back']."'>\n";
|
||||
echo " <input type='button' class='btn' name='' alt='".$text['button-back']."' onclick=\"window.location='".PROJECT_PATH."/app/dialplan/dialplans.php?app_uuid=c03b422e-13a8-bd1b-e42b-b6b9b4d27ce4'\" value='".$text['button-back']."'>\n";
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
echo " <tr>\n";
|
||||
@@ -703,7 +707,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
obj.parentNode.removeChild(obj);
|
||||
Replace_condition_field_1(this.objs);
|
||||
}
|
||||
|
||||
|
||||
function Replace_condition_field_1(obj){
|
||||
obj[2].parentNode.insertBefore(obj[0],obj[2]);
|
||||
obj[0].parentNode.removeChild(obj[1]);
|
||||
@@ -722,21 +726,21 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
if (strlen($condition_field_1) > 0) {
|
||||
echo " <option value='$condition_field_1' selected>$condition_field_1</option>\n";
|
||||
}
|
||||
echo " <option value='context'>context</option>\n";
|
||||
echo " <option value='username'>username</option>\n";
|
||||
echo " <option value='rdnis'>rdnis</option>\n";
|
||||
echo " <option value='destination_number'>destination_number</option>\n";
|
||||
echo " <option value='public'>public</option>\n";
|
||||
echo " <option value='caller_id_name'>caller_id_name</option>\n";
|
||||
echo " <option value='caller_id_number'>caller_id_number</option>\n";
|
||||
echo " <option value='ani'>ani</option>\n";
|
||||
echo " <option value='ani2'>ani2</option>\n";
|
||||
echo " <option value='uuid'>uuid</option>\n";
|
||||
echo " <option value='source'>source</option>\n";
|
||||
echo " <option value='chan_name'>chan_name</option>\n";
|
||||
echo " <option value='network_addr'>network_addr</option>\n";
|
||||
echo " <option value='context'>".$text['option-context']."</option>\n";
|
||||
echo " <option value='username'>".$text['option-username']."</option>\n";
|
||||
echo " <option value='rdnis'>".$text['option-rdnis']."</option>\n";
|
||||
echo " <option value='destination_number'>".$text['option-destination_number']."</option>\n";
|
||||
echo " <option value='public'>".$text['option-public']."</option>\n";
|
||||
echo " <option value='caller_id_name'>".$text['option-caller_id_name']."</option>\n";
|
||||
echo " <option value='caller_id_number'>".$text['option-caller_id_number']."</option>\n";
|
||||
echo " <option value='ani'>".$text['option-ani']."</option>\n";
|
||||
echo " <option value='ani2'>".$text['option-ani2']."</option>\n";
|
||||
echo " <option value='uuid'>".$text['option-uuid']."</option>\n";
|
||||
echo " <option value='source'>".$text['option-source']."</option>\n";
|
||||
echo " <option value='chan_name'>".$text['option-chan_name']."</option>\n";
|
||||
echo " <option value='network_addr'>".$text['option-network_addr']."</option>\n";
|
||||
echo " </select>\n";
|
||||
echo " <input type='button' id='btn_select_to_input_condition_field_1' class='btn' name='' alt='back' onclick='changeToInput_condition_field_1(document.getElementById(\"condition_field_1\"));this.style.visibility = \"hidden\";' value='<'>\n";
|
||||
echo " <input type='button' id='btn_select_to_input_condition_field_1' class='btn' name='' alt='".$text['button-back']."' onclick='changeToInput_condition_field_1(document.getElementById(\"condition_field_1\"));this.style.visibility = \"hidden\";' value='<'>\n";
|
||||
echo " <br />\n";
|
||||
echo " </td>\n";
|
||||
echo " <td style='width: 73px;'> ".$text['label-expression'].":</td>\n";
|
||||
@@ -784,7 +788,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
obj.parentNode.removeChild(obj);
|
||||
Replace_condition_field_2(this.objs);
|
||||
}
|
||||
|
||||
|
||||
function Replace_condition_field_2(obj){
|
||||
obj[2].parentNode.insertBefore(obj[0],obj[2]);
|
||||
obj[0].parentNode.removeChild(obj[1]);
|
||||
@@ -798,21 +802,21 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
if (strlen($condition_field_2) > 0) {
|
||||
echo " <option value='$condition_field_2' selected>$condition_field_2</option>\n";
|
||||
}
|
||||
echo " <option value='context'>context</option>\n";
|
||||
echo " <option value='username'>username</option>\n";
|
||||
echo " <option value='rdnis'>rdnis</option>\n";
|
||||
echo " <option value='destination_number'>destination_number</option>\n";
|
||||
echo " <option value='public'>public</option>\n";
|
||||
echo " <option value='caller_id_name'>caller_id_name</option>\n";
|
||||
echo " <option value='caller_id_number'>caller_id_number</option>\n";
|
||||
echo " <option value='ani'>ani</option>\n";
|
||||
echo " <option value='ani2'>ani2</option>\n";
|
||||
echo " <option value='uuid'>uuid</option>\n";
|
||||
echo " <option value='source'>source</option>\n";
|
||||
echo " <option value='chan_name'>chan_name</option>\n";
|
||||
echo " <option value='network_addr'>network_addr</option>\n";
|
||||
echo " <option value='context'>".$text['option-context']."</option>\n";
|
||||
echo " <option value='username'>".$text['option-username']."</option>\n";
|
||||
echo " <option value='rdnis'>".$text['option-rdnis']."</option>\n";
|
||||
echo " <option value='destination_number'>".$text['option-destination_number']."</option>\n";
|
||||
echo " <option value='public'>".$text['option-public']."</option>\n";
|
||||
echo " <option value='caller_id_name'>".$text['option-caller_id_name']."</option>\n";
|
||||
echo " <option value='caller_id_number'>".$text['option-caller_id_number']."</option>\n";
|
||||
echo " <option value='ani'>".$text['option-ani']."</option>\n";
|
||||
echo " <option value='ani2'>".$text['option-ani2']."</option>\n";
|
||||
echo " <option value='uuid'>".$text['option-uuid']."</option>\n";
|
||||
echo " <option value='source'>".$text['option-source']."</option>\n";
|
||||
echo " <option value='chan_name'>".$text['option-chan_name']."</option>\n";
|
||||
echo " <option value='network_addr'>".$text['option-network_addr']."</option>\n";
|
||||
echo " </select>\n";
|
||||
echo " <input type='button' id='btn_select_to_input_condition_field_2' class='btn' name='' alt='back' onclick='changeToInput_condition_field_2(document.getElementById(\"condition_field_2\"));this.style.visibility = \"hidden\";' value='<'>\n";
|
||||
echo " <input type='button' id='btn_select_to_input_condition_field_2' class='btn' name='' alt='".$text['button-back']."' onclick='changeToInput_condition_field_2(document.getElementById(\"condition_field_2\"));this.style.visibility = \"hidden\";' value='<'>\n";
|
||||
echo " <br />\n";
|
||||
echo " </td>\n";
|
||||
echo " <td style='width: 73px;' align='left'>\n";
|
||||
@@ -857,7 +861,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
echo "".$text['label-select-inbound-destination-number']."\n";
|
||||
}
|
||||
else {
|
||||
echo " <input type=\"button\" class=\"btn\" name=\"\" alt=\"Add\" onclick=\"window.location='".PROJECT_PATH."/app/destinations/destinations.php'\" value='".$text['button-add']."'>\n";
|
||||
echo " <input type=\"button\" class=\"btn\" name=\"\" alt=\"".$text['button-add']."\" onclick=\"window.location='".PROJECT_PATH."/app/destinations/destinations.php'\" value='".$text['button-add']."'>\n";
|
||||
}
|
||||
unset ($prep_statement);
|
||||
|
||||
@@ -938,13 +942,13 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select class='formfld' name='dialplan_enabled' style='width: 60%;'>\n";
|
||||
if ($dialplan_enabled == "true") {
|
||||
if ($dialplan_enabled == "true") {
|
||||
echo " <option value='true' SELECTED >".$text['label-true']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='true'>".$text['label-true']."</option>\n";
|
||||
}
|
||||
if ($dialplan_enabled == "false") {
|
||||
if ($dialplan_enabled == "false") {
|
||||
echo " <option value='false' SELECTED >".$text['label-false']."</option>\n";
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php
|
||||
/*
|
||||
FusionPBX
|
||||
Version: MPL 1.1
|
||||
@@ -24,41 +24,43 @@
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
James Rose <james.o.rose@gmail.com>
|
||||
*/
|
||||
|
||||
$text['title-dialplan-outbound-add']['en-us'] = 'Outbound Call Routing';
|
||||
$text['message-provide']['en-us'] = 'Please Provide';
|
||||
$text['label-gateway-name']['en-us'] = 'Gateway Name';
|
||||
$text['label-dialplan-expression']['en-us'] = 'Dialplan Expression';
|
||||
$text['label-2d']['en-us'] = '2 digits';
|
||||
$text['label-3d']['en-us'] = '3 digits';
|
||||
$text['label-4d']['en-us'] = '4 digits';
|
||||
$text['label-5d']['en-us'] = '5 digits';
|
||||
$text['label-6d']['en-us'] = '6 digits';
|
||||
$text['label-7d']['en-us'] = '7 digits local';
|
||||
$text['label-8d']['en-us'] = '8 digits';
|
||||
$text['label-9d']['en-us'] = '9 digits';
|
||||
$text['label-10d']['en-us'] = '10 digits long distance';
|
||||
$text['label-11d']['en-us'] = '11 digits long distance';
|
||||
$text['label-12d']['en-us'] = '12 digits';
|
||||
$text['label-13d']['en-us'] = '13 digits';
|
||||
$text['label-14d']['en-us'] = '14 digits';
|
||||
$text['label-int']['en-us'] = '15 digits International';
|
||||
$text['label-311']['en-us'] = '311 information';
|
||||
$text['label-411']['en-us'] = '411 information';
|
||||
$text['label-911']['en-us'] = '911 emergency';
|
||||
$text['label-9d2']['en-us'] = 'dial 9, then 2 digits';
|
||||
$text['label-9d3']['en-us'] = 'dial 9, then 3 digits';
|
||||
$text['label-9d4']['en-us'] = 'dial 9, then 4 digits';
|
||||
$text['label-9d5']['en-us'] = 'dial 9, then 5 digits';
|
||||
$text['label-9d6']['en-us'] = 'dial 9, then 6 digits';
|
||||
$text['label-9d7']['en-us'] = 'dial 9, then 7 digits';
|
||||
$text['label-9d8']['en-us'] = 'dial 9, then 8 digits';
|
||||
$text['label-9d9']['en-us'] = 'dial 9, then 9 digits';
|
||||
$text['label-9d10']['en-us'] = 'dial 9, then 10 digits';
|
||||
$text['label-9d11']['en-us'] = 'dial 9, then 11 digits';
|
||||
$text['label-9d12']['en-us'] = 'dial 9, then 12 digits';
|
||||
$text['label-9d13']['en-us'] = 'dial 9, then 13 digits';
|
||||
$text['label-9d14']['en-us'] = 'dial 9, then 14 digits';
|
||||
$text['label-9d15']['en-us'] = 'dial 9, then International';
|
||||
$text['label-800']['en-us'] = 'toll free';
|
||||
$text['label-2d']['en-us'] = '2 Digits';
|
||||
$text['label-3d']['en-us'] = '3 Digits';
|
||||
$text['label-4d']['en-us'] = '4 Digits';
|
||||
$text['label-5d']['en-us'] = '5 Digits';
|
||||
$text['label-6d']['en-us'] = '6 Digits';
|
||||
$text['label-7d']['en-us'] = '7 Digits Local';
|
||||
$text['label-8d']['en-us'] = '8 Digits';
|
||||
$text['label-9d']['en-us'] = '9 Digits';
|
||||
$text['label-10d']['en-us'] = '10 Digits Long Distance';
|
||||
$text['label-11d']['en-us'] = '11 Digits Long Distance';
|
||||
$text['label-12d']['en-us'] = '12 Digits';
|
||||
$text['label-13d']['en-us'] = '13 Digits';
|
||||
$text['label-14d']['en-us'] = '14 Digits';
|
||||
$text['label-int']['en-us'] = '15 Digits International';
|
||||
$text['label-311']['en-us'] = '311 Information';
|
||||
$text['label-411']['en-us'] = '411 Information';
|
||||
$text['label-911']['en-us'] = '911 Emergency';
|
||||
$text['label-9d2']['en-us'] = 'Dial 9, then 2 Digits';
|
||||
$text['label-9d3']['en-us'] = 'Dial 9, then 3 Digits';
|
||||
$text['label-9d4']['en-us'] = 'Dial 9, then 4 Digits';
|
||||
$text['label-9d5']['en-us'] = 'Dial 9, then 5 Digits';
|
||||
$text['label-9d6']['en-us'] = 'Dial 9, then 6 Digits';
|
||||
$text['label-9d7']['en-us'] = 'Dial 9, then 7 Digits';
|
||||
$text['label-9d8']['en-us'] = 'Dial 9, then 8 Digits';
|
||||
$text['label-9d9']['en-us'] = 'Dial 9, then 9 Digits';
|
||||
$text['label-9d10']['en-us'] = 'Dial 9, then 10 Digits';
|
||||
$text['label-9d11']['en-us'] = 'Dial 9, then 11 Digits';
|
||||
$text['label-9d12']['en-us'] = 'Dial 9, then 12 Digits';
|
||||
$text['label-9d13']['en-us'] = 'Dial 9, then 13 Digits';
|
||||
$text['label-9d14']['en-us'] = 'Dial 9, then 14 Digits';
|
||||
$text['label-9d15']['en-us'] = 'Dial 9, then International';
|
||||
$text['label-800']['en-us'] = 'Toll-Free';
|
||||
$text['message-update']['en-us'] = 'Update Complete';
|
||||
$text['label-outbound-routes']['en-us'] = 'Outbound Routes';
|
||||
$text['button-back']['en-us'] = 'Back';
|
||||
@@ -79,12 +81,12 @@
|
||||
$text['label-order']['en-us'] = 'Order';
|
||||
$text['description-order']['en-us'] = 'Select the order number. The order number determines the order of the outbound routes when there is more than one.';
|
||||
$text['label-enabled']['en-us'] = 'Enabled';
|
||||
$text['label-true']['en-us'] = 'true';
|
||||
$text['label-false']['en-us'] = 'false';
|
||||
$text['label-true']['en-us'] = 'True';
|
||||
$text['label-false']['en-us'] = 'False';
|
||||
$text['description-enabled']['en-us'] = 'Choose to enable or disable the outbound route.';
|
||||
$text['label-description']['en-us'] = 'Description';
|
||||
$text['description-description']['en-us'] = 'Enter a description for the outbound route.';
|
||||
$text['button-save']['en-us'] = 'Save';
|
||||
|
||||
|
||||
|
||||
?>
|
||||
@@ -43,6 +43,8 @@ else {
|
||||
|
||||
//show the header
|
||||
require_once "includes/header.php";
|
||||
$page["title"] = $text['title-dialplan-outbound-add'];
|
||||
|
||||
require_once "includes/paging.php";
|
||||
|
||||
//get the http post values and set theme as php variables
|
||||
@@ -305,7 +307,7 @@ else {
|
||||
case "^9(\d{4})$":
|
||||
$label = $text['label-9d4'];
|
||||
$abbrv = "9.4d";
|
||||
break;
|
||||
break;
|
||||
case "^9(\d{7})$":
|
||||
$label = $text['label-9d7'];
|
||||
$abbrv = "9.7d";
|
||||
@@ -646,7 +648,7 @@ function type_onchange(dialplan_detail_type) {
|
||||
echo " ".$text['label-gateway'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
|
||||
|
||||
if (if_group("superadmin")) {
|
||||
echo "<script>\n";
|
||||
echo "var Objs;\n";
|
||||
@@ -949,13 +951,13 @@ function type_onchange(dialplan_detail_type) {
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <select class='formfld' name='dialplan_enabled' style='width: 60%;'>\n";
|
||||
//echo " <option value=''></option>\n";
|
||||
if ($dialplan_enabled == "true") {
|
||||
if ($dialplan_enabled == "true") {
|
||||
echo " <option value='true' selected='selected'>".$text['label-true']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='true'>".$text['label-true']."</option>\n";
|
||||
}
|
||||
if ($dialplan_enabled == "false") {
|
||||
if ($dialplan_enabled == "false") {
|
||||
echo " <option value='false' selected='selected'>".$text['label-false']."</option>\n";
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user