/** check if a specific extension is being used, or get a list of all extensions that are being used
 * @param mixed     an array of extension numbers to check against, or if boolean true then return list of all extensions
 * @param array     a hash of module names to search for callbacks, otherwise global $active_modules is used
 * @return array    returns an empty array if exten not in use, or any array with usage info, or of all usage
 *                  if exten is boolean true
 * @description     Upon passing in an array of extension numbers, this api will query all modules to determine if any
 *                  are using those extension numbers. If so, it will return an array with the usage information
 *                  as described below, otherwise an empty array. If passed boolean true, it will return an array
 *                  of the same format with all extensions on the system that are being used.
 *
 *                  $exten_usage[$module][$exten]['description'] // description of the extension
 *                                               ['edit_url']    // a url that could be invoked to edit extension
 *                                               ['status']      // Status: INUSE, RESERVED, RESTRICTED
 */
function framework_check_extension_usage($exten = true, $module_hash = false, $report_conflicts = true)
{
    global $active_modules;
    $exten_usage = array();
    if (!is_array($module_hash)) {
        $module_hash = $active_modules;
    }
    if (!is_array($exten) && $exten !== true) {
        $exten = array($exten);
    }
    foreach (array_keys($module_hash) as $mod) {
        $function = $mod . "_check_extensions";
        if (function_exists($function)) {
            modgettext::push_textdomain($mod);
            $module_usage = $function($exten);
            if (!empty($module_usage)) {
                $exten_usage[$mod] = $module_usage;
            }
            modgettext::pop_textdomain();
        }
    }
    if ($exten === true) {
        return $exten_usage;
    } else {
        $exten_matches = array();
        foreach (array_keys($exten_usage) as $mod) {
            foreach ($exten as $test_exten) {
                if (isset($exten_usage[$mod][$test_exten])) {
                    $exten_matches[$mod][$test_exten] = $exten_usage[$mod][$test_exten];
                }
            }
        }
    }
    if (!empty($exten_matches) && $report_conflicts) {
        fwmsg::set_error(_("Extension Numbering Duplicate Conflict Detected"));
    }
    return $exten_matches;
}
Пример #2
0
function _redirect_standard_helper($args)
{
    global $module_name, $fw_popover_process;
    $getdest = $module_name . '_getdest';
    // if processing a popOver postback and the module has not explicitly set the destination, try to
    // derive it here. This keeps most modules from having to do an explicit call to set_dest()
    //
    if ($fw_popover_process && !empty($args) && !fwmsg::is_dest_set() && $module_name && function_exists($getdest)) {
        foreach (array_intersect($args, array('extdisplay', 'id', 'account', 'itemid', 'extension')) as $arg) {
            if (isset($_REQUEST[$arg]) && trim($_REQUEST[$arg]) != '') {
                $dest = $getdest($_REQUEST[$arg]);
                fwmsg::set_dest($dest[0]);
                break;
            }
        }
    }
    foreach (array_merge(array('type', 'display', 'fw_popover_process'), $args) as $arg) {
        if (isset($_REQUEST[$arg])) {
            $urlopts[] = $arg . '=' . urlencode($_REQUEST[$arg]);
        }
    }
    $url = 'config.php?' . implode('&', $urlopts);
    return $url;
}
Пример #3
0
 public function doConfigPageInit($page)
 {
     $request = $_REQUEST;
     $request['action'] = !empty($request['action']) ? $request['action'] : "";
     switch ($page) {
         case 'directory':
             //check for ajax request and process that immediately
             if (isset($_REQUEST['ajaxgettr'])) {
                 //got ajax request
                 $opts = $opts = explode('|', urldecode($_REQUEST['ajaxgettr']));
                 if ($opts[0] == 'all') {
                     echo directory_draw_entries_all_users($opts[1]);
                 } else {
                     if ($opts[0] != '') {
                         $real_id = $opts[0];
                         $name = '';
                         $realname = $opts[1];
                         $audio = 'vm';
                     } else {
                         $real_id = 'custom';
                         $name = $opts[1];
                         $realname = 'Custom Entry';
                         $audio = 'tts';
                     }
                     echo directory_draw_entries_tr($opts[0], $real_id, $name, $realname, $audio, '', $opts[2]);
                 }
                 exit;
             }
             $requestvars = array('id', 'action', 'entries', 'newentries', 'def_dir', 'Submit');
             foreach ($requestvars as $var) {
                 switch ($var) {
                     case 'def_dir':
                         $rvars_def = false;
                         break;
                     default:
                         $rvars_def = '';
                         break;
                 }
                 ${$var} = isset($_REQUEST[$var]) ? $_REQUEST[$var] : $rvars_def;
             }
             if (isset($Submit) && $Submit == 'Submit' && isset($def_dir) && $def_dir !== false) {
                 directory_save_default_dir($def_dir);
             }
             break;
     }
     if ($page == 'directory') {
         //get variables for directory_details
         $requestvars = array('id', 'dirname', 'description', 'announcement', 'callid_prefix', 'alert_info', 'repeat_loops', 'repeat_recording', 'invalid_recording', 'invalid_destination', 'retivr', 'say_extension');
         foreach ($requestvars as $var) {
             $vars[$var] = isset($_REQUEST[$var]) ? $_REQUEST[$var] : null;
         }
         $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : null;
         $entries = isset($_REQUEST['entries']) ? $_REQUEST['entries'] : null;
         //$entries=(($entries)?array_values($entries):'');//reset keys
         switch ($action) {
             case 'edit':
                 //get real dest
                 $vars['invalid_destination'] = $_REQUEST[$_REQUEST['goto0'] . '0'];
                 $vars['id'] = directory_save_dir_details($vars);
                 \directory_save_dir_entries($vars['id'], $entries);
                 $this_dest = directory_getdest($vars['id']);
                 \fwmsg::set_dest($this_dest[0]);
                 needreload();
                 $_REQUEST['id'] = $vars['id'];
                 break;
             case 'delete':
                 directory_delete($vars['id']);
                 needreload();
                 break;
         }
     }
 }
Пример #4
0
function core_users_configprocess()
{
    //create vars from the request
    extract($_REQUEST);
    //make sure we can connect to Asterisk Manager
    if (!checkAstMan()) {
        return false;
    }
    //check if the extension is within range for this user
    if (isset($extension) && !checkRange($extension)) {
        echo "<script>javascript:alert('" . _("Warning! Extension") . " " . $extension . " " . _("is not allowed for your account") . ".');</script>";
        $GLOBALS['abort'] = true;
    } else {
        //if submitting form, update database
        if (!isset($action)) {
            $action = null;
        }
        switch ($action) {
            case "add":
                if (core_users_add($_REQUEST)) {
                    // TODO: Check this if it's the same in device and user mode, and in fact we can't support this in that
                    //       mode at least without fixing the complexities of adding the devices which gets ugly!
                    //
                    $this_dest = core_getdest($_REQUEST['extension']);
                    fwmsg::set_dest($this_dest[0]);
                    needreload();
                    //redirect_standard_continue();
                } else {
                    // really bad hack - but if core_users_add fails, want to stop core_devices_add
                    // Comment, this does not help everywhere. Other hooks functions can hook before
                    // this like voicemail!
                    //
                    $GLOBALS['abort'] = true;
                }
                break;
            case "del":
                \FreePBX::Core()->delUser($extdisplay);
                core_users_cleanastdb($extdisplay);
                if (function_exists('findmefollow_del')) {
                    findmefollow_del($extdisplay);
                }
                needreload();
                //redirect_standard_continue();
                break;
            case "edit":
                if (core_users_edit($extdisplay, $_REQUEST)) {
                    needreload();
                    //redirect_standard_continue('extdisplay');
                } else {
                    // really bad hack - but if core_users_edit fails, want to stop core_devices_edit
                    $GLOBALS['abort'] = true;
                }
                break;
        }
    }
    return true;
}
Пример #5
0
 $header['title'] = framework_server_name();
 $header['amp_conf'] = $amp_conf;
 $header['use_popover_css'] = $fw_popover || $fw_popover_process;
 $o = FreePBX::create()->Less->generateMainStyles();
 $header['compiled_less_files'] = $o['compiled_less_files'];
 $header['extra_compiled_less_files'] = $o['extra_compiled_less_files'];
 //if we have a module loaded, load its css
 if (isset($module_name)) {
     $fw_gui_html .= framework_include_css();
     $header['module_name'] = $module_name;
 }
 show_view($amp_conf['VIEW_HEADER'], $header);
 // If processing posback (fw_popover_process) and there are errors then we
 // display again, otherwise we ignore the $content and prepare to process
 //
 $show_normal = $fw_popover_process ? fwmsg::errors() : true;
 if ($show_normal) {
     // provide beta status
     if (isset($fpbx_menu[$display]['beta']) && strtolower($fpbx_menu[$display]['beta']) == 'yes') {
         //TODO: Why is this in a global system variable?
         $fw_gui_html .= load_view($amp_conf['VIEW_BETA_NOTICE']);
     }
     $fw_gui_html .= $content;
     $popover_args['popover_mode'] = 'display';
 } else {
     $popover_args['popover_mode'] = 'process';
 }
 //send footer
 $footer['js_content'] = load_view($amp_conf['VIEW_POPOVER_JS'], $popover_args);
 $footer['lang'] = set_language();
 $footer['covert'] = in_array($display, array('noauth', 'badrefer')) ? true : false;
Пример #6
0
function ivr_configprocess()
{
    if (isset($_REQUEST['display']) && $_REQUEST['display'] == 'ivr') {
        global $db;
        //get variables
        $get_var = array('id', 'name', 'alertinfo', 'description', 'announcement', 'directdial', 'invalid_loops', 'invalid_retry_recording', 'invalid_destination', 'invalid_recording', 'retvm', 'timeout_time', 'timeout_recording', 'timeout_retry_recording', 'timeout_destination', 'timeout_loops', 'timeout_append_announce', 'invalid_append_announce', 'timeout_ivr_ret', 'invalid_ivr_ret');
        foreach ($get_var as $var) {
            $vars[$var] = isset($_REQUEST[$var]) ? $_REQUEST[$var] : '';
        }
        $vars['timeout_append_announce'] = empty($vars['timeout_append_announce']) ? '0' : '1';
        $vars['invalid_append_announce'] = empty($vars['invalid_append_announce']) ? '0' : '1';
        $vars['timeout_ivr_ret'] = empty($vars['timeout_ivr_ret']) ? '0' : '1';
        $vars['invalid_ivr_ret'] = empty($vars['invalid_ivr_ret']) ? '0' : '1';
        $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : '';
        $entries = isset($_REQUEST['entries']) ? $_REQUEST['entries'] : '';
        switch ($action) {
            case 'save':
                if (isset($_REQUEST['announcementrecording'])) {
                    $filepath = FreePBX::Config()->get("ASTSPOOLDIR") . "/tmp/" . $_REQUEST['announcementrecording'];
                    $soundspath = FreePBX::Config()->get("ASTVARLIBDIR") . "/sounds";
                    $codec = "wav";
                    if (file_exists($filepath)) {
                        FreePBX::Media()->load($filepath);
                        $filename = "ivr-" . $vars['name'] . "-recording-" . time();
                        FreePBX::Media()->convert($soundspath . "/en/custom/" . $filename . "." . $codec);
                        $id = FreePBX::Recordings()->addRecording("ivr-" . $vars['name'] . "-recording-" . time(), sprintf(_("Recording created for IVR named '%s'"), $vars['name']), "custom/" . $filename);
                        $vars['announcement'] = $id;
                    } else {
                        $vars['announcement'] = '';
                    }
                }
                //get real dest
                $vars['id'] = ivr_save_details($vars);
                ivr_save_entries($vars['id'], $entries);
                needreload();
                $this_dest = ivr_getdest($vars['id']);
                fwmsg::set_dest($this_dest[0]);
                break;
            case 'delete':
                ivr_delete($vars['id']);
                isset($_REQUEST['id']) ? $_REQUEST['id'] = null : '';
                isset($_REQUEST['action']) ? $_REQUEST['action'] = null : '';
                needreload();
                break;
        }
    }
}
Пример #7
0
 * we need to get the latest drawselects with thosen goto target if we have it
 * and send it back. This could be more efficient by only getting the options for
 * the target and possibly related categories but the overhead is minimal to get
 * a single copy of the select box structure.
 */
$html = '';
switch ($popover_mode) {
    case 'display':
        $html .= "<script>popOverDisplay();</script>";
        break;
    case 'process':
        // Before calling drawselects we need to:
        //  - set the 'environment' like the parent page it is being generated for
        //  - tell it to dump it's cached internal structures and re-generate them
        // This is necessary because callback functions that drawselects uses can
        // generate context dependent results based on the calling module/display page
        //
        global $module_name, $module_page;
        $module_name_bak = $module_name;
        $module_page_bak = $module_page;
        $module_name = $_SESSION['module_name'];
        $module_page = $_SESSION['module_page'];
        $gotodest = fwmsg::get_dest();
        $drawselects_json = json_encode(drawselects($gotodest, 0, false, false, '', false, false, true));
        $html .= '<script>parent.closePopOver(' . $drawselects_json . ');</script>';
        $module_name = $module_name_bak;
        $module_page = $module_page_bak;
        break;
}
$html .= "\n";
echo $html;
Пример #8
0
 /**
  * set_dest()
  * short set a recently created destination
  *
  * @access static public
  * @param string
  *
  * pass in the destination just created from an add action in a module. Used so framework can
  * passs back the created destination in popOver frames back to the parent window to set the
  * new selection. Goes through the SESSION since modules usually do redirects()
  */
 public static function set_dest($dest)
 {
     $_SESSION['fwmsg']['last_dest'] = $dest;
     self::$dest_set = true;
 }
 public function doConfigPageInit($page)
 {
     $request = $_REQUEST;
     isset($request['action']) ? $action = $request['action'] : ($action = '');
     //the extension we are currently displaying
     isset($request['extdisplay']) ? $extdisplay = $request['extdisplay'] : ($extdisplay = '');
     isset($request['account']) ? $account = $request['account'] : ($account = '');
     isset($request['grptime']) ? $grptime = $request['grptime'] : ($grptime = '');
     isset($request['progress']) ? $progress = $request['progress'] : ($progress = 'yes');
     isset($request['grppre']) ? $grppre = $request['grppre'] : ($grppre = '');
     isset($request['strategy']) ? $strategy = $request['strategy'] : ($strategy = '');
     isset($request['annmsg_id']) ? $annmsg_id = $request['annmsg_id'] : ($annmsg_id = '');
     isset($request['description']) ? $description = $request['description'] : ($description = '');
     isset($request['alertinfo']) ? $alertinfo = $request['alertinfo'] : ($alertinfo = '');
     isset($request['needsconf']) ? $needsconf = $request['needsconf'] : ($needsconf = '');
     isset($request['cwignore']) ? $cwignore = $request['cwignore'] : ($cwignore = '');
     isset($request['cpickup']) ? $cpickup = $request['cpickup'] : ($cpickup = '');
     isset($request['cfignore']) ? $cfignore = $request['cfignore'] : ($cfignore = '');
     isset($request['remotealert_id']) ? $remotealert_id = $request['remotealert_id'] : ($remotealert_id = '0');
     isset($request['toolate_id']) ? $toolate_id = $request['toolate_id'] : ($toolate_id = '');
     isset($request['ringing']) ? $ringing = $request['ringing'] : ($ringing = '');
     isset($request['changecid']) ? $changecid = $request['changecid'] : ($changecid = 'default');
     isset($request['fixedcid']) ? $fixedcid = $request['fixedcid'] : ($fixedcid = '');
     isset($request['recording']) ? $recording = $request['recording'] : ($recording = 'dontcare');
     if (isset($request['goto0']) && isset($request[$request['goto0'] . "0"])) {
         $goto = $request[$request['goto0'] . "0"];
     } else {
         $goto = '';
     }
     if (isset($request["grplist"])) {
         $grplist = explode("\n", $request["grplist"]);
         if (!$grplist) {
             $grplist = null;
         }
         foreach (array_keys($grplist) as $key) {
             //trim it
             $grplist[$key] = trim($grplist[$key]);
             // remove invalid chars
             $grplist[$key] = preg_replace("/[^0-9#*]/", "", $grplist[$key]);
             if ($grplist[$key] == ltrim($extdisplay, 'GRP-') . '#') {
                 $grplist[$key] = rtrim($grplist[$key], '#');
             }
             // remove blanks
             if ($grplist[$key] == "") {
                 unset($grplist[$key]);
             }
         }
         // check for duplicates, and re-sequence
         $grplist = array_values(array_unique($grplist));
     }
     // do if we are submitting a form
     if (isset($request['action'])) {
         //check if the extension is within range for this user
         if (isset($account) && !checkRange($account)) {
             echo "<script>javascript:alert('" . _("Warning! Extension") . " " . $account . " " . _("is not allowed for your account") . ".');</script>";
         } else {
             //add group
             if ($action == 'addGRP') {
                 $conflict_url = array();
                 $usage_arr = framework_check_extension_usage($account);
                 if (!empty($usage_arr)) {
                     $conflict_url = framework_display_extension_usage_alert($usage_arr);
                 } elseif (ringgroups_add($account, $strategy, $grptime, implode("-", $grplist), $goto, $description, $grppre, $annmsg_id, $alertinfo, $needsconf, $remotealert_id, $toolate_id, $ringing, $cwignore, $cfignore, $changecid, $fixedcid, $cpickup, $recording, $progress)) {
                     // save the most recent created destination which will be picked up by
                     //
                     $this_dest = ringgroups_getdest($account);
                     \fwmsg::set_dest($this_dest[0]);
                     needreload();
                     $_REQUEST['extdisplay'] = $account;
                 }
             }
             //del group
             if ($action == 'delGRP') {
                 ringgroups_del($account);
                 needreload();
                 unset($_REQUEST['view']);
                 unset($_REQUEST['extdisplay']);
             }
             //edit group - just delete and then re-add the extension
             if ($action == 'edtGRP') {
                 ringgroups_del($account);
                 ringgroups_add($account, $strategy, $grptime, implode("-", $grplist), $goto, $description, $grppre, $annmsg_id, $alertinfo, $needsconf, $remotealert_id, $toolate_id, $ringing, $cwignore, $cfignore, $changecid, $fixedcid, $cpickup, $recording, $progress);
                 needreload();
                 $_REQUEST['extdisplay'] = $account;
             }
         }
     }
 }
Пример #10
0
 public function doConfigPageInit($page)
 {
     $request = $_REQUEST;
     isset($request['action']) ? $action = $request['action'] : ($action = '');
     //the extension we are currently displaying
     isset($request['extdisplay']) ? $extdisplay = $request['extdisplay'] : ($extdisplay = '');
     isset($request['account']) ? $account = $request['account'] : ($account = '');
     isset($request['name']) ? $name = $request['name'] : ($name = '');
     isset($request['password']) ? $password = $request['password'] : ($password = '');
     isset($request['agentannounce_id']) ? $agentannounce_id = $request['agentannounce_id'] : ($agentannounce_id = '');
     isset($request['prefix']) ? $prefix = $request['prefix'] : ($prefix = '');
     isset($request['alertinfo']) ? $alertinfo = $request['alertinfo'] : ($alertinfo = '');
     isset($request['joinannounce_id']) ? $joinannounce_id = $request['joinannounce_id'] : ($joinannounce_id = '');
     $maxwait = isset($request['maxwait']) ? $request['maxwait'] : '';
     $cwignore = isset($request['cwignore']) ? $request['cwignore'] : '0';
     $queuewait = isset($request['queuewait']) ? $request['queuewait'] : '0';
     $rtone = isset($request['rtone']) ? $request['rtone'] : '0';
     $qregex = isset($request['qregex']) ? $request['qregex'] : '';
     $weight = isset($request['weight']) ? $request['weight'] : '0';
     $autofill = isset($request['autofill']) ? $request['autofill'] : 'no';
     $togglehint = isset($request['togglehint']) ? $request['togglehint'] : '0';
     $dynmemberonly = isset($request['dynmemberonly']) ? $request['dynmemberonly'] : 'no';
     $use_queue_context = isset($request['use_queue_context']) ? $request['use_queue_context'] : '0';
     $exten_context = "from-queue";
     $qnoanswer = isset($request['qnoanswer']) ? $request['qnoanswer'] : '0';
     $callconfirm = isset($request['callconfirm']) ? $request['callconfirm'] : '0';
     $callconfirm_id = isset($request['callconfirm_id']) ? $request['callconfirm_id'] : '';
     $monitor_type = isset($request['monitor_type']) ? $request['monitor_type'] : '';
     $monitor_heard = isset($request['monitor_heard']) ? $request['monitor_heard'] : '0';
     $monitor_spoken = isset($request['monitor_spoken']) ? $request['monitor_spoken'] : '0';
     $answered_elsewhere = isset($request['answered_elsewhere']) ? $request['answered_elsewhere'] : '0';
     $skip_joinannounce = isset($request['skip_joinannounce']) ? $request['skip_joinannounce'] : '';
     //cron code
     $cron_schedule = isset($request['cron_schedule']) ? $request['cron_schedule'] : 'never';
     $cron_minute = isset($request['cron_minute']) ? $request['cron_minute'] : '';
     $cron_hour = isset($request['cron_hour']) ? $request['cron_hour'] : '';
     $cron_dow = isset($request['cron_dow']) ? $request['cron_dow'] : '';
     $cron_month = isset($request['cron_month']) ? $request['cron_month'] : '';
     $cron_dom = isset($request['cron_dom']) ? $request['cron_dom'] : '';
     $cron_random = isset($request['cron_random']) ? $request['cron_random'] : false;
     if (isset($request['goto0']) && isset($request[$request['goto0'] . "0"])) {
         $goto = $request[$request['goto0'] . "0"];
     } else {
         $goto = '';
     }
     if (isset($request["members"])) {
         $members = explode("\n", $request["members"]);
         if (!$members) {
             $members = null;
         }
         foreach (array_keys($members) as $key) {
             //trim it
             $members[$key] = trim($members[$key]);
             // check if an agent (starts with a or A)
             $exten_prefix = strtoupper(substr($members[$key], 0, 1));
             $this_member = preg_replace("/[^0-9#\\,*]/", "", $members[$key]);
             switch ($exten_prefix) {
                 case 'A':
                     $exten_type = 'Agent';
                     break;
                 case 'P':
                     $exten_type = 'PJSIP';
                     break;
                 case 'S':
                     $exten_type = 'SIP';
                     break;
                 case 'X':
                     $exten_type = 'IAX2';
                     break;
                 case 'Z':
                     $exten_type = 'ZAP';
                     break;
                 case 'D':
                     $exten_type = 'DAHDI';
                     break;
                 default:
                     $exten_type = 'Local';
             }
             $penalty_pos = strrpos($this_member, ",");
             if ($penalty_pos === false) {
                 $penalty_val = 0;
             } else {
                 $penalty_val = substr($this_member, $penalty_pos + 1);
                 // get penalty
                 $this_member = substr($this_member, 0, $penalty_pos);
                 // clean up ext
                 $this_member = preg_replace("/[^0-9#*]/", "", $this_member);
                 //clean out other ,'s
                 $penalty_val = preg_replace("/[^0-9*]/", "", $penalty_val);
                 // get rid of #'s if there
                 $penalty_val = $penalty_val == "" ? 0 : $penalty_val;
             }
             // remove blanks // prefix with the channel
             if (empty($this_member)) {
                 unset($members[$key]);
             } else {
                 switch ($exten_type) {
                     case 'Agent':
                     case 'SIP':
                     case 'IAX2':
                     case 'PJSIP':
                     case 'ZAP':
                     case 'DAHDI':
                         $members[$key] = "{$exten_type}/{$this_member},{$penalty_val}";
                         break;
                     case 'Local':
                         $members[$key] = "{$exten_type}/{$this_member}@{$exten_context}/n,{$penalty_val}";
                 }
             }
         }
         // check for duplicates, and re-sequence
         // $members = array_values(array_unique($members));
     }
     if (isset($request["dynmembers"])) {
         $dynmembers = explode("\n", $request["dynmembers"]);
         if (!$dynmembers) {
             $dynmembers = null;
         }
     }
     // do if we are submitting a form
     if (isset($request['action'])) {
         //check if the extension is within range for this user
         if (isset($account) && !checkRange($account)) {
             echo "<script>javascript:alert('" . _("Warning! Extension") . " {$account} " . _("is not allowed for your account.") . "');</script>";
         } else {
             //if submitting form, update database
             switch ($action) {
                 case "add":
                     $conflict_url = array();
                     $usage_arr = framework_check_extension_usage($account);
                     if (!empty($usage_arr)) {
                         $conflict_url = framework_display_extension_usage_alert($usage_arr);
                     } else {
                         queues_add($account, $name, $password, $prefix, $goto, $agentannounce_id, $members, $joinannounce_id, $maxwait, $alertinfo, $cwignore, $qregex, $queuewait, $use_queue_context, $dynmembers, $dynmemberonly, $togglehint, $qnoanswer, $callconfirm, $callconfirm_id, $monitor_type, $monitor_heard, $monitor_spoken, $answered_elsewhere);
                         needreload();
                         $this_dest = queues_getdest($account);
                         \fwmsg::set_dest($this_dest[0]);
                         $_REQUEST['extdisplay'] = $account;
                     }
                     break;
                 case "delete":
                     queues_del($account);
                     unset($_REQUEST['view']);
                     unset($_REQUEST['extdisplay']);
                     needreload();
                     break;
                 case "edit":
                     //just delete and re-add
                     queues_del($account);
                     queues_add($account, $name, $password, $prefix, $goto, $agentannounce_id, $members, $joinannounce_id, $maxwait, $alertinfo, $cwignore, $qregex, $queuewait, $use_queue_context, $dynmembers, $dynmemberonly, $togglehint, $qnoanswer, $callconfirm, $callconfirm_id, $monitor_type, $monitor_heard, $monitor_spoken, $answered_elsewhere);
                     needreload();
                     break;
             }
         }
     }
 }