'dev_buttons', 'label'=>'Buttons Configuration'), array('name'=>'button', 'label'=>'Buttons', 'help'=>'help') ); //$buttons_type= array("empty","line","service","feature","speeddial"); // "feature","service" -- Add leter ! $buttons_type= array("empty","line","silent","monitor","speeddial","feature","adv.line"); $feature_list= array('parkinglot'=>'Park Slots','monitor'=> "Record Calls",'devstate'=> "Change Status"); if ($_REQUEST['tech_hardware'] === 'cisco') { $lines_list = $this->dbinterface->getSccpDeviceTableData('SccpExtension'); } else { $lines_list = $this->dbinterface->getSipTableData('extensionList'); } $hint_list = $this->getHintInformation(true, array('context'=>'park-hints')) ; $line_id =0; $max_buttons =56; //Don't know hardware type so set a maximum. On save, this is set to actual max buttons $show_buttons =1; if (!empty($_REQUEST['id'])) { $dev_id = $_REQUEST['id']; $db_buttons = $this->dbinterface->getSccpDeviceTableData('get_sccpdevice_buttons', array("id" => $dev_id)); $db_device = $this->dbinterface->getSccpDeviceTableData('get_sccpdevice_byid', array("id" => $dev_id)); $show_buttons = $db_device['buttons']; if (!empty($db_device['addon_buttons'])) { $show_buttons += $db_device['addon_buttons']; } //$show_buttons = $max_buttons; } if (!empty($_REQUEST['new_id'])) { $val = $_REQUEST['type']; $dev_schema = $this-> getSccpModelInformation('byid', false, "all", array('model' =>$val)); // $db_device = $this->dbinterface->getSccpDeviceTableData('get_sccpdevice_byid', array("id" => $val)); $show_buttons = $dev_schema[0]['buttons']; if (!empty($_REQUEST['addon'])) { $val = $_REQUEST['addon']; $dev_schema = $this-> getSccpModelInformation('byid', false, "all", array('model' =>$val)); $show_buttons += $dev_schema[0]['buttons']; } //$show_buttons = $max_buttons; } if (!empty($_REQUEST['ru_id'])) { $dev_id = $_REQUEST['ru_id']; $db_buttons = $this->dbinterface->getSccpDeviceTableData('get_sccpdevice_buttons', array("id" => $dev_id)); $show_buttons = $max_buttons; } ?>

  • empty: Empty button (no options)
  • line: Registers the line with identifier specified as [name]
  • silent: buttons equal 'Line' with out ring
  • monitor: buttons mode speeddial + show status
  • speeddial: Adds a speeddial with label [name] and [option1] as number Optionally, [option2] can be used to specify a hint by extension@context as usual.
  • service (not implemented): Adds a service url Feature buttons have an on/off status represented on the device with a tick-box and can be used to set the device in a particular state. Currently Possible [option1],[option2] combinations:
    • privacy,callpresent = Make a private call, number is suppressed
    • privacy,hint = Make a private call, hint is suppressed
    • cfwdall,number = Forward all calls
    • cfwbusy,number = Forward on busy
    • cfwnoaswer,number = Forward on no-answer (not implemented yet)
      DND,busy = Do-not-disturb, return Busy signal to Caller
      DND,silent = Do-not-disturb, return nothing to caller
      monitor = Record Calls using AutoMon (asterisk 1.6.x only)
    • devstate,custom_devstate = Device State Feature Button (asterisk 1.6.1 and up). custom_devstate is the name of the custom devicestate to be toggled (How to use devicestate) hold = To be implemented
    • transfer = To be implemented
    • multiblink = To be implemented
    • mobility = To be implemented
    • conference = To be implemented
    • ");?>
0) { $defaul_tv = 'adv.line'; $show_form_mode = 'adv.line'; $defaul_btn = strtok($defaul_btn, '@'); $defaul_advline = strtok('@'); } if ($line_id == 0) { $show_form_mode = 'line'; } if (stripos($defaul_btn, '!') >0) { $defaul_btn = strtok($defaul_btn, '!'); $defaul_tv = 'silent'; $def_silent = 'checked'; } if ($defaul_tv == "feature") { $defaul_ftr = $defaul_opt[0]; $defaul_fcod = (empty($defaul_opt[1])) ? '': $defaul_opt[1]; $def_park = (empty($defaul_opt[2])) ? '': 'checked'; // print_r($defaul_opt); } foreach ($defaul_opt as $data_i) { if (strpos($data_i, '@')>0) { $test_btn = strtok($data_i, '@'); $def_hint = 'checked'; $defaul_btn = $data_i; $def_hint_btn = $data_i; if ($test_btn == $defaul_opt[0]) { foreach ($lines_list as $data) { if ($data['name']==$test_btn) { $show_form_mode = 'line'; $defaul_tv = 'monitor'; $defaul_btn = $test_btn; break; } } } } } echo ''; echo '
'; ?>
'; ?>
'; echo ''; echo '
'; echo ''; echo ''; echo '
'; echo ''; echo '
'; ?>
'; ?>
'; ?>
'; ?>
'; ?>
'; echo ''; ?>
'; } ?>