Beispiel #1
0
    echo "\t\t\t\t</td>\n";
    echo "\t\t\t</tr>\n";
    $x++;
}
echo "\t\t\t</table>\n";
echo "\t\t\t" . $text['description-destinations'] . "\n";
echo "\t\t\t<br />\n";
echo "\t\t</td>";
echo "\t</tr>";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo "\t" . $text['label-timeout_destination'] . "\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", "", "ring_group_timeout_action", $ring_group_timeout_action, "", "");
echo "\t<br />\n";
echo "\t" . $text['description-timeout_destination'] . "\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo "\t" . $text['label-cid-name-prefix'] . "\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo "  <input class='formfld' type='text' name='ring_group_cid_name_prefix' maxlength='255' value='{$ring_group_cid_name_prefix}'>\n";
echo "<br />\n";
echo $text['description-cid-name-prefix'] . " \n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
echo "\t" . $text['label-max_wait_time_with_no_agent_time_reached'] . "\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo "  <input class='formfld' type='number' name='queue_max_wait_time_with_no_agent_time_reached' maxlength='255' min='1' step='1' value='{$queue_max_wait_time_with_no_agent_time_reached}'>\n";
echo "<br />\n";
echo $text['description-max_wait_time_with_no_agent_time_reached'] . "\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
echo "    " . $text['label-timeout_action'] . "\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", "", "queue_timeout_action", $queue_timeout_action, "", "");
echo "<br />\n";
echo $text['description-timeout_action'] . "\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
echo "\t" . $text['label-tier_rules_apply'] . "\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo "\t<select class='formfld' name='queue_tier_rules_apply'>\n";
if ($queue_tier_rules_apply == "true") {
    echo "\t<option value='true' selected='selected' >" . $text['option-true'] . "</option>\n";
} else {
    echo "\t<option value='true'>" . $text['option-true'] . "</option>\n";
}
function add_custom_condition($group_id, $dialplan_action = '')
{
    global $text, $v_link_label_add;
    echo "<tr>\n";
    echo "<td class='vncell' valign='top' align='left' nowrap>\n";
    echo "\t" . $text['label-settings'];
    echo "</td>\n";
    echo "<td class='vtable' align='left'>\n";
    echo "\t<table border='0' cellpadding='2' cellspacing='0' style='margin: -2px;'>\n";
    echo "\t\t<tr>\n";
    echo "\t\t\t<td class='vtable' style='width: 108px;'>" . $text['label-condition'] . "</td>\n";
    echo "\t\t\t<td class='vtable' style='width: 125px;'>" . $text['label-condition_value'] . "</td>\n";
    echo "\t\t\t<td class='vtable' style='width: 114px;'>" . $text['label-condition_range'] . "</td>\n";
    echo "\t\t\t<td style='text-align: right;'><a href='javascript:void(0);' onclick=\"add_condition(" . $group_id . ",'custom');\">" . $v_link_label_add . "</a></td>\n";
    echo "\t\t</tr>\n";
    echo "\t\t<tr>";
    echo "\t\t\t<td colspan='4' style='white-space: nowrap;' id='group_" . $group_id . "'></td>";
    echo "\t\t</tr>";
    echo "\t\t<tr>";
    echo "\t\t\t<td colspan='4' style='padding-top: 10px;'>";
    switch_select_destination("dialplan", '', "dialplan_action[" . $group_id . "]", $dialplan_action, 'width: 300px;', '');
    echo "\t\t\t</td>";
    echo "\t\t</tr>";
    echo "\t</table>";
    echo "\t<br />";
    echo "\t" . $text['description-settings'];
    echo "</td>\n";
    echo "</tr>\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, "", "");
echo "</td>\n";
echo "</tr>\n";
echo "</td>\n";
echo "</tr>\n";
if (permission_exists("inbound_route_edit") && $action == "advanced") {
    echo "<tr>\n";
    echo "<td class='vncell' valign='top' align='left' nowrap>\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, "", "");
    echo "</td>\n";
    echo "</tr>\n";
}
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
echo "    " . $text['label-limit'] . "\n";
echo "</td>\n";
echo "<td colspan='4' class='vtable' align='left'>\n";
echo "    <input class='formfld' type='text' name='limit' maxlength='255' value=\"{$limit}\">\n";
echo "<br />\n";
echo "\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
echo "\t<input class='formfld' type='text' name='call_flow_anti_label' maxlength='255' value=\"{$call_flow_anti_label}\">\n";
echo "<br />\n";
echo $text['description-alternate_label'] . "\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
echo "\t" . $text['label-alternate_destination'] . "\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='')
$select_value = '';
if (strlen($call_flow_anti_app . $call_flow_anti_data) > 0) {
    $select_value = $call_flow_anti_app . ':' . $call_flow_anti_data;
}
switch_select_destination("dialplan", $alternate_destination_label, "call_flow_alternate_destination", $select_value, "", $call_flow_anti_data);
unset($select_value);
echo "<br />\n";
echo $text['description-alternate_destination'] . "\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo "\t" . $text['label-description'] . "\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo "\t<input class='formfld' type='text' name='call_flow_description' maxlength='255' value=\"{$call_flow_description}\">\n";
echo "<br />\n";
echo $text['description-description'] . "\n";
echo "</td>\n";
echo "</tr>\n";
        echo "\t\t\t\t\t<td class='list_control_icons'>";
        echo "<a href='voicemail_option_edit.php?id=" . $field['voicemail_option_uuid'] . "&voicemail_uuid=" . $field['voicemail_uuid'] . "' alt='" . $text['button-edit'] . "'>" . $v_link_label_edit . "</a>";
        echo "<a href='voicemail_option_delete.php?id=" . $field['voicemail_option_uuid'] . "&voicemail_uuid=" . $field['voicemail_uuid'] . "&a=delete' alt='" . $text['button-delete'] . "' onclick=\"return confirm('" . $text['confirm-delete'] . "')\">" . $v_link_label_delete . "</a>";
        echo "\t\t\t\t\t</td>\n";
        echo "\t\t\t\t</tr>\n";
    }
}
unset($sql, $result);
for ($c = 0; $c < 1; $c++) {
    echo "\t\t\t\t<tr>\n";
    echo "<td class='vtable' align='left'>\n";
    echo "  <input class='formfld' style='width:70px' type='text' name='voicemail_options[" . $c . "][voicemail_option_digits]' maxlength='255' value='" . $voicemail_option_digits . "'>\n";
    echo "</td>\n";
    echo "<td class='vtable' align='left' nowrap='nowrap'>\n";
    $tmp_select_value = '';
    switch_select_destination("ivr", $voicemail_options_label, 'voicemail_options[' . $c . '][voicemail_option_param]', $tmp_select_value, "width:175px", $voicemail_option_action);
    unset($tmp_select_value);
    echo "</td>\n";
    echo "<td class='vtable' align='left'>\n";
    echo "\t<select name='voicemail_options[" . $c . "][voicemail_option_order]' class='formfld' style='width:55px'>\n";
    //echo "	<option></option>\n";
    if (strlen(htmlspecialchars($voicemail_option_order)) > 0) {
        echo "\t<option selected='yes' value='" . htmlspecialchars($voicemail_option_order) . "'>" . htmlspecialchars($voicemail_option_order) . "</option>\n";
    }
    $i = 0;
    while ($i <= 999) {
        if (strlen($i) == 1) {
            echo "\t<option value='00{$i}'>00{$i}</option>\n";
        }
        if (strlen($i) == 2) {
            echo "\t<option value='0{$i}'>0{$i}</option>\n";
Beispiel #7
0
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
echo "\t" . $text['label-timeout'] . "\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo "  <input class='formfld' type='number' name='ivr_menu_timeout' maxlength='255' min='1' step='1' value='{$ivr_menu_timeout}' required='required'>\n";
echo "<br />\n";
echo $text['description-timeout'] . "\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
echo "    " . $text['label-exit_action'] . "\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", "", "ivr_menu_exit_action", $ivr_menu_exit_action, "", "");
echo "\t<br />\n";
echo "\t" . $text['description-exit_action'] . "\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
echo "\t" . $text['label-direct_dial'] . "\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo "\t<select class='formfld' name='ivr_menu_direct_dial'>\n";
if ($ivr_menu_direct_dial == "true") {
    echo "\t<option value='true' selected='selected'>" . $text['option-true'] . "</option>\n";
} else {
    echo "\t<option value='true'>" . $text['option-true'] . "</option>\n";
}
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo "\t" . $text['label-agent_password'] . "\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo "  <input class='formfld' type='password' name='agent_password' autocomplete='off' onmouseover=\"this.type='text';\" onfocus=\"this.type='text';\" onmouseout=\"if (!\$(this).is(':focus')) { this.type='password'; }\" onblur=\"this.type='password';\" maxlength='255' min='1' step='1' value='{$agent_password}'>\n";
echo "<br />\n";
echo $text['description-agent_password'] . "\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
echo "\t" . $text['label-contact'] . "\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("call_center_contact", "", "agent_contact", $agent_contact, "width: 350px;", "");
echo "<br />\n";
echo $text['description-contact'] . "\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo "\t" . $text['label-status'] . "\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo "\t<select class='formfld' name='agent_status'>\n";
if ($agent_status == "Logged Out") {
    echo "\t<option value='Logged Out' SELECTED >" . $text['option-logged_out'] . "</option>\n";
} else {
    echo "\t<option value='Logged Out'>" . $text['option-logged_out'] . "</option>\n";
}
	}
	echo "		</select>\n";

	echo "<br />\n";
	echo "The type is required when a custom destination is defined. \n";
	echo "</td>\n";
	echo "</tr>\n";
}
*/
echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
echo "\tDestination:\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("ivr", $ivr_menu_options_label, "ivr_menu_options_param", $ivr_menu_options_action . ':' . $ivr_menu_options_param, "", $ivr_menu_options_action);
echo "<br />\n";
echo "Select the destination.\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
echo "\tOrder:\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo "\t<select name='ivr_menu_options_order' class='formfld'>\n";
//echo "	<option></option>\n";
if (strlen(htmlspecialchars($ivr_menu_options_order)) > 0) {
    echo "\t<option selected='yes' value='" . htmlspecialchars($ivr_menu_options_order) . "'>" . htmlspecialchars($ivr_menu_options_order) . "</option>\n";
}
$i = 0;
echo "<td class='vtable' align='left'>\n";
echo "  <input class='formfld' type='text' name='voicemail_option_digits' maxlength='255' value='{$voicemail_option_digits}'>\n";
echo "<br />\n";
echo $text['description-option'] . "\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
echo "\t" . $text['label-destination'] . "\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
$tmp_select_value = '';
if (strlen($voicemail_option_action . $voicemail_option_param) > 0) {
    $tmp_select_value = $voicemail_option_action . ':' . $voicemail_option_param;
}
switch_select_destination("ivr", $voicemail_options_label, "voicemail_option_param", $tmp_select_value, "width: 350px;", $voicemail_option_action);
unset($tmp_select_value);
echo "<br />\n";
echo $text['description-destination'] . "\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
echo "\t" . $text['label-order'] . "\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo "\t<select name='voicemail_option_order' class='formfld'>\n";
$i = 0;
while ($i <= 999) {
    $selected = $voicemail_option_order == $i ? "selected" : null;
    if (strlen($i) == 1) {
	echo "The type is required when a custom destination is defined. \n";
	echo "</td>\n";
	echo "</tr>\n";
}
*/
echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
echo "\t" . $text['label-destination'] . "\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='')
$tmp_select_value = '';
if (strlen($ivr_menu_option_action . $ivr_menu_option_param) > 0) {
    $tmp_select_value = $ivr_menu_option_action . ':' . $ivr_menu_option_param;
}
switch_select_destination("ivr", $ivr_menu_options_label, "ivr_menu_option_param", $tmp_select_value, "width: 350px;", $ivr_menu_option_action);
unset($tmp_select_value);
echo "<br />\n";
echo $text['description-destination'] . "\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
echo "\t" . $text['label-order'] . "\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo "\t<select name='ivr_menu_option_order' class='formfld'>\n";
$i = 0;
while ($i <= 999) {
    $selected = $ivr_menu_option_order == $i ? "selected" : null;
    if (strlen($i) == 1) {
echo "	</td>\n";
echo "	</tr>\n";
echo "	</table>\n";
echo "	<div id='desc_action_data_1'></div>\n";
*/
echo "</td>\n";
echo "</tr>\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
echo "    Action:\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
//switch_select_destination(select_type, select_name, select_value, select_style);
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 "	</td>\n";
echo "	</tr>\n";
echo "	</table>\n";
*/
//echo "	<div id='desc_action_data_1'></div>\n";
echo "</td>\n";
echo "</tr>\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
echo "    Action when False:\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
//switch_select_destination(select_type, select_name, select_value, select_style);
switch_select_destination("dialplan", "anti_action_1", $anti_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='anti_action_application_1' name='anti_action_application_1' onchange='type_onchange(\"anti_action_application_1\");'>\n";
echo "    <option value=''></option>\n";
if (strlen($anti_action_application_1) > 0) {
	echo "    <option value='$anti_action_application_1' selected>$anti_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";
        if ($row["dialplan_detail_tag"] == "action" && $row["dialplan_detail_type"] == "set" && strpos($row["dialplan_detail_data"], "accountcode") == 0) {
            continue;
        }
        //exclude set:accountcode actions
        echo "\t\t\t\t<tr>\n";
        echo "\t\t\t\t\t<td>\n";
        if (strlen($row['dialplan_detail_uuid']) > 0) {
            echo "\t<input name='dialplan_details[" . $x . "][dialplan_detail_uuid]' type='hidden' value=\"" . $row['dialplan_detail_uuid'] . "\">\n";
        }
        echo "\t<input name='dialplan_details[" . $x . "][dialplan_detail_type]' type='hidden' value=\"" . $row['dialplan_detail_type'] . "\">\n";
        echo "\t<input name='dialplan_details[" . $x . "][dialplan_detail_order]' type='hidden' value=\"" . $order . "\">\n";
        $data = $row['dialplan_detail_data'];
        $label = explode("XML", $data);
        $divider = $row['dialplan_detail_type'] != '' ? ":" : null;
        $detail_action = $row['dialplan_detail_type'] . $divider . $row['dialplan_detail_data'];
        switch_select_destination("dialplan", $label[0], "dialplan_details[" . $x . "][dialplan_detail_data]", $detail_action, "width: 60%;", $row['dialplan_detail_type']);
        echo "\t\t\t\t\t</td>\n";
        echo "\t\t\t\t\t<td class='list_control_icons' style='width: 25px;'>";
        if (strlen($row['destination_uuid']) > 0) {
            echo "<a href='destination_delete.php?id=" . $row['destination_uuid'] . "&destination_uuid=" . $row['destination_uuid'] . "&a=delete' alt='delete' onclick=\"return confirm('" . $text['confirm-delete'] . "')\">{$v_link_label_delete}</a>";
        }
        echo "\t\t\t\t\t</td>\n";
        echo "\t\t\t\t</tr>\n";
    }
    $order = $order + 10;
    $x++;
}
echo "\t\t\t</table>\n";
echo "</td>\n";
echo "</tr>\n";
if (file_exists($_SERVER['DOCUMENT_ROOT'] . PROJECT_PATH . "/app/fax/app_config.php")) {