Begin resample Sccp_manager
more bug fix
This commit is contained in:
parent
f19109a852
commit
cce4683b52
|
@ -30,6 +30,7 @@
|
||||||
* + Change internal use Field to _Field (new feature in chan_sccp (added for Sccp_manager))
|
* + Change internal use Field to _Field (new feature in chan_sccp (added for Sccp_manager))
|
||||||
* + Delete phone XML
|
* + Delete phone XML
|
||||||
* + Change Installer ?? (test )
|
* + Change Installer ?? (test )
|
||||||
|
* - Bootstrap encodeURI(row['type']) ???????
|
||||||
* + SRST Config
|
* + SRST Config
|
||||||
* - Failover config
|
* - Failover config
|
||||||
* + Auto Addons!
|
* + Auto Addons!
|
||||||
|
@ -764,15 +765,17 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
$id_name = $dev_ids['name'];
|
$id_name = $dev_ids['name'];
|
||||||
if (empty($dev_ids['news'])) {
|
if (empty($dev_ids['news'])) {
|
||||||
$dev_data = $this->srvinterface->sccp_getdevice_info($id_name);
|
$dev_data = $this->srvinterface->sccp_getdevice_info($id_name);
|
||||||
|
if (!empty($dev_data['SCCP_Vendor']['model_id'])) {
|
||||||
// $dev_data = $this->sccp_getdevice_info($id_name);
|
// $dev_data = $this->sccp_getdevice_info($id_name);
|
||||||
$dev_addon= $dev_data['SCCP_Vendor']['model_addon'];
|
$dev_addon= $dev_data['SCCP_Vendor']['model_addon'];
|
||||||
if (empty($dev_addon)) {
|
if (empty($dev_addon)) {
|
||||||
$dev_addon = null;
|
$dev_addon = null;
|
||||||
|
}
|
||||||
|
$dev_schema = $this-> getSccp_model_information('byciscoid', false, "all", array('model' =>$dev_data['SCCP_Vendor']['model_id']));
|
||||||
|
$result[] = array('name' => $id_name, 'mac' => $id_name, 'button' => '---', 'type' => $dev_schema[0]['model'], 'new_hw' => 'Y',
|
||||||
|
'description' => '*NEW* '.$dev_ids['descr'], 'status' => '*NEW* '.$dev_ids['status'], 'address' => $dev_ids['address'],
|
||||||
|
'addon' => $dev_addon);
|
||||||
}
|
}
|
||||||
$dev_schema = $this-> getSccp_model_information('byciscoid', false, "all", array('model' =>$dev_data['SCCP_Vendor']['model_id']));
|
|
||||||
$result[] = array('name' => $id_name, 'mac' => $id_name, 'button' => '---', 'type' => $dev_schema[0]['model'], 'new_hw' => 'Y',
|
|
||||||
'description' => '*NEW* '.$dev_ids['descr'], 'status' => '*NEW* '.$dev_ids['status'], 'address' => $dev_ids['address'],
|
|
||||||
'addon' => $dev_addon);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -878,7 +881,7 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
$lines_list = $this->dbinterface->get_db_SccpTableData('SccpExtension');
|
$lines_list = $this->dbinterface->get_db_SccpTableData('SccpExtension');
|
||||||
$max_btn = ((!empty($get_settings['butonscount']) ? $get_settings['butonscount'] : 100));
|
$max_btn = ((!empty($get_settings['butonscount']) ? $get_settings['butonscount'] : 100));
|
||||||
$last_btn = $max_btn;
|
$last_btn = $max_btn;
|
||||||
for ($it = $max_btn; $it >0; $it--) {
|
for ($it = $max_btn; $it >=0; $it--) {
|
||||||
if (!empty($get_settings['button' . $it . '_type'])) {
|
if (!empty($get_settings['button' . $it . '_type'])) {
|
||||||
$last_btn = $it;
|
$last_btn = $it;
|
||||||
$btn_t = $get_settings['button' . $it . '_type'];
|
$btn_t = $get_settings['button' . $it . '_type'];
|
||||||
|
@ -950,12 +953,17 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
break;
|
break;
|
||||||
case 'line':
|
case 'line':
|
||||||
case 'silent':
|
case 'silent':
|
||||||
$btn_n = (string) $get_settings['button' . $it . '_line'];
|
if (isset($get_settings['button' . $it . '_line'])) {
|
||||||
if ($it > 0) {
|
$btn_n = (string) $get_settings['button' . $it . '_line'];
|
||||||
if ($btn_t == 'silent') {
|
if ($it > 0) {
|
||||||
$btn_n .= '!silent';
|
if ($btn_t == 'silent') {
|
||||||
$btn_t = 'line';
|
$btn_n .= '!silent';
|
||||||
|
$btn_t = 'line';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
$btn_t = 'empty';
|
||||||
|
$btn_n = '';
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'empty':
|
case 'empty':
|
||||||
|
|
|
@ -93,7 +93,7 @@ class dbinterface {
|
||||||
if (!empty($filter)) {
|
if (!empty($filter)) {
|
||||||
if (!empty($filter['model'])) {
|
if (!empty($filter['model'])) {
|
||||||
if (strpos($filter['model'],'loadInformation')) {
|
if (strpos($filter['model'],'loadInformation')) {
|
||||||
$sql = "SELECT " . $sel_inf . " FROM sccpdevmodel WHERE (`loadinformationid` =" . $filter['model'] . ") ORDER BY model ";
|
$sql = "SELECT " . $sel_inf . " FROM sccpdevmodel WHERE (`loadinformationid` ='" . $filter['model'] . "') ORDER BY model ";
|
||||||
} else {
|
} else {
|
||||||
$sql = "SELECT " . $sel_inf . " FROM sccpdevmodel WHERE (`loadinformationid` ='loadInformation" . $filter['model'] . "') ORDER BY model ";
|
$sql = "SELECT " . $sel_inf . " FROM sccpdevmodel WHERE (`loadinformationid` ='loadInformation" . $filter['model'] . "') ORDER BY model ";
|
||||||
}
|
}
|
||||||
|
@ -107,7 +107,7 @@ class dbinterface {
|
||||||
case "byid":
|
case "byid":
|
||||||
if (!empty($filter)) {
|
if (!empty($filter)) {
|
||||||
if (!empty($filter['model'])) {
|
if (!empty($filter['model'])) {
|
||||||
$sql = "SELECT " . $sel_inf . " FROM sccpdevmodel WHERE (`model` =" . $filter['model'] . ") ORDER BY model ";
|
$sql = "SELECT " . $sel_inf . " FROM sccpdevmodel WHERE (`model` ='" . $filter['model'] . "') ORDER BY model ";
|
||||||
} else {
|
} else {
|
||||||
// $sql = "SELECT ".$filter['model'];
|
// $sql = "SELECT ".$filter['model'];
|
||||||
$sql = "SELECT " . $sel_inf . " FROM sccpdevmodel ORDER BY model ";
|
$sql = "SELECT " . $sel_inf . " FROM sccpdevmodel ORDER BY model ";
|
||||||
|
|
|
@ -89,12 +89,18 @@ class srvinterface {
|
||||||
}
|
}
|
||||||
|
|
||||||
$res1 = $res3['Skinny_Phone_Type'];
|
$res1 = $res3['Skinny_Phone_Type'];
|
||||||
|
$res4 = $res3['Config_Phone_Type'];
|
||||||
if (!empty($res3['Addons'])) {
|
if (!empty($res3['Addons'])) {
|
||||||
$res2 = $res3['Addons'];
|
$res2 = $res3['Addons'];
|
||||||
} else {
|
} else {
|
||||||
$res2 = '';
|
$res2 = '';
|
||||||
}
|
}
|
||||||
$res3['SCCP_Vendor']= Array('vendor' => strtok($res1,' '),'model' => strtok('('), 'model_id' => strtok(')'), 'vendor_addon' => strtok($res2,' '), 'model_addon' => strtok(' '));
|
$res3['SCCP_Vendor']= Array('vendor' => strtok($res1,' '),'model' => strtok('('), 'model_id' => strtok(')'), 'vendor_addon' => strtok($res2,' '), 'model_addon' => strtok(' '));
|
||||||
|
if (empty($res3['SCCP_Vendor']['vendor']) || $res3['SCCP_Vendor']['vendor']=='Undefined'){
|
||||||
|
$res3['SCCP_Vendor']= Array('vendor' => 'Undefined','model' => $res4, 'model_id' => '', 'vendor_addon' => $res3['SCCP_Vendor']['vendor_addon'], 'model_addon' => $res3['SCCP_Vendor']['model_addon']);
|
||||||
|
// return $res4;
|
||||||
|
// return array();
|
||||||
|
}
|
||||||
return $res3;
|
return $res3;
|
||||||
} else {
|
} else {
|
||||||
return array();
|
return array();
|
||||||
|
|
|
@ -284,8 +284,8 @@ $(document).ready(function () {
|
||||||
// var btn_add=$('#sccp_hw_addon').find(':selected').data('val');
|
// var btn_add=$('#sccp_hw_addon').find(':selected').data('val');
|
||||||
|
|
||||||
if (type_id === 1) {
|
if (type_id === 1) {
|
||||||
if ($('#sccp_hw_addon').val() !== 'none') {
|
if ($('#sccp_hw_addon').val() !== 'NONE') {
|
||||||
$('#sccp_hw_addon').val('none').change();
|
$('#sccp_hw_addon').val('NONE').change();
|
||||||
}
|
}
|
||||||
$('#sccp_hw_addon').attr("disabled", "disabled");
|
$('#sccp_hw_addon').attr("disabled", "disabled");
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,8 @@ class Sccp extends \FreePBX\modules\Core\Driver {
|
||||||
"prettyName" => _("Sccp Custom Driver"),
|
"prettyName" => _("Sccp Custom Driver"),
|
||||||
"shortName" => "SCCP",
|
"shortName" => "SCCP",
|
||||||
"description" => _("Sccp Device"),
|
"description" => _("Sccp Device"),
|
||||||
"sccp_driver_ver" => "11.2"
|
"sccp_driver_ver" => "11.2",
|
||||||
|
"about" => "Sccp mysql class Base ver: 11.2, Sccp ver: default"
|
||||||
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,8 @@ class Sccp extends \FreePBX\modules\Core\Driver {
|
||||||
"prettyName" => _("Sccp Custom Driver"),
|
"prettyName" => _("Sccp Custom Driver"),
|
||||||
"shortName" => "SCCP",
|
"shortName" => "SCCP",
|
||||||
"description" => _("Sccp Device"),
|
"description" => _("Sccp Device"),
|
||||||
"sccp_driver_ver" => "11.2"
|
"sccp_driver_ver" => "11.2",
|
||||||
|
"about" => "Sccp mysql class Base ver: 11.2, Sccp ver: 431"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
public function addDevice1($id, $settings) {
|
public function addDevice1($id, $settings) {
|
||||||
|
|
|
@ -27,6 +27,13 @@ and open the template in the editor. Base Version before all crash :-)
|
||||||
</input>
|
</input>
|
||||||
<help>Help.</help>
|
<help>Help.</help>
|
||||||
</item>
|
</item>
|
||||||
|
<item type="IE" id="1" seq="99"><label>Phone ssh login</label>
|
||||||
|
<input>
|
||||||
|
<name>sccp_xml_about</name>
|
||||||
|
<default>XML Base ver: 11.2, Sccp ver: default</default>
|
||||||
|
</input>
|
||||||
|
<help>Help.</help>
|
||||||
|
</item>
|
||||||
|
|
||||||
</page_group>
|
</page_group>
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,13 @@ and open the template in the editor. Base Version before all crash :-)
|
||||||
</input>
|
</input>
|
||||||
<help>Help.</help>
|
<help>Help.</help>
|
||||||
</item>
|
</item>
|
||||||
|
<item type="IE" id="1" seq="99"><label>Phone ssh login</label>
|
||||||
|
<input>
|
||||||
|
<name>sccp_xml_about</name>
|
||||||
|
<default>XML Base ver: 11.2, Sccp ver: 431</default>
|
||||||
|
</input>
|
||||||
|
<help>Help.</help>
|
||||||
|
</item>
|
||||||
|
|
||||||
</page_group>
|
</page_group>
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ $sofkey_list = \FreePBX::Sccp_manager()-> srvinterface -> sccp_list_keysets();
|
||||||
$model_list = \FreePBX::Sccp_manager()->dbinterface->get_db_SccpTableData("HWDevice");
|
$model_list = \FreePBX::Sccp_manager()->dbinterface->get_db_SccpTableData("HWDevice");
|
||||||
$extension_list = \FreePBX::Sccp_manager()->dbinterface->get_db_SccpTableData("HWextension");
|
$extension_list = \FreePBX::Sccp_manager()->dbinterface->get_db_SccpTableData("HWextension");
|
||||||
|
|
||||||
$extension_list[]=array(model=>'none', vendor=>'CISCO', dns=>'0');
|
$extension_list[]=array(model=>'NONE', vendor=>'CISCO', dns=>'0');
|
||||||
|
|
||||||
$items = $itm -> children();
|
$items = $itm -> children();
|
||||||
|
|
||||||
|
|
|
@ -5,15 +5,12 @@
|
||||||
* and open the template in the editor.
|
* and open the template in the editor.
|
||||||
*/
|
*/
|
||||||
// vim: set ai ts=4 sw=4 ft=phtml:
|
// vim: set ai ts=4 sw=4 ft=phtml:
|
||||||
// print_r($this->sccpvalues['sccp_compatible']);
|
// print_r($this->sccpvalues['sccp_compatible']);
|
||||||
// print_r($this->sccpvalues);
|
// print_r($this->sccpvalues);
|
||||||
// $id_name = 'SEP000A8A5C5F25';
|
|
||||||
// print_r($this->srvinterface->getChanSCCPVersion());
|
|
||||||
// print_r('<br>');
|
|
||||||
// print_r($this->srvinterface->getCoreSCCPVersion());
|
// print_r($this->srvinterface->getCoreSCCPVersion());
|
||||||
// $lang_arr = $this->extconfigs->getextConfig('sccp_lang','sk_SK');
|
// $lang_arr = $this->extconfigs->getextConfig('sccp_lang','sk_SK');
|
||||||
// print_r('<br>');
|
// print_r('<br>');
|
||||||
// print_r(timezone_identifiers_list());
|
// print_r(timezone_identifiers_list());
|
||||||
// print_r('<br>');
|
// print_r('<br>');
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue