"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"); $lines_list = $this->dbinterface->get_db_SccpTableData('SccpExtension'); //$hint_list = $this->dbinterface->get_db_SccpTableData('SccpExtension'); $hint_list = $this->get_hint_info(true,array('context'=>'park-hints')) ; // print_r($hint_list); $line_id =0; $max_buttons =56; $show_buttons =1; //print_r($hint_list); if (!empty($_REQUEST['id'])) { $dev_id = $_REQUEST['id']; $db_buttons = $this->dbinterface->get_db_SccpTableData('get_sccpdevice_buttons', array("id" => $dev_id)); $db_device = $this->dbinterface->get_db_SccpTableData('get_sccpdevice_byid', array("id" => $dev_id)); $max_buttons = $db_device['buttons']; if (!empty($db_device['addon_buttons'])){ $max_buttons += $db_device['addon_buttons']; } $show_buttons = $max_buttons; } if (!empty($_REQUEST['new_id'])) { $val = $_REQUEST['type']; $dev_schema = $this-> getSccp_model_information('byid', false, "all", array('model' =>$val)); // $db_device = $this->dbinterface->get_db_SccpTableData('get_sccpdevice_byid', array("id" => $val)); $max_buttons = $dev_schema[0]['buttons']; if (!empty($_REQUEST['addon'])) { $val = $_REQUEST['addon']; $dev_schema = $this-> getSccp_model_information('byid', false, "all", array('model' =>$val)); $max_buttons += $dev_schema[0]['buttons']; } $show_buttons = $max_buttons; } if (!empty($_REQUEST['ru_id'])) { $dev_id = $_REQUEST['ru_id']; $db_buttons = $this->dbinterface->get_db_SccpTableData('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]; // print_r($defaul_fcod); } 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; } } } } } // print_r($def_hint_btn); // print_r($defaul_opt); echo ''; echo '
'; // echo 'Mode : '.$show_form_mode. ' opt: '; // print_r( $defaul_opt); ?>
'; ?>
'; echo ''; echo '
'; echo ''; echo ''; echo '
'; echo ''; echo '
'; ?>
'; ?>
'; ?>
'; ?>
'; ?>
'; } ?>