Renamed templet -> template
Added a couple of comments Reworded some of the labels Corrected a couple of spelling mistakes
This commit is contained in:
parent
a9d39764b1
commit
47eebdb07c
|
@ -18,3 +18,5 @@ Then the placed calls list will include the status of the remote extension, like
|
||||||
PlacedCalls
|
PlacedCalls
|
||||||
|
|
||||||
Which does show numbers you can redial, but also include their current device state, so you know when they are currently busy. Note that the other phonebook entries will now also monitor the remove device state and show the current device state.
|
Which does show numbers you can redial, but also include their current device state, so you know when they are currently busy. Note that the other phonebook entries will now also monitor the remove device state and show the current device state.
|
||||||
|
|
||||||
|
Note: the hints for the extension need to be in the same context as the device/global context, for callLogBlfEnabled to work
|
||||||
|
|
|
@ -12,7 +12,6 @@ Set background image server side
|
||||||
|
|
||||||
Background images can be set up server side in sccp.conf for most modern Cisco IP Phones by using a parameter in the device section. This image is pushed to the phone upon every restart.
|
Background images can be set up server side in sccp.conf for most modern Cisco IP Phones by using a parameter in the device section. This image is pushed to the phone upon every restart.
|
||||||
|
|
||||||
|
|
||||||
[SEPXXXXXXXXX]
|
[SEPXXXXXXXXX]
|
||||||
...
|
...
|
||||||
backgroundImage=http://PATH-TO-BACKGROUND-IMAGE/filename.png
|
backgroundImage=http://PATH-TO-BACKGROUND-IMAGE/filename.png
|
||||||
|
@ -26,12 +25,12 @@ Enable user to pick a custom background image
|
||||||
|
|
||||||
When a user is allowed to pick his own background image in the user settings (true in device section of the SEPXXXX.xml config file), the phone searches for the List.xml (case-sensitive) file in the following directories. Depending on the phone model, the required file properties are as follows:
|
When a user is allowed to pick his own background image in the user settings (true in device section of the SEPXXXX.xml config file), the phone searches for the List.xml (case-sensitive) file in the following directories. Depending on the phone model, the required file properties are as follows:
|
||||||
Phone Model Image Size Thumbnail Size Directory
|
Phone Model Image Size Thumbnail Size Directory
|
||||||
7906 / 7911 95x34 23x8 /Desktops/95x34x1
|
7906 / 7911 95x34 23x8 /Desktops/95x34x1
|
||||||
7941 / 7961 320x196 80x49 /Desktops/320x196x4
|
7941 / 7961 320x196 80x49 /Desktops/320x196x4
|
||||||
7942 / 7962 320x196 80x49 /Desktops/320x196x4
|
7942 / 7962 320x196 80x49 /Desktops/320x196x4
|
||||||
7945 / 7965 320x212 80x53 /Desktops/320x212x16
|
7945 / 7965 320x212 80x53 /Desktops/320x212x16
|
||||||
7970 / 7971 320x212 80x53 /Desktops/320x212x12
|
7970 / 7971 320x212 80x53 /Desktops/320x212x12
|
||||||
7975 320x216 80x53 /Desktops/320x216x16
|
7975 320x216 80x53 /Desktops/320x216x16
|
||||||
7985 800x600 not supported /Desktops/800x600x16
|
7985 800x600 not supported /Desktops/800x600x16
|
||||||
8941 / 8945 640x480 123x111 /Desktops/640x480x24
|
8941 / 8945 640x480 123x111 /Desktops/640x480x24
|
||||||
|
|
||||||
|
@ -46,3 +45,13 @@ The Image file is used for the background of the phone display. An additional th
|
||||||
|
|
||||||
While the resolution is fix, the phones are able to reduce the color depth if the original image uses too many colors.
|
While the resolution is fix, the phones are able to reduce the color depth if the original image uses too many colors.
|
||||||
|
|
||||||
|
Note: This can also be done using the SEP....cnf.xml file
|
||||||
|
<device>
|
||||||
|
...
|
||||||
|
<commonProfile>
|
||||||
|
<defaultBackground>TFTP/HTTP/HTTPS URL</defaultBackground>
|
||||||
|
<backgroundImageAccess>true/false</backgroundImageAccess> <!-- allowing users to change the background -->
|
||||||
|
</commonProfile>
|
||||||
|
<phonePersonalization>1</phonePersonalization> <!-- allowing users to change the background -->
|
||||||
|
...
|
||||||
|
</device>
|
|
@ -7,5 +7,5 @@
|
||||||
в Sccp_manager.class.php
|
в Sccp_manager.class.php
|
||||||
// "sccpdialplan" => array(
|
// "sccpdialplan" => array(
|
||||||
// "name" => _("SCCP Dial Plan information"),
|
// "name" => _("SCCP Dial Plan information"),
|
||||||
// "page" => 'views/server.dialtemplet.php'
|
// "page" => 'views/server.dialtemplate.php'
|
||||||
// )
|
// )
|
||||||
|
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
*~
|
|
@ -55,7 +55,7 @@ Make sure you have the following installed on your system:
|
||||||
|
|
||||||
- TFTP Server running under (recomended) /tftpboot/ [See our WIKI] (https://github.com/chan-sccp/chan-sccp/wiki/setup-tftp-service)
|
- TFTP Server running under (recomended) /tftpboot/ [See our WIKI] (https://github.com/chan-sccp/chan-sccp/wiki/setup-tftp-service)
|
||||||
- You will need the phone settings templates. You can use the templates taken from the distribution "chan-sccp"
|
- You will need the phone settings templates. You can use the templates taken from the distribution "chan-sccp"
|
||||||
sample: copy /usr/src/chan-sccp/conf/tftp/*.xml* /tftpboot/templets/
|
sample: copy /usr/src/chan-sccp/conf/tftp/*.xml* /tftpboot/templates/
|
||||||
|
|
||||||
- cofigure DHCP server [See our WIKI] (https://github.com/chan-sccp/chan-sccp/wiki/setup-dhcp-service)
|
- cofigure DHCP server [See our WIKI] (https://github.com/chan-sccp/chan-sccp/wiki/setup-dhcp-service)
|
||||||
|
|
||||||
|
|
|
@ -15,22 +15,34 @@
|
||||||
* + Cisco Format Mac
|
* + Cisco Format Mac
|
||||||
* + Model Information
|
* + Model Information
|
||||||
* + Device Right Menu
|
* + Device Right Menu
|
||||||
|
|
||||||
|
<!-- Dial Templates are not really needed for skinny, skinny get's direct feed back from asterisk per digit -->
|
||||||
|
<!-- If your dialplan is finite (completely fixed length (depends on your country dialplan) dialplan, then dial templates are not required) -->
|
||||||
|
<!-- As far as i know FreePBX does also attempt to build a finite dialplan -->
|
||||||
|
<!-- Having to maintain both an asterisk dialplan and these skinny dial templates is annoying -->
|
||||||
|
|
||||||
* + Dial Templates + Configuration
|
* + Dial Templates + Configuration
|
||||||
* + Dial Templates in Global Configuration ( Enabled / Disabled ; default templet )
|
* + Dial Templates in Global Configuration ( Enabled / Disabled ; default template )
|
||||||
* ? Dial Templates - Hoto IT Include in XML.Config ???????
|
* ? Dial Templates - Howto IT Include in XML.Config ???????
|
||||||
* - Dial Templates in device Configuration ( Enabled / inheret / Disabled ; templet )
|
* - Dial Templates in device Configuration ( Enabled / inheret / Disabled ; template )
|
||||||
|
|
||||||
* - WiFi Config (Bulk Deployment Utility for Cisco 7921, 7925, 7926)?????
|
* - WiFi Config (Bulk Deployment Utility for Cisco 7921, 7925, 7926)?????
|
||||||
* + Change internal use Field to _Field (new fiture support in chan_sccp )
|
* + 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 )
|
||||||
* - Auto Addons!
|
* - Auto Addons!
|
||||||
* + DND Mode
|
* + DND Mode
|
||||||
* + secondary_dialtone_digits = "" line config
|
* + secondary_dialtone_digits = "" line config
|
||||||
* + secondary_dialtone_tone = 0x22 line config
|
* + secondary_dialtone_tone = 0x22 line config
|
||||||
* - suport kvstore ?????
|
* - support kv-store ?????
|
||||||
* + Shared Line
|
* + Shared Line
|
||||||
* - bug Fix ...(K no w bug? no fix)
|
* - bug Fix ...(K no w bug? no fix)
|
||||||
*
|
*
|
||||||
|
* * I think this file should be split in 3 parts (as in Model-View-Controller(MVC))
|
||||||
|
* * XML/Database Parts -> Model directory
|
||||||
|
* * Processing parts -> Controller directory
|
||||||
|
* * Ajax Handler Parts -> Controller directory
|
||||||
|
* * Result parts -> View directory
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace FreePBX\modules;
|
namespace FreePBX\modules;
|
||||||
|
@ -57,10 +69,12 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
public $sccp_conf_init = array();
|
public $sccp_conf_init = array();
|
||||||
public $sccpDefaults = array(
|
public $sccpDefaults = array(
|
||||||
"servername" => 'VPBXSCCP',
|
"servername" => 'VPBXSCCP',
|
||||||
"bindaddr" => '0.0.0.0', "port" => '2000',
|
"bindaddr" => '0.0.0.0', "port" => '2000', # chan_sccp also supports ipv6
|
||||||
|
# bindaddr = "::" will support ipv6 and ipv4 at the same time
|
||||||
"deny" => '0.0.0.0/0.0.0.0',
|
"deny" => '0.0.0.0/0.0.0.0',
|
||||||
"permit" => '0.0.0.0/0.0.0.0',
|
"permit" => '0.0.0.0/0.0.0.0', # defaults to 'internal' which means:
|
||||||
"dateformat" => 'D.M.Y',
|
# permit:127.0.0.0/255.0.0.0,permit:10.0.0.0/255.0.0.0,permit:172.0.0.0/255.224.0.0,permit:192.168.0.0/255.255.0.0"
|
||||||
|
"dateformat" => 'D.M.Y', # This is the german default format. Should be "D/M/Y" or "D/M/YA" instead
|
||||||
"disallow" => 'all', "allow" => 'alaw;ulaw',
|
"disallow" => 'all', "allow" => 'alaw;ulaw',
|
||||||
"devicetable" => 'sccpdevice',
|
"devicetable" => 'sccpdevice',
|
||||||
"linetable" => 'sccpline',
|
"linetable" => 'sccpline',
|
||||||
|
@ -131,29 +145,23 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
$this->db = $freepbx->Database;
|
$this->db = $freepbx->Database;
|
||||||
$this->cnf_wr = \FreePBX::WriteConfig();
|
$this->cnf_wr = \FreePBX::WriteConfig();
|
||||||
$this->cnf_read = \FreePBX::LoadConfig();
|
$this->cnf_read = \FreePBX::LoadConfig();
|
||||||
|
|
||||||
|
|
||||||
$this->v = new \Respect\Validation\Validator();
|
$this->v = new \Respect\Validation\Validator();
|
||||||
|
|
||||||
$this->getSccpSettingsDB(false); // Overwrite Exist
|
$this->getSccpSettingsDB(false); // Overwrite Exist
|
||||||
// $this->getSccpSetingINI(false); // get from sccep.ini
|
// $this->getSccpSetingINI(false); // get from sccep.ini
|
||||||
$this->init_sccp_path();
|
$this->init_sccp_path();
|
||||||
$this->initVarfromDefs();
|
$this->initVarfromDefs();
|
||||||
$this->initTftpLang();
|
$this->initTftpLang();
|
||||||
|
|
||||||
|
|
||||||
// Load Advanced Form Constuctor Data
|
// Load Advanced Form Constuctor Data
|
||||||
if (file_exists(__DIR__ . '/views/sccpgeneral.xml')) {
|
if (file_exists(__DIR__ . '/views/sccpgeneral.xml')) {
|
||||||
$this->xml_data = simplexml_load_file(__DIR__ . '/views/sccpgeneral.xml');
|
$this->xml_data = simplexml_load_file(__DIR__ . '/views/sccpgeneral.xml');
|
||||||
$this->initVarfromXml(); // Overwrite Exist
|
$this->initVarfromXml(); // Overwrite Exist
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Generate Input elements in Html Code from sccpgeneral.xml
|
* Generate Input elements in Html Code from sccpgeneral.xml
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public function ShowGroup($grup_name, $heder_show, $form_prefix = 'sccp', $form_values = null) {
|
public function ShowGroup($grup_name, $heder_show, $form_prefix = 'sccp', $form_values = null) {
|
||||||
$htmlret = "";
|
$htmlret = "";
|
||||||
if (empty($form_values)) {
|
if (empty($form_values)) {
|
||||||
|
@ -176,7 +184,6 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
/*
|
/*
|
||||||
* Load config vars from base array
|
* Load config vars from base array
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public function initVarfromDefs() {
|
public function initVarfromDefs() {
|
||||||
foreach ($this->sccpDefaults as $key => $value) {
|
foreach ($this->sccpDefaults as $key => $value) {
|
||||||
if (empty($this->sccpvalues[$key])) {
|
if (empty($this->sccpvalues[$key])) {
|
||||||
|
@ -188,7 +195,6 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
/*
|
/*
|
||||||
* Load config vars from xml
|
* Load config vars from xml
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public function initVarfromXml() {
|
public function initVarfromXml() {
|
||||||
if ((array) $this->xml_data) {
|
if ((array) $this->xml_data) {
|
||||||
foreach ($this->xml_data->xpath('//page_group') as $item) {
|
foreach ($this->xml_data->xpath('//page_group') as $item) {
|
||||||
|
@ -390,7 +396,7 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
$this->pagedata = array(
|
$this->pagedata = array(
|
||||||
"general" => array(
|
"general" => array(
|
||||||
"name" => _("SCCP Dial Plan information"),
|
"name" => _("SCCP Dial Plan information"),
|
||||||
"page" => 'views/form.dptemplet.php'
|
"page" => 'views/form.dptemplate.php'
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
@ -406,7 +412,7 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
),
|
),
|
||||||
// "sccpdialplan" => array(
|
// "sccpdialplan" => array(
|
||||||
// "name" => _("SCCP Dial Plan information"),
|
// "name" => _("SCCP Dial Plan information"),
|
||||||
// "page" => 'views/server.dialtemplet.php'
|
// "page" => 'views/server.dialtemplate.php'
|
||||||
// )
|
// )
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
@ -513,7 +519,7 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
switch ($req) {
|
switch ($req) {
|
||||||
case 'savesettings':
|
case 'savesettings':
|
||||||
case "save_hardware":
|
case "save_hardware":
|
||||||
case "save_dp_templet":
|
case "save_dp_template":
|
||||||
case "delete_hardware":
|
case "delete_hardware":
|
||||||
case "getPhoneGrid":
|
case "getPhoneGrid":
|
||||||
case "getExtensionGrid":
|
case "getExtensionGrid":
|
||||||
|
@ -561,7 +567,7 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
return $this->save_hw_phone($request);
|
return $this->save_hw_phone($request);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case "save_dp_templet":
|
case "save_dp_template":
|
||||||
$res = $this->save_DialPlant($request);
|
$res = $this->save_DialPlant($request);
|
||||||
if (empty($res)) {
|
if (empty($res)) {
|
||||||
return array('status' => true, 'search' => '?display=sccp_adv', 'hash' => 'sccpdialplan');
|
return array('status' => true, 'search' => '?display=sccp_adv', 'hash' => 'sccpdialplan');
|
||||||
|
@ -626,11 +632,11 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
break;
|
break;
|
||||||
case 'model_add':
|
case 'model_add':
|
||||||
$save_settings = array();
|
$save_settings = array();
|
||||||
$key_name = array('model', 'vendor', 'dns', 'buttons', 'loadimage', 'loadinformationid', 'nametemplet');
|
$key_name = array('model', 'vendor', 'dns', 'buttons', 'loadimage', 'loadinformationid', 'nametemplate');
|
||||||
$upd_mode = 'replace';
|
$upd_mode = 'replace';
|
||||||
case 'model_update':
|
case 'model_update':
|
||||||
if ($request['command'] == 'model_update') {
|
if ($request['command'] == 'model_update') {
|
||||||
$key_name = array('model', 'loadimage', 'nametemplet');
|
$key_name = array('model', 'loadimage', 'nametemplate');
|
||||||
$upd_mode = 'update';
|
$upd_mode = 'update';
|
||||||
}
|
}
|
||||||
if (!empty($request['model'])) {
|
if (!empty($request['model'])) {
|
||||||
|
@ -1577,10 +1583,10 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!empty($this->sccppath["tftp_path"])) {
|
if (!empty($this->sccppath["tftp_path"])) {
|
||||||
$this->sccppath["tftp_templets"] = $this->sccppath["tftp_path"] . '/templets';
|
$this->sccppath["tftp_templates"] = $this->sccppath["tftp_path"] . '/templates';
|
||||||
if (!file_exists($this->sccppath["tftp_templets"])) {
|
if (!file_exists($this->sccppath["tftp_templates"])) {
|
||||||
if (!mkdir($this->sccppath["tftp_templets"], 0777, true)) {
|
if (!mkdir($this->sccppath["tftp_templates"], 0777, true)) {
|
||||||
die('Error create templet dir');
|
die('Error create template dir');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1588,7 +1594,7 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
$this->sccppath["tftp_DP"] = $this->sccppath["tftp_path"] . '/Dialplan';
|
$this->sccppath["tftp_DP"] = $this->sccppath["tftp_path"] . '/Dialplan';
|
||||||
if (!file_exists($this->sccppath["tftp_DP"])) {
|
if (!file_exists($this->sccppath["tftp_DP"])) {
|
||||||
if (!mkdir($this->sccppath["tftp_DP"], 0777, true)) {
|
if (!mkdir($this->sccppath["tftp_DP"], 0777, true)) {
|
||||||
die('Error create DialPlan templet dir');
|
die('Error create DialPlan template dir');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1597,9 +1603,9 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!file_exists($this->sccppath["tftp_templets"] . '/XMLDefault.cnf.xml_template')) {
|
if (!file_exists($this->sccppath["tftp_templates"] . '/XMLDefault.cnf.xml_template')) {
|
||||||
$src_path = $_SERVER['DOCUMENT_ROOT'] . '/admin/modules/sccp_manager/conf/';
|
$src_path = $_SERVER['DOCUMENT_ROOT'] . '/admin/modules/sccp_manager/conf/';
|
||||||
$dst_path = $this->sccppath["tftp_templets"] . '/';
|
$dst_path = $this->sccppath["tftp_templates"] . '/';
|
||||||
foreach (glob($src_path . '*.*_template') as $filename) {
|
foreach (glob($src_path . '*.*_template') as $filename) {
|
||||||
copy($filename, $dst_path . basename($filename));
|
copy($filename, $dst_path . basename($filename));
|
||||||
}
|
}
|
||||||
|
@ -1693,7 +1699,7 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
$save_data = array();
|
$save_data = array();
|
||||||
$integer_msg = _("%s must be a non-negative integer");
|
$integer_msg = _("%s must be a non-negative integer");
|
||||||
$errors = array();
|
$errors = array();
|
||||||
foreach ($get_settings[$hdr_arprefix.'dialtemplete'] as $key => $value) {
|
foreach ($get_settings[$hdr_arprefix.'dialtemplatee'] as $key => $value) {
|
||||||
$xmlstr .= '<TEMPLATE';
|
$xmlstr .= '<TEMPLATE';
|
||||||
if (!empty($value['match'])) {
|
if (!empty($value['match'])) {
|
||||||
foreach ($dialFelds as $fld){
|
foreach ($dialFelds as $fld){
|
||||||
|
@ -1712,12 +1718,12 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
$xmlstr .= "/>\n";
|
$xmlstr .= "/>\n";
|
||||||
}
|
}
|
||||||
$xmlstr .= '</DIALTEMPLATE>';
|
$xmlstr .= '</DIALTEMPLATE>';
|
||||||
if (!empty($get_settings['idtemplet'])) {
|
if (!empty($get_settings['idtemplate'])) {
|
||||||
if ($get_settings['idtemplet'] == '*new*') {
|
if ($get_settings['idtemplate'] == '*new*') {
|
||||||
if (!empty($get_settings[$hdr_prefix.'dialtemplete_name'])) {
|
if (!empty($get_settings[$hdr_prefix.'dialtemplatee_name'])) {
|
||||||
$put_file = (string)$get_settings[$hdr_prefix.'dialtemplete_name'];
|
$put_file = (string)$get_settings[$hdr_prefix.'dialtemplatee_name'];
|
||||||
} else { $errors = array('Fields Dial Plan Name is requered !!'); }
|
} else { $errors = array('Fields Dial Plan Name is requered !!'); }
|
||||||
} else $put_file = (string)$get_settings['idtemplet'];
|
} else $put_file = (string)$get_settings['idtemplate'];
|
||||||
} else { $errors = array('Fields Dial Plan Name is requered !!'); }
|
} else { $errors = array('Fields Dial Plan Name is requered !!'); }
|
||||||
|
|
||||||
if (empty($errors)) {
|
if (empty($errors)) {
|
||||||
|
@ -1835,10 +1841,10 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
$def_xml_fields = array('authenticationURL', 'informationURL', 'messagesURL', 'servicesURL', 'directoryURL', 'proxyServerURL', 'idleTimeout', 'idleURL');
|
$def_xml_fields = array('authenticationURL', 'informationURL', 'messagesURL', 'servicesURL', 'directoryURL', 'proxyServerURL', 'idleTimeout', 'idleURL');
|
||||||
$def_xml_locale = array('userLocale', 'networkLocaleInfo', 'networkLocale');
|
$def_xml_locale = array('userLocale', 'networkLocaleInfo', 'networkLocale');
|
||||||
$xml_name = $this->sccppath["tftp_path"] . '/XMLDefault.cnf.xml';
|
$xml_name = $this->sccppath["tftp_path"] . '/XMLDefault.cnf.xml';
|
||||||
$xml_templet = $this->sccppath["tftp_templets"] . '/XMLDefault.cnf.xml_template';
|
$xml_template = $this->sccppath["tftp_templates"] . '/XMLDefault.cnf.xml_template';
|
||||||
|
|
||||||
if (file_exists($xml_templet)) {
|
if (file_exists($xml_template)) {
|
||||||
$xml_work = simplexml_load_file($xml_templet);
|
$xml_work = simplexml_load_file($xml_template);
|
||||||
|
|
||||||
|
|
||||||
$xnode = &$xml_work->callManagerGroup->members;
|
$xnode = &$xml_work->callManagerGroup->members;
|
||||||
|
@ -1935,14 +1941,14 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(empty($var_hw_config['nametemplet']))) {
|
if (!(empty($var_hw_config['nametemplate']))) {
|
||||||
$xml_templet = $this->sccppath["tftp_templets"] . '/' . $var_hw_config['nametemplet'];
|
$xml_template = $this->sccppath["tftp_templates"] . '/' . $var_hw_config['nametemplate'];
|
||||||
} else {
|
} else {
|
||||||
$xml_templet = $this->sccppath["tftp_templets"] . '/SEP0000000000.cnf.xml_79df_template';
|
$xml_template = $this->sccppath["tftp_templates"] . '/SEP0000000000.cnf.xml_79df_template';
|
||||||
}
|
}
|
||||||
$xml_name = $this->sccppath["tftp_path"] . '/' . $dev_id . '.cnf.xml';
|
$xml_name = $this->sccppath["tftp_path"] . '/' . $dev_id . '.cnf.xml';
|
||||||
if (file_exists($xml_templet)) {
|
if (file_exists($xml_template)) {
|
||||||
$xml_work = simplexml_load_file($xml_templet);
|
$xml_work = simplexml_load_file($xml_template);
|
||||||
/*
|
/*
|
||||||
$node = $xml_work -> certHash;
|
$node = $xml_work -> certHash;
|
||||||
if ( !empty($node)) {F
|
if ( !empty($node)) {F
|
||||||
|
@ -2076,7 +2082,7 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
// print_r($xml_work);
|
// print_r($xml_work);
|
||||||
$xml_work->asXml($xml_name); // Save
|
$xml_work->asXml($xml_name); // Save
|
||||||
} else {
|
} else {
|
||||||
die('Error Hardware templete :' . $xml_templet . ' not found');
|
die('Error Hardware templatee :' . $xml_template . ' not found');
|
||||||
}
|
}
|
||||||
return time();
|
return time();
|
||||||
}
|
}
|
||||||
|
@ -2167,7 +2173,7 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
$raw_settings = sql($sql, "getAll", DB_FETCHMODE_ASSOC);
|
$raw_settings = sql($sql, "getAll", DB_FETCHMODE_ASSOC);
|
||||||
break;
|
break;
|
||||||
case "get_sccpdevice_byid":
|
case "get_sccpdevice_byid":
|
||||||
$sql = 'SELECT t1.*, types.dns, types.buttons, types.loadimage, types.nametemplet as nametemplet, '
|
$sql = 'SELECT t1.*, types.dns, types.buttons, types.loadimage, types.nametemplate as nametemplate, '
|
||||||
. 'addon.buttons as addon_buttons FROM sccpdevice AS t1 '
|
. 'addon.buttons as addon_buttons FROM sccpdevice AS t1 '
|
||||||
. 'LEFT JOIN sccpdevmodel as types ON t1.type=types.model '
|
. 'LEFT JOIN sccpdevmodel as types ON t1.type=types.model '
|
||||||
. 'LEFT JOIN sccpdevmodel as addon ON t1.addon=addon.model WHERE name="' . $data['id'] . '";';
|
. 'LEFT JOIN sccpdevmodel as addon ON t1.addon=addon.model WHERE name="' . $data['id'] . '";';
|
||||||
|
@ -2207,7 +2213,7 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
$file_ext = array('.loads', '.LOADS', '.sbn', '.SBN', '.bin', '.BIN');
|
$file_ext = array('.loads', '.LOADS', '.sbn', '.SBN', '.bin', '.BIN');
|
||||||
|
|
||||||
$dir = $this->sccppath["tftp_path"];
|
$dir = $this->sccppath["tftp_path"];
|
||||||
$dir_tepl = $this->sccppath["tftp_templets"];
|
$dir_tepl = $this->sccppath["tftp_templates"];
|
||||||
switch ($format_list) {
|
switch ($format_list) {
|
||||||
case "model":
|
case "model":
|
||||||
$sel_inf = "model, vendor, dns, buttons";
|
$sel_inf = "model, vendor, dns, buttons";
|
||||||
|
@ -2287,8 +2293,8 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
} else {
|
} else {
|
||||||
$raw_settings[$i]['validate'] = '-;';
|
$raw_settings[$i]['validate'] = '-;';
|
||||||
}
|
}
|
||||||
if (!empty($raw_settings[$i]['nametemplet'])) {
|
if (!empty($raw_settings[$i]['nametemplate'])) {
|
||||||
$file = $dir_tepl . '/' . $raw_settings[$i]['nametemplet'];
|
$file = $dir_tepl . '/' . $raw_settings[$i]['nametemplate'];
|
||||||
if (file_exists($file)) {
|
if (file_exists($file)) {
|
||||||
$raw_settings[$i]['validate'] .= 'yes';
|
$raw_settings[$i]['validate'] .= 'yes';
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -33,8 +33,8 @@ $(document).ready(function () {
|
||||||
if ($('.fpbx-submit').data('id') == "hw_edit") {
|
if ($('.fpbx-submit').data('id') == "hw_edit") {
|
||||||
snd_command = 'save_hardware';
|
snd_command = 'save_hardware';
|
||||||
}
|
}
|
||||||
if ($('.fpbx-submit').data('id') == "dial_templet") {
|
if ($('.fpbx-submit').data('id') == "dial_template") {
|
||||||
snd_command = 'save_dp_templet';
|
snd_command = 'save_dp_template';
|
||||||
}
|
}
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
|
@ -68,8 +68,8 @@ $(document).ready(function () {
|
||||||
if ($('.fpbx-submit').data('id') == "hw_edit") {
|
if ($('.fpbx-submit').data('id') == "hw_edit") {
|
||||||
snd_command = 'save_hardware';
|
snd_command = 'save_hardware';
|
||||||
}
|
}
|
||||||
if ($('.fpbx-submit').data('id') == "dial_templet") {
|
if ($('.fpbx-submit').data('id') == "dial_template") {
|
||||||
snd_command = 'save_dp_templet';
|
snd_command = 'save_dp_template';
|
||||||
}
|
}
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
|
@ -386,7 +386,7 @@ $(document).ready(function () {
|
||||||
if ($(this).data('id') === 'model_add') {
|
if ($(this).data('id') === 'model_add') {
|
||||||
var dev_cmd = 'model_add';
|
var dev_cmd = 'model_add';
|
||||||
// var dev_fld = ["model","vendor","dns","buttons","loadimage","loadinformationid","validate","enabled"];
|
// var dev_fld = ["model","vendor","dns","buttons","loadimage","loadinformationid","validate","enabled"];
|
||||||
var dev_fld = ["model", "vendor", "dns", "buttons", "loadimage", "loadinformationid", "nametemplet"];
|
var dev_fld = ["model", "vendor", "dns", "buttons", "loadimage", "loadinformationid", "nametemplate"];
|
||||||
datas = 'enabled=0' + '&';
|
datas = 'enabled=0' + '&';
|
||||||
|
|
||||||
for (var i = 0; i < dev_fld.length; i++) {
|
for (var i = 0; i < dev_fld.length; i++) {
|
||||||
|
@ -398,7 +398,7 @@ $(document).ready(function () {
|
||||||
}
|
}
|
||||||
if ($(this).data('id') === 'model_applay') {
|
if ($(this).data('id') === 'model_applay') {
|
||||||
var dev_cmd = 'model_update';
|
var dev_cmd = 'model_update';
|
||||||
var dev_fld = ["model", "loadimage", "nametemplet"];
|
var dev_fld = ["model", "loadimage", "nametemplate"];
|
||||||
datas = '';
|
datas = '';
|
||||||
for (var i = 0; i < dev_fld.length; i++) {
|
for (var i = 0; i < dev_fld.length; i++) {
|
||||||
datas = datas + dev_fld[i] + '=' + $('#editd_' + dev_fld[i]).val() + '&';
|
datas = datas + dev_fld[i] + '=' + $('#editd_' + dev_fld[i]).val() + '&';
|
||||||
|
|
|
@ -164,37 +164,41 @@ class Sccp extends \FreePBX\modules\Core\Driver {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# ??? Would it not be better to put this part in the view directory (MVC) ?
|
||||||
public function getDeviceDisplay($display, $deviceInfo, $currentcomponent, $primarySection) {
|
public function getDeviceDisplay($display, $deviceInfo, $currentcomponent, $primarySection) {
|
||||||
$section = _("Settings");
|
$section = _("Settings");
|
||||||
$category = "general";
|
$category = "general";
|
||||||
$tmparr = array();
|
$tmparr = array();
|
||||||
$tt = _("The SCCP channel number for this port.");
|
$tt = _("The maximum number of incoming calls to this line.");
|
||||||
$tmparr['incominglimit'] = array('prompttext' => _('Line incoming limit'), 'value' => '2', 'tt' => $tt, 'level' => 0, 'jsvalidation' => 'isEmpty()', 'failvalidationmsg' => $msgInvalidChannel);
|
$tmparr['incominglimit'] = array('prompttext' => _('Line incoming limit'), 'value' => '2', 'tt' => $tt, 'level' => 0, 'jsvalidation' => 'isEmpty()', 'failvalidationmsg' => $msgInvalidChannel);
|
||||||
|
|
||||||
$tt = _("Asterisk context this device will send calls to. Only change this is you know what you are doing.");
|
$tt = _("Asterisk context this line will use send calls to/from (Note: Only change this is you know what you are doing).");
|
||||||
$tmparr['context'] = array('prompttext' => _('Line context'), 'value' => 'from-internal', 'tt' => $tt, 'level' => 1);
|
$tmparr['context'] = array('prompttext' => _('Line context'), 'value' => 'from-internal', 'tt' => $tt, 'level' => 1);
|
||||||
|
|
||||||
$tt = _("Phone call group callgroup=1,3-4");
|
$tt = _("Phone call group (numeric only, example:1,3-4)");
|
||||||
$tmparr['callgroup'] = array('prompttext' => _('Call group id'),'value' => '', 'tt' => $tt, 'level' => 1);
|
$tmparr['callgroup'] = array('prompttext' => _('Call group id'),'value' => '', 'tt' => $tt, 'level' => 1);
|
||||||
|
|
||||||
$tt = _("Phone pickup group pickupgroup=1,3-4");
|
# ??? multiple allowed (not sure if that is implemented here)
|
||||||
$tmparr['namedcallgroup'] = array('prompttext' => _('Call group name'),'value' => '', 'tt' => $tt, 'level' => 1);
|
$tt = _("Phone named call group (>asterisk-11)");
|
||||||
|
$tmparr['namedcallgroup'] = array('prompttext' => _('Named Call Group'),'value' => '', 'tt' => $tt, 'level' => 1);
|
||||||
|
|
||||||
$tt = _("sets the named caller groups this line is a member of (ast111)");
|
$tt = _("Sets the pickup group (numeric only, example:1,3-4) this line is a member of. Allows this line to pickup calls from remote phones which are in this callhroup.");
|
||||||
$tmparr['pickupgroup'] = array('prompttext' => _('Pickup group id'),'value' => '', 'tt' => $tt, 'level' => 1);
|
$tmparr['pickupgroup'] = array('prompttext' => _('Pickup group id'),'value' => '', 'tt' => $tt, 'level' => 1);
|
||||||
|
|
||||||
$tt = _("Phone pincode");
|
# ??? multiple allowed (not sure if that is implemented here)
|
||||||
$tmparr['namedpickupgroup'] = array('prompttext' => _('Pickup group name'),'value' => '', 'tt' => $tt, 'level' => 1);
|
$tt = _("Sets the named pickup name group this line is a member of. Allows this line to pickup calls from remote phones which are in this name callgroup (>asterisk-11).");
|
||||||
|
$tmparr['namedpickupgroup'] = array('prompttext' => _('Named Pickup Group'),'value' => '', 'tt' => $tt, 'level' => 1);
|
||||||
|
|
||||||
$tt = _("Sets the named pickup groups this line is a member of (this phone can pickup calls from remote phones which are in this caller group (ast111)");
|
$tt = _("Phone pincode (Note used)");
|
||||||
$tmparr['pin'] = array('value' => '', 'tt' => $tt, 'level' => 1);
|
$tmparr['pin'] = array('value' => '', 'tt' => $tt, 'level' => 1);
|
||||||
|
|
||||||
$tt = _("Digits to indicate an external line to user (secondary dialtone) Sample 9 or 8 (max 9 digits)");
|
$tt = _("Digits to indicate an external line to user (secondary dialtone) Sample 9 or 8 (max 9 digits)");
|
||||||
$tmparr['secondary_dialtone_digits'] = array('prompttext' => _('Secondary dialtone digits'), 'value' => '', 'tt' => $tt, 'level' => 1);
|
$tmparr['secondary_dialtone_digits'] = array('prompttext' => _('Secondary dialtone digits'), 'value' => '', 'tt' => $tt, 'level' => 1);
|
||||||
|
|
||||||
$tt = _("Outside dialtone frequency (defaul 0x22)");
|
$tt = _("Outside dialtone frequency (default 0x22)");
|
||||||
$tmparr['secondary_dialtone_tone'] = array('prompttext' => _('Secondary dialtone tone'), 'value' => '', 'tt' => $tt, 'level' => 1);
|
$tmparr['secondary_dialtone_tone'] = array('prompttext' => _('Secondary dialtone tone'), 'value' => '', 'tt' => $tt, 'level' => 1);
|
||||||
|
|
||||||
|
# ??? is there no easier way to specify a boolean radio group ?
|
||||||
unset($select);
|
unset($select);
|
||||||
$select[] = array('value' => 'yes', 'text' => 'Yes');
|
$select[] = array('value' => 'yes', 'text' => 'Yes');
|
||||||
$select[] = array('value' => 'no', 'text' => 'No');
|
$select[] = array('value' => 'no', 'text' => 'No');
|
||||||
|
@ -204,8 +208,8 @@ class Sccp extends \FreePBX\modules\Core\Driver {
|
||||||
unset($select);
|
unset($select);
|
||||||
$select[] = array('value' => 'yes', 'text' => 'Yes');
|
$select[] = array('value' => 'yes', 'text' => 'Yes');
|
||||||
$select[] = array('value' => 'no', 'text' => 'No');
|
$select[] = array('value' => 'no', 'text' => 'No');
|
||||||
$tt = _("Echo calcel");
|
$tt = _("Echo cancel");
|
||||||
$tmparr['echocancel'] = array('prompttext' => _('Echo calcel'), 'value' => 'yes', 'tt' => $tt, 'select' => $select, 'level' => 1, 'type' => 'radio');
|
$tmparr['echocancel'] = array('prompttext' => _('Echo cancel'), 'value' => 'yes', 'tt' => $tt, 'select' => $select, 'level' => 1, 'type' => 'radio');
|
||||||
|
|
||||||
unset($select);
|
unset($select);
|
||||||
$select[] = array('value' => 'off', 'text' => 'Off');
|
$select[] = array('value' => 'off', 'text' => 'Off');
|
||||||
|
@ -213,7 +217,9 @@ class Sccp extends \FreePBX\modules\Core\Driver {
|
||||||
$select[] = array('value' => 'silent', 'text' => 'Silent');
|
$select[] = array('value' => 'silent', 'text' => 'Silent');
|
||||||
$select[] = array('value' => 'UserDefined', 'text' => 'UserDefined');
|
$select[] = array('value' => 'UserDefined', 'text' => 'UserDefined');
|
||||||
$tt = _("DND: Means how will dnd react when it is set on the device level dnd can have three states: off / busy(reject) / silent / UserDefined").'<br>'.
|
$tt = _("DND: Means how will dnd react when it is set on the device level dnd can have three states: off / busy(reject) / silent / UserDefined").'<br>'.
|
||||||
|
# ??? The next entry should be "null/empty" (not UserDefined) -> to indicate the trie-state behaviour
|
||||||
_("UserDefined - dnd that cycles through all three states off -> reject -> silent -> off (this is the normal behaviour)").'<br>'.
|
_("UserDefined - dnd that cycles through all three states off -> reject -> silent -> off (this is the normal behaviour)").'<br>'.
|
||||||
|
# ??? Userdefined is also a possible state, but it is not used or implemented (and it should not be implemented here, i think)
|
||||||
_("Reject - Usesr can only switch off and on (in reject/busy mode)").'<br>'.
|
_("Reject - Usesr can only switch off and on (in reject/busy mode)").'<br>'.
|
||||||
_("Silent - Usesr can only switch off and on (in silent mode)");
|
_("Silent - Usesr can only switch off and on (in silent mode)");
|
||||||
$tmparr['dnd'] = array('prompttext' => _('DND'), 'value' => 'UserDefined', 'tt' => $tt, 'select' => $select, 'level' => 1, 'type' => 'radio');
|
$tmparr['dnd'] = array('prompttext' => _('DND'), 'value' => 'UserDefined', 'tt' => $tt, 'select' => $select, 'level' => 1, 'type' => 'radio');
|
||||||
|
@ -235,10 +241,8 @@ class Sccp extends \FreePBX\modules\Core\Driver {
|
||||||
$select[] = array('value' => $value, 'text' => _($value));
|
$select[] = array('value' => $value, 'text' => _($value));
|
||||||
}
|
}
|
||||||
|
|
||||||
$tt = _("Musik On Hold ");
|
$tt = _("Music On Hold");
|
||||||
$tmparr['musicclass'] = array('prompttext' => _('Musik On Hold'), 'value' => 'no', 'tt' => $tt, 'select' => $select, 'level' => 1);
|
$tmparr['musicclass'] = array('prompttext' => _('Music On Hold'), 'value' => 'no', 'tt' => $tt, 'select' => $select, 'level' => 1);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$devopts = $tmparr;
|
$devopts = $tmparr;
|
||||||
return $devopts;
|
return $devopts;
|
||||||
|
|
|
@ -485,7 +485,7 @@ and open the template in the editor. Base Version before all crash :-)
|
||||||
<help>Music Class: Available MOH Classes. These are the MOH classes listed in your current server.</help>
|
<help>Music Class: Available MOH Classes. These are the MOH classes listed in your current server.</help>
|
||||||
</item>
|
</item>
|
||||||
<item type="SLA-disabled" id="6"><label>Default Dial Plan</label>
|
<item type="SLA-disabled" id="6"><label>Default Dial Plan</label>
|
||||||
<name>dial_templet</name>
|
<name>dial_template</name>
|
||||||
<default>none</default>
|
<default>none</default>
|
||||||
<select></select>
|
<select></select>
|
||||||
<class>sccp-custom</class>
|
<class>sccp-custom</class>
|
||||||
|
@ -892,10 +892,10 @@ and open the template in the editor. Base Version before all crash :-)
|
||||||
|
|
||||||
|
|
||||||
</page_group>
|
</page_group>
|
||||||
<page_group name="sccp_dp_new_templet">
|
<page_group name="sccp_dp_new_template">
|
||||||
<item type="IE" id="1" seq="99"><label>Templet Name</label>
|
<item type="IE" id="1" seq="99"><label>Template Name</label>
|
||||||
<input>
|
<input>
|
||||||
<name>dialtemplete_name</name>
|
<name>dialtemplate_name</name>
|
||||||
<default></default>
|
<default></default>
|
||||||
<class>form-control</class>
|
<class>form-control</class>
|
||||||
</input>
|
</input>
|
||||||
|
@ -903,10 +903,10 @@ and open the template in the editor. Base Version before all crash :-)
|
||||||
</item>
|
</item>
|
||||||
|
|
||||||
</page_group>
|
</page_group>
|
||||||
<page_group name="sccp_dp_templet">
|
<page_group name="sccp_dp_template">
|
||||||
<label>Device Templet Function</label>
|
<label>Device Template Function</label>
|
||||||
<item type="ITED" id="1" seq="0">
|
<item type="ITED" id="1" seq="0">
|
||||||
<name>dialtemplete</name>
|
<name>dialtemplate</name>
|
||||||
<default>*/10/*</default>
|
<default>*/10/*</default>
|
||||||
<element1 type="title" field="title"><options class="form-control control-label"/>title</element1>
|
<element1 type="title" field="title"><options class="form-control control-label"/>title</element1>
|
||||||
<element type="input" value="none" field="match" display_prefix="(" display_sufix=")"><options class="form-control dpt-title" placeholder="Pattern to match"/></element>
|
<element type="input" value="none" field="match" display_prefix="(" display_sufix=")"><options class="form-control dpt-title" placeholder="Pattern to match"/></element>
|
||||||
|
|
|
@ -487,7 +487,7 @@ and open the template in the editor.
|
||||||
<help>Music Class: Available MOH Classes. These are the MOH classes listed in your current server.</help>
|
<help>Music Class: Available MOH Classes. These are the MOH classes listed in your current server.</help>
|
||||||
</item>
|
</item>
|
||||||
<item type="SLA-disabled" id="6"><label>Default Dial Plan</label>
|
<item type="SLA-disabled" id="6"><label>Default Dial Plan</label>
|
||||||
<name>dial_templet</name>
|
<name>dial_template</name>
|
||||||
<default>none</default>
|
<default>none</default>
|
||||||
<select></select>
|
<select></select>
|
||||||
<class>sccp-custom</class>
|
<class>sccp-custom</class>
|
||||||
|
@ -894,10 +894,10 @@ and open the template in the editor.
|
||||||
|
|
||||||
|
|
||||||
</page_group>
|
</page_group>
|
||||||
<page_group name="sccp_dp_new_templet">
|
<page_group name="sccp_dp_new_template">
|
||||||
<item type="IE" id="1" seq="99"><label>Templet Name</label>
|
<item type="IE" id="1" seq="99"><label>Template Name</label>
|
||||||
<input>
|
<input>
|
||||||
<name>dialtemplete_name</name>
|
<name>dialtemplate_name</name>
|
||||||
<default></default>
|
<default></default>
|
||||||
<class>form-control</class>
|
<class>form-control</class>
|
||||||
</input>
|
</input>
|
||||||
|
@ -905,10 +905,10 @@ and open the template in the editor.
|
||||||
</item>
|
</item>
|
||||||
|
|
||||||
</page_group>
|
</page_group>
|
||||||
<page_group name="sccp_dp_templet">
|
<page_group name="sccp_dp_template">
|
||||||
<label>Device Templet Function</label>
|
<label>Device Template Function</label>
|
||||||
<item type="ITED" id="1" seq="0">
|
<item type="ITED" id="1" seq="0">
|
||||||
<name>dialtemplete</name>
|
<name>dialtemplate</name>
|
||||||
<default>*/10/*</default>
|
<default>*/10/*</default>
|
||||||
<element1 type="title" field="title"><options class="form-control control-label"/>title</element1>
|
<element1 type="title" field="title"><options class="form-control control-label"/>title</element1>
|
||||||
<element type="input" value="none" field="match" display_prefix="(" display_sufix=")"><options class="form-control dpt-title" placeholder="Pattern to match"/></element>
|
<element type="input" value="none" field="match" display_prefix="(" display_sufix=")"><options class="form-control dpt-title" placeholder="Pattern to match"/></element>
|
||||||
|
|
|
@ -485,7 +485,7 @@ and open the template in the editor. Base Version before all crash :-)
|
||||||
<help>Music Class: Available MOH Classes. These are the MOH classes listed in your current server.</help>
|
<help>Music Class: Available MOH Classes. These are the MOH classes listed in your current server.</help>
|
||||||
</item>
|
</item>
|
||||||
<item type="SLA-disabled" id="6"><label>Default Dial Plan</label>
|
<item type="SLA-disabled" id="6"><label>Default Dial Plan</label>
|
||||||
<name>dial_templet</name>
|
<name>dial_template</name>
|
||||||
<default>none</default>
|
<default>none</default>
|
||||||
<select></select>
|
<select></select>
|
||||||
<class>sccp-custom</class>
|
<class>sccp-custom</class>
|
||||||
|
@ -892,10 +892,10 @@ and open the template in the editor. Base Version before all crash :-)
|
||||||
|
|
||||||
|
|
||||||
</page_group>
|
</page_group>
|
||||||
<page_group name="sccp_dp_new_templet">
|
<page_group name="sccp_dp_new_template">
|
||||||
<item type="IE" id="1" seq="99"><label>Templet Name</label>
|
<item type="IE" id="1" seq="99"><label>Template Name</label>
|
||||||
<input>
|
<input>
|
||||||
<name>dialtemplete_name</name>
|
<name>dialtemplate_name</name>
|
||||||
<default></default>
|
<default></default>
|
||||||
<class>form-control</class>
|
<class>form-control</class>
|
||||||
</input>
|
</input>
|
||||||
|
@ -903,8 +903,8 @@ and open the template in the editor. Base Version before all crash :-)
|
||||||
</item>
|
</item>
|
||||||
|
|
||||||
</page_group>
|
</page_group>
|
||||||
<page_group name="sccp_dp_templet">
|
<page_group name="sccp_dp_template">
|
||||||
<label>Device Templet Function</label>
|
<label>Device Template Function</label>
|
||||||
<item type="HLP" id="2">
|
<item type="HLP" id="2">
|
||||||
<label>HELP SCCP Server Name</label>
|
<label>HELP SCCP Server Name</label>
|
||||||
<name>Help_id1</name>
|
<name>Help_id1</name>
|
||||||
|
@ -930,7 +930,7 @@ and open the template in the editor. Base Version before all crash :-)
|
||||||
</item>
|
</item>
|
||||||
|
|
||||||
<item type="ITED" id="1" seq="0">
|
<item type="ITED" id="1" seq="0">
|
||||||
<name>dialtemplete</name>
|
<name>dialtemplate</name>
|
||||||
<default>*/10/*</default>
|
<default>*/10/*</default>
|
||||||
<element1 type="title" field="title"><options class="form-control control-label"/>title</element1>
|
<element1 type="title" field="title"><options class="form-control control-label"/>title</element1>
|
||||||
<element type="input" value="none" field="match" display_prefix="(" display_sufix=")"><options class="form-control dpt-title" placeholder="Pattern to match"/></element>
|
<element type="input" value="none" field="match" display_prefix="(" display_sufix=")"><options class="form-control dpt-title" placeholder="Pattern to match"/></element>
|
||||||
|
|
|
@ -840,7 +840,7 @@ msgid "Loadinformation ID"
|
||||||
msgstr "CiscoКод Модели"
|
msgstr "CiscoКод Модели"
|
||||||
|
|
||||||
#: views/server.model:
|
#: views/server.model:
|
||||||
msgid "Model templet"
|
msgid "Model template"
|
||||||
msgstr "Шаблон насторек .xml_XXX_template"
|
msgstr "Шаблон насторек .xml_XXX_template"
|
||||||
|
|
||||||
#: views/server.model:
|
#: views/server.model:
|
||||||
|
@ -864,7 +864,7 @@ msgid "Load Information ID"
|
||||||
msgstr "CiscoКод Модели"
|
msgstr "CiscoКод Модели"
|
||||||
|
|
||||||
#: views/server.model:
|
#: views/server.model:
|
||||||
msgid "Model templet XML"
|
msgid "Model template XML"
|
||||||
msgstr "Шаблон насторек .xml_XXX_template"
|
msgstr "Шаблон насторек .xml_XXX_template"
|
||||||
|
|
||||||
#: views/server.model:
|
#: views/server.model:
|
||||||
|
|
|
@ -974,7 +974,7 @@ msgid "Loadinformation ID"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: views/server.model:
|
#: views/server.model:
|
||||||
msgid "Model templet"
|
msgid "Model template"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: views/server.model:
|
#: views/server.model:
|
||||||
|
@ -998,7 +998,7 @@ msgid "Load Information ID"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: views/server.model:
|
#: views/server.model:
|
||||||
msgid "Model templet XML"
|
msgid "Model template XML"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: views/server.model:
|
#: views/server.model:
|
||||||
|
|
118
install.php
118
install.php
|
@ -10,7 +10,7 @@ global $astman;
|
||||||
global $version;
|
global $version;
|
||||||
|
|
||||||
$db_config_v0 = array('sccpdevmodel' => array('enabled' => array('create' => "INT(2) NULL DEFAULT '0'"),
|
$db_config_v0 = array('sccpdevmodel' => array('enabled' => array('create' => "INT(2) NULL DEFAULT '0'"),
|
||||||
'nametemplet' => array('create' => 'VARCHAR(50) NULL DEFAULT NULL'),
|
'nametemplate' => array('create' => 'VARCHAR(50) NULL DEFAULT NULL'),
|
||||||
'loadinformationid' => array('create' => "VARCHAR(30) NULL DEFAULT NULL" )
|
'loadinformationid' => array('create' => "VARCHAR(30) NULL DEFAULT NULL" )
|
||||||
),
|
),
|
||||||
'sccpdevice' => array(
|
'sccpdevice' => array(
|
||||||
|
@ -60,7 +60,7 @@ $db_config_v0 = array('sccpdevmodel' => array('enabled' => array('create' => "IN
|
||||||
|
|
||||||
|
|
||||||
$db_config_v3 = array('sccpdevmodel' => array('enabled' => array('create' => "INT(2) NULL DEFAULT '0'"),
|
$db_config_v3 = array('sccpdevmodel' => array('enabled' => array('create' => "INT(2) NULL DEFAULT '0'"),
|
||||||
'nametemplet' => array('create' => 'VARCHAR(50) NULL DEFAULT NULL'),
|
'nametemplate' => array('create' => 'VARCHAR(50) NULL DEFAULT NULL'),
|
||||||
'loadinformationid' => array('create' => "VARCHAR(30) NULL DEFAULT NULL" )
|
'loadinformationid' => array('create' => "VARCHAR(30) NULL DEFAULT NULL" )
|
||||||
),
|
),
|
||||||
'sccpdevice' => array(
|
'sccpdevice' => array(
|
||||||
|
@ -127,26 +127,16 @@ $autoincrement = (($amp_conf["AMPDBENGINE"] == "sqlite") || ($amp_conf["AMPDBENG
|
||||||
|
|
||||||
$table_req = array('sccpdevice', 'sccpline', 'buttonconfig');
|
$table_req = array('sccpdevice', 'sccpline', 'buttonconfig');
|
||||||
|
|
||||||
$sql = <<< END
|
|
||||||
CREATE TABLE IF NOT EXISTS `sccpsettings` (
|
|
||||||
`keyword` VARCHAR (50) NOT NULL default '',
|
|
||||||
`data` VARCHAR (255) NOT NULL default '',
|
|
||||||
`seq` TINYINT (1),
|
|
||||||
`type` TINYINT (1) NOT NULL default '0',
|
|
||||||
PRIMARY KEY (`keyword`,`seq`,`type`)
|
|
||||||
)
|
|
||||||
END;
|
|
||||||
|
|
||||||
$ss = FreePBX::create()->Sccp_manager;
|
$ss = FreePBX::create()->Sccp_manager;
|
||||||
|
|
||||||
outn(_("checking for requery Sccp_manager table.."));
|
outn(_("checking for Sccp_manager database tables.."));
|
||||||
foreach ($table_req as $value) {
|
foreach ($table_req as $value) {
|
||||||
$check = $db->getRow("SELECT 1 FROM `$value` LIMIT 0", DB_FETCHMODE_ASSOC);
|
$check = $db->getRow("SELECT 1 FROM `$value` LIMIT 0", DB_FETCHMODE_ASSOC);
|
||||||
if (DB::IsError($check)) {
|
if (DB::IsError($check)) {
|
||||||
// print_r("none, creating table :". $value);
|
// print_r("none, creating table :". $value);
|
||||||
out(_("none, Can't fient table: " . $value));
|
out(_("none, Can't find table: " . $value));
|
||||||
out(_("none, Plz. Open chai-sccp/conf directory to create DB scheme"));
|
out(_("none, Please goto the chan-sccp/conf directory and create the DB schema (See wiki)"));
|
||||||
die("!!!! Instalation error. Can not find required ".$value." table !!!!!!\n");
|
die("!!!! Installation error: Can not find required ".$value." table !!!!!!\n");
|
||||||
// die_freepbx("!!!! Instalation error. Can not find required ".$value." table !!!!!!\n");
|
// die_freepbx("!!!! Instalation error. Can not find required ".$value." table !!!!!!\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -157,7 +147,7 @@ outn(_("checking Version : ").$version);
|
||||||
|
|
||||||
$dst = $_SERVER['DOCUMENT_ROOT'] . '/admin/modules/sccp_manager/views';
|
$dst = $_SERVER['DOCUMENT_ROOT'] . '/admin/modules/sccp_manager/views';
|
||||||
if (fileowner($_SERVER['DOCUMENT_ROOT']) != fileowner($dst)){
|
if (fileowner($_SERVER['DOCUMENT_ROOT']) != fileowner($dst)){
|
||||||
die('Plz Test permission run "amportal chown"');
|
die('Please (re-)check permissions by running "amportal chown"');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($version)) {
|
if (!empty($version)) {
|
||||||
|
@ -172,56 +162,72 @@ if (!empty($version)) {
|
||||||
$ver_compatable = false;
|
$ver_compatable = false;
|
||||||
die('Versin is not comapable');
|
die('Versin is not comapable');
|
||||||
}
|
}
|
||||||
$ast_out = $astman->Command("sccp show version");
|
|
||||||
$db_config = $db_config_v0;
|
|
||||||
if (preg_match("/Release.*\(/", $ast_out['data'] , $matches)) {
|
|
||||||
$ast_out = explode(' ', substr($matches[0],9,-1));
|
|
||||||
$sccp_ver = 0;
|
|
||||||
if ($ast_out[0] >= '4.3.0'){
|
|
||||||
$sccp_ver = 1;
|
|
||||||
}
|
|
||||||
if (!empty($ast_out[1]) && $ast_out[1] == 'develop'){
|
|
||||||
$sccp_ver = 10;
|
|
||||||
if (!empty($ast_out[3])) {
|
|
||||||
if (base_convert($ast_out[3],16,10) >= base_convert('702487a',16,10)){
|
|
||||||
$sccp_ver += 1;
|
|
||||||
$db_config = $db_config_v3;
|
|
||||||
|
|
||||||
}
|
// Should be replaced by a function to check the AMI:SCCPConfigMetaData
|
||||||
}
|
// JSON: {"Name":"Chan-sccp-b","Branch":"issues/394_1","Version":"4.3.0","Revision":"8d9d74fM","ConfigRevision":"0","ConfigureEnabled": ["park","pickup","realtime","video","conferenence","dirtrfr","feature_monitor","functions","manager_events","devstate_feature","dynamic_speeddial","dynamic_speeddial_cid","experimental","debug"],"Segments":["general","device","line","softkey"]}
|
||||||
} else {
|
$ast_out = $astman->Command("sccp show version");
|
||||||
$sccp_ver = 0;
|
$db_config = $db_config_v0;
|
||||||
}
|
if (preg_match("/Release.*\(/", $ast_out['data'] , $matches)) {
|
||||||
|
$ast_out = explode(' ', substr($matches[0],9,-1));
|
||||||
|
$sccp_ver = 0;
|
||||||
|
if ($ast_out[0] >= '4.3.0'){
|
||||||
|
$sccp_ver = 1;
|
||||||
}
|
}
|
||||||
|
if (!empty($ast_out[1]) && $ast_out[1] == 'develop'){
|
||||||
|
$sccp_ver = 10;
|
||||||
|
if (!empty($ast_out[3])) {
|
||||||
|
if (base_convert($ast_out[3],16,10) >= base_convert('702487a',16,10)){
|
||||||
|
$sccp_ver += 1;
|
||||||
|
$db_config = $db_config_v3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$sccp_ver = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// test
|
// test
|
||||||
// $sccp_ver = 0;
|
// $sccp_ver = 0;
|
||||||
// $db_config = $db_config_v0;
|
// $db_config = $db_config_v0;
|
||||||
// test
|
// test
|
||||||
|
|
||||||
out(_("none, creating table"));
|
|
||||||
$check = $db->query($sql);
|
|
||||||
if (db::IsError($check)) {
|
|
||||||
die_freepbx("Can not create sccpdevmodel table\n");
|
|
||||||
}
|
|
||||||
outn(_(" Sccp Version : ").$sccp_ver);
|
outn(_(" Sccp Version : ").$sccp_ver);
|
||||||
|
|
||||||
$sql = "CREATE TABLE IF NOT EXISTS `sccpdevmodel` (
|
$sql = <<< END
|
||||||
`model` varchar(20) NOT NULL DEFAULT '',
|
CREATE TABLE IF NOT EXISTS `sccpsettings` (
|
||||||
`vendor` varchar(40) DEFAULT '',
|
`keyword` VARCHAR (50) NOT NULL default '',
|
||||||
`dns` int(2) DEFAULT '1',
|
`data` VARCHAR (255) NOT NULL default '',
|
||||||
`buttons` int(2) DEFAULT '0',
|
`seq` TINYINT (1),
|
||||||
`loadimage` varchar(40) DEFAULT '',
|
`type` TINYINT (1) NOT NULL default '0',
|
||||||
`loadinformationid` VARCHAR(30) NULL DEFAULT NULL,
|
PRIMARY KEY (`keyword`,`seq`,`type`)
|
||||||
`enabled` INT(2) NULL DEFAULT '0',
|
)
|
||||||
`nametemplet` VARCHAR(50) NULL DEFAULT NULL,
|
END;
|
||||||
PRIMARY KEY (`model`),
|
|
||||||
KEY `model` (`model`)
|
out(_("No sccpsettings table, creating table"));
|
||||||
|
$check = $db->query($sql);
|
||||||
|
if (db::IsError($check)) {
|
||||||
|
die_freepbx("Can not create sccpsettings table, error:$check\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
sql = <<< END
|
||||||
|
CREATE TABLE IF NOT EXISTS `sccpdevmodel` (
|
||||||
|
`model` varchar(20) NOT NULL DEFAULT '',
|
||||||
|
`vendor` varchar(40) DEFAULT '',
|
||||||
|
`dns` int(2) DEFAULT '1',
|
||||||
|
`buttons` int(2) DEFAULT '0',
|
||||||
|
`loadimage` varchar(40) DEFAULT '',
|
||||||
|
`loadinformationid` VARCHAR(30) NULL DEFAULT NULL,
|
||||||
|
`enabled` INT(2) NULL DEFAULT '0',
|
||||||
|
`nametemplate` VARCHAR(50) NULL DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`model`),
|
||||||
|
KEY `model` (`model`)
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1";
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1";
|
||||||
|
END;
|
||||||
|
|
||||||
$check = $db->query($sql);
|
$check = $db->query($sql);
|
||||||
if (db::IsError($check)) {
|
if (db::IsError($check)) {
|
||||||
die_freepbx("Can not create sccpsettings table\n");
|
die_freepbx("Can not create sccpdevmodel table, error:$check\n");
|
||||||
}
|
}
|
||||||
out(_("none, Modify DB schama"));
|
out(_("none, Modify DB schama"));
|
||||||
|
|
||||||
|
@ -307,7 +313,7 @@ if (!empty($version)) {
|
||||||
out(_("none, Uptade Table Info"));
|
out(_("none, Uptade Table Info"));
|
||||||
|
|
||||||
//$sql = "REPLACE INTO `sccpdevmodel` VALUES ('7925','CISCO',1,1,'',''),('7902','CISCO',1,1,'CP7902080002SCCP060817A','loadInformation30008'),('7905','CISCO',1,1,'CP7905080003SCCP070409A','loadInformation20000'),('7906','CISCO',1,1,'SCCP11.8-3-1S','loadInformation369'),('7910','CISCO',1,1,'P00405000700','loadInformation6'),('7911','CISCO',1,1,'SCCP11.8-3-1S','loadInformation307'),('7912','CISCO',1,1,'CP7912080003SCCP070409A','loadInformation30007'),('7914','CISCO',0,14,'S00105000300','loadInformation124'),('7920','CISCO',1,1,'cmterm_7920.4.0-03-02','loadInformation30002'),('7921','CISCO',1,1,'CP7921G-1.0.3','loadInformation365'),('7931','CISCO',1,1,'SCCP31.8-3-1S','loadInformation348'),('7936','CISCO',1,1,'cmterm_7936.3-3-13-0','loadInformation30019'),('7937','CISCO',1,1,'','loadInformation431'),('7940','CISCO',1,2,'P00308000500','loadInformation8'),('Digital Access+','CISCO',1,1,'D00303010033','loadInformation42'),('7941','CISCO',1,2,'P00308000500','loadInformation115'),('7941G-GE','CISCO',1,2,'P00308000500','loadInformation309'),('7942','CISCO',1,2,'P00308000500','loadInformation434'),('Digital Access','CISCO',1,1,'D001M022','loadInformation40'),('7945','CISCO',1,2,'P00308000500','loadInformation435'),('7960','CISCO',3,6,'P00308000500','loadInformation7'),('7961','CISCO',3,6,'P00308000500','loadInformation30018'),('7961G-GE','CISCO',3,6,'P00308000500','loadInformation308'),('7962','CISCO',3,6,'P00308000500','loadInformation404'),('7965','CISCO',3,6,'P00308000500','loadInformation436'),('7970','CISCO',3,8,'SCCP70.8-3-1S','loadInformation30006'),('7971','CISCO',3,8,'SCCP70.8-3-1S','loadInformation119'),('7975','CISCO',3,8,'SCCP70.8-3-1S','loadInformation437'),('7985','CISCO',3,8,'cmterm_7985.4-1-4-0','loadInformation302'),('ATA 186','CISCO',1,1,'ATA030203SCCP051201A','loadInformation12'),('IP Communicator','CISCO',1,1,'','loadInformation30016'),('12 SP','CISCO',1,1,'','loadInformation3'),('12 SP+','CISCO',1,1,'','loadInformation2'),('30 SP+','CISCO',1,1,'','loadInformation1'),('30 VIP','CISCO',1,1,'','loadInformation5'),('7914,7914','CISCO',0,28,'S00105000300','loadInformation124'),('7915','CISCO',0,14,'',''),('7916','CISCO',0,14,'',''),('7915,7915','CISCO',0,28,'',''),('7916,7916','CISCO',0,28,'',''),('CN622','MOTOROLA',1,1,'','loadInformation335'),('ICC','NOKIA',1,1,'',''),('E-Series','NOKIA',1,1,'',''),('3911','CISCO',1,1,'','loadInformation446'),('3951','CISCO',1,1,'','loadInformation412');";
|
//$sql = "REPLACE INTO `sccpdevmodel` VALUES ('7925','CISCO',1,1,'',''),('7902','CISCO',1,1,'CP7902080002SCCP060817A','loadInformation30008'),('7905','CISCO',1,1,'CP7905080003SCCP070409A','loadInformation20000'),('7906','CISCO',1,1,'SCCP11.8-3-1S','loadInformation369'),('7910','CISCO',1,1,'P00405000700','loadInformation6'),('7911','CISCO',1,1,'SCCP11.8-3-1S','loadInformation307'),('7912','CISCO',1,1,'CP7912080003SCCP070409A','loadInformation30007'),('7914','CISCO',0,14,'S00105000300','loadInformation124'),('7920','CISCO',1,1,'cmterm_7920.4.0-03-02','loadInformation30002'),('7921','CISCO',1,1,'CP7921G-1.0.3','loadInformation365'),('7931','CISCO',1,1,'SCCP31.8-3-1S','loadInformation348'),('7936','CISCO',1,1,'cmterm_7936.3-3-13-0','loadInformation30019'),('7937','CISCO',1,1,'','loadInformation431'),('7940','CISCO',1,2,'P00308000500','loadInformation8'),('Digital Access+','CISCO',1,1,'D00303010033','loadInformation42'),('7941','CISCO',1,2,'P00308000500','loadInformation115'),('7941G-GE','CISCO',1,2,'P00308000500','loadInformation309'),('7942','CISCO',1,2,'P00308000500','loadInformation434'),('Digital Access','CISCO',1,1,'D001M022','loadInformation40'),('7945','CISCO',1,2,'P00308000500','loadInformation435'),('7960','CISCO',3,6,'P00308000500','loadInformation7'),('7961','CISCO',3,6,'P00308000500','loadInformation30018'),('7961G-GE','CISCO',3,6,'P00308000500','loadInformation308'),('7962','CISCO',3,6,'P00308000500','loadInformation404'),('7965','CISCO',3,6,'P00308000500','loadInformation436'),('7970','CISCO',3,8,'SCCP70.8-3-1S','loadInformation30006'),('7971','CISCO',3,8,'SCCP70.8-3-1S','loadInformation119'),('7975','CISCO',3,8,'SCCP70.8-3-1S','loadInformation437'),('7985','CISCO',3,8,'cmterm_7985.4-1-4-0','loadInformation302'),('ATA 186','CISCO',1,1,'ATA030203SCCP051201A','loadInformation12'),('IP Communicator','CISCO',1,1,'','loadInformation30016'),('12 SP','CISCO',1,1,'','loadInformation3'),('12 SP+','CISCO',1,1,'','loadInformation2'),('30 SP+','CISCO',1,1,'','loadInformation1'),('30 VIP','CISCO',1,1,'','loadInformation5'),('7914,7914','CISCO',0,28,'S00105000300','loadInformation124'),('7915','CISCO',0,14,'',''),('7916','CISCO',0,14,'',''),('7915,7915','CISCO',0,28,'',''),('7916,7916','CISCO',0,28,'',''),('CN622','MOTOROLA',1,1,'','loadInformation335'),('ICC','NOKIA',1,1,'',''),('E-Series','NOKIA',1,1,'',''),('3911','CISCO',1,1,'','loadInformation446'),('3951','CISCO',1,1,'','loadInformation412');";
|
||||||
$sql = "REPLACE INTO `sccpdevmodel` (`model`, `vendor`, `dns`, `buttons`, `loadimage`, `loadinformationid`, `enabled`, `nametemplet`) VALUES ('12 SP', 'CISCO', 1, 1, '', 'loadInformation3', 0, NULL)," .
|
$sql = "REPLACE INTO `sccpdevmodel` (`model`, `vendor`, `dns`, `buttons`, `loadimage`, `loadinformationid`, `enabled`, `nametemplate`) VALUES ('12 SP', 'CISCO', 1, 1, '', 'loadInformation3', 0, NULL)," .
|
||||||
"('12 SP+', 'CISCO', 1, 1, '', 'loadInformation2', 0, NULL), ('30 SP+', 'CISCO', 1, 1, '', 'loadInformation1', 0, NULL), ('30 VIP', 'CISCO', 1, 1, '', 'loadInformation5', 0, NULL), ('3911', 'CISCO', 1, 1, '', 'loadInformation446', 0, NULL), ('3951', 'CISCO', 1, 1, '', 'loadInformation412', 0, ''), ('6901', 'CISCO', 1, 0, 'SCCP6901.9-2-1-a', 'loadInformation547', 0, NULL), ('6911', 'CISCO', 1, 0, 'SCCP6911.9-2-1-a', 'loadInformation548', 0, NULL), ('6921', 'CISCO', 1, 0, 'SCCP69xx.9-2-1-0', 'loadInformation496', 0, NULL), ('6941', 'CISCO', 1, 1, 'SCCP69xx.9-2-1-0', 'loadInformation495', 0, NULL), ('6945', 'CISCO', 1, 0, 'SCCP6945.9-2-1-0', 'loadInformation564', 0, NULL), ('6961', 'CISCO', 1, 0, 'SCCP69xx.9-2-1-0', 'loadInformation497', 0, NULL), ('7902', 'CISCO', 1, 1, 'CP7902080002SCCP060817A', 'loadInformation30008', 0, NULL), " .
|
"('12 SP+', 'CISCO', 1, 1, '', 'loadInformation2', 0, NULL), ('30 SP+', 'CISCO', 1, 1, '', 'loadInformation1', 0, NULL), ('30 VIP', 'CISCO', 1, 1, '', 'loadInformation5', 0, NULL), ('3911', 'CISCO', 1, 1, '', 'loadInformation446', 0, NULL), ('3951', 'CISCO', 1, 1, '', 'loadInformation412', 0, ''), ('6901', 'CISCO', 1, 0, 'SCCP6901.9-2-1-a', 'loadInformation547', 0, NULL), ('6911', 'CISCO', 1, 0, 'SCCP6911.9-2-1-a', 'loadInformation548', 0, NULL), ('6921', 'CISCO', 1, 0, 'SCCP69xx.9-2-1-0', 'loadInformation496', 0, NULL), ('6941', 'CISCO', 1, 1, 'SCCP69xx.9-2-1-0', 'loadInformation495', 0, NULL), ('6945', 'CISCO', 1, 0, 'SCCP6945.9-2-1-0', 'loadInformation564', 0, NULL), ('6961', 'CISCO', 1, 0, 'SCCP69xx.9-2-1-0', 'loadInformation497', 0, NULL), ('7902', 'CISCO', 1, 1, 'CP7902080002SCCP060817A', 'loadInformation30008', 0, NULL), " .
|
||||||
"('7905', 'CISCO', 1, 1, 'CP7905080003SCCP070409A', 'loadInformation20000', 0, NULL), ('7906', 'CISCO', 1, 1, 'SCCP11.9-2-1S', 'loadInformation369', 1, 'SEP0000000000.cnf.xml_791x_template'), ('7910', 'CISCO', 1, 1, 'SCCP11.9-2-1S', 'loadInformation6', 1, 'SEP0000000000.cnf.xml_791x_template'), ('7911', 'CISCO', 1, 1, 'SCCP11.9-2-1S', 'loadInformation307', 1, 'SEP0000000000.cnf.xml_791x_template'), ('7912', 'CISCO', 1, 1, 'CP7912080004SCCP080108A', 'loadInformation30007', 0, NULL), ('7914', 'CISCO', 0, 14, 'S00105000400', 'loadInformation124', 1, NULL),('7914,7914', 'CISCO', 0, 28, 'S00105000400', 'loadInformation124', 1, NULL), ('7915', 'CISCO', 0, 24, 'B015-1-0-4', 'loadInformation227', 1, NULL), ('7915,7915', 'CISCO', 0, 48, 'B015-1-0-4', 'loadInformation228', 1, NULL), ('7916', 'CISCO', 0, 24, 'B015-1-0-4', 'loadInformation229', 1, NULL), " .
|
"('7905', 'CISCO', 1, 1, 'CP7905080003SCCP070409A', 'loadInformation20000', 0, NULL), ('7906', 'CISCO', 1, 1, 'SCCP11.9-2-1S', 'loadInformation369', 1, 'SEP0000000000.cnf.xml_791x_template'), ('7910', 'CISCO', 1, 1, 'SCCP11.9-2-1S', 'loadInformation6', 1, 'SEP0000000000.cnf.xml_791x_template'), ('7911', 'CISCO', 1, 1, 'SCCP11.9-2-1S', 'loadInformation307', 1, 'SEP0000000000.cnf.xml_791x_template'), ('7912', 'CISCO', 1, 1, 'CP7912080004SCCP080108A', 'loadInformation30007', 0, NULL), ('7914', 'CISCO', 0, 14, 'S00105000400', 'loadInformation124', 1, NULL),('7914,7914', 'CISCO', 0, 28, 'S00105000400', 'loadInformation124', 1, NULL), ('7915', 'CISCO', 0, 24, 'B015-1-0-4', 'loadInformation227', 1, NULL), ('7915,7915', 'CISCO', 0, 48, 'B015-1-0-4', 'loadInformation228', 1, NULL), ('7916', 'CISCO', 0, 24, 'B015-1-0-4', 'loadInformation229', 1, NULL), " .
|
||||||
"('7916,7916', 'CISCO', 0, 48, 'B016-1-0-4', 'loadInformation230', 1, NULL), ('7920', 'CISCO', 1, 1, 'cmterm_7920.4.0-03-02', 'loadInformation30002', 0, NULL), ('7921', 'CISCO', 1, 1, 'CP7921G-1.4.1SR1', 'loadInformation365', 0, NULL),('7925', 'CISCO', 1, 6, 'CP7925G-1.4.1SR1', 'loadInformation484', 0, NULL), ('7926', 'CISCO', 1, 1, 'CP7926G-1.4.1SR1', 'loadInformation557', 0, NULL), ('7931', 'CISCO', 1, 34, 'SCCP31.9-2-1S', 'loadInformation348', 0, NULL), ('7935', 'CISCO', 1, 2, 'P00503021900', 'loadInformation9', 0, NULL), ('7936', 'CISCO', 1, 1, 'cmterm_7936.3-3-21-0', 'loadInformation30019', 0, NULL), ('7937', 'CISCO', 1, 1, 'apps37sccp.1-4-4-0', 'loadInformation431', 0, 'SEP0000000000.cnf.xml_7937_template'), ('7940', 'CISCO', 1, 2, 'P0030801SR02', 'loadInformation8', 1, 'SEP0000000000.cnf.xml_796x_template'), " .
|
"('7916,7916', 'CISCO', 0, 48, 'B016-1-0-4', 'loadInformation230', 1, NULL), ('7920', 'CISCO', 1, 1, 'cmterm_7920.4.0-03-02', 'loadInformation30002', 0, NULL), ('7921', 'CISCO', 1, 1, 'CP7921G-1.4.1SR1', 'loadInformation365', 0, NULL),('7925', 'CISCO', 1, 6, 'CP7925G-1.4.1SR1', 'loadInformation484', 0, NULL), ('7926', 'CISCO', 1, 1, 'CP7926G-1.4.1SR1', 'loadInformation557', 0, NULL), ('7931', 'CISCO', 1, 34, 'SCCP31.9-2-1S', 'loadInformation348', 0, NULL), ('7935', 'CISCO', 1, 2, 'P00503021900', 'loadInformation9', 0, NULL), ('7936', 'CISCO', 1, 1, 'cmterm_7936.3-3-21-0', 'loadInformation30019', 0, NULL), ('7937', 'CISCO', 1, 1, 'apps37sccp.1-4-4-0', 'loadInformation431', 0, 'SEP0000000000.cnf.xml_7937_template'), ('7940', 'CISCO', 1, 2, 'P0030801SR02', 'loadInformation8', 1, 'SEP0000000000.cnf.xml_796x_template'), " .
|
||||||
|
@ -352,7 +358,6 @@ if (!empty($version)) {
|
||||||
FROM sccpdevice
|
FROM sccpdevice
|
||||||
LEFT JOIN buttonconfig ON ( buttonconfig.device = sccpdevice.name )
|
LEFT JOIN buttonconfig ON ( buttonconfig.device = sccpdevice.name )
|
||||||
GROUP BY sccpdevice.name;";
|
GROUP BY sccpdevice.name;";
|
||||||
|
|
||||||
|
|
||||||
$sql_v0 = "CREATE OR REPLACE
|
$sql_v0 = "CREATE OR REPLACE
|
||||||
ALGORITHM = MERGE
|
ALGORITHM = MERGE
|
||||||
|
@ -384,7 +389,6 @@ if (!empty($version)) {
|
||||||
if (DB::IsError($check)) {
|
if (DB::IsError($check)) {
|
||||||
die_freepbx("Can not modify sccpdevice table\n");
|
die_freepbx("Can not modify sccpdevice table\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// $ss->save_submit($request);
|
// $ss->save_submit($request);
|
||||||
// $ss->sccp_create_sccp_init();
|
// $ss->sccp_create_sccp_init();
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<type>setup</type>
|
<type>setup</type>
|
||||||
<category>SCCP Connectivity</category>
|
<category>SCCP Connectivity</category>
|
||||||
<publisher>Alex GP</publisher>
|
<publisher>Alex GP</publisher>
|
||||||
<description>SCCP Phone and Extention Manager</description>
|
<description>SCCP Phone and Extension Manager</description>
|
||||||
<menuitems>
|
<menuitems>
|
||||||
<sccpsettings sort="1">Server Config</sccpsettings>
|
<sccpsettings sort="1">Server Config</sccpsettings>
|
||||||
<sccp_adv sort="2">System Parameters</sccp_adv>
|
<sccp_adv sort="2">System Parameters</sccp_adv>
|
||||||
|
|
|
@ -16,13 +16,16 @@ if (!defined('FREEPBX_IS_AUTH')) { die('No direct script access allowed'); }
|
||||||
sql("DELETE FROM kvstore WHERE module = 'sccpsettings'");
|
sql("DELETE FROM kvstore WHERE module = 'sccpsettings'");
|
||||||
sql("DELETE FROM kvstore WHERE module = 'Sccp_manager'");
|
sql("DELETE FROM kvstore WHERE module = 'Sccp_manager'");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Comment: Maybe save in sccpsettings, if the chan_sccp tables already existed in the database or if they were created by install.php */
|
||||||
|
/* So that you know if it is save to drop/delete them */
|
||||||
|
|
||||||
/* DROP VIEW `sccpdeviceconfig`;
|
/* DROP VIEW `sccpdeviceconfig`;
|
||||||
DROP TABLE `buttonconfig`;
|
DROP TABLE `buttonconfig`;
|
||||||
DROP TABLE `sccpdevice`;
|
DROP TABLE `sccpdevice`;
|
||||||
DROP TABLE `sccpdevmodel`;
|
DROP TABLE `sccpdevmodel`;
|
||||||
DROP TABLE `sccpline`;
|
DROP TABLE `sccpline`;
|
||||||
DROP TABLE `sccpsettings`;
|
DROP TABLE `sccpsettings`;
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,19 +29,19 @@ if ($dev_id != '*new*') {
|
||||||
$data_s .= ';';
|
$data_s .= ';';
|
||||||
}
|
}
|
||||||
$data_s = substr($data_s, 0, -1);
|
$data_s = substr($data_s, 0, -1);
|
||||||
$def_val['dialtemplete'] = array("keyword" => 'dialtemplete', "data" => $data_s, "seq" => "99");
|
$def_val['dialtemplatee'] = array("keyword" => 'dialtemplatee', "data" => $data_s, "seq" => "99");
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
<form autocomplete="off" name="frm_editdialtemplet" id="frm_editbutons" class="fpbx-submit" action="" method="post" data-id="dial_templet">
|
<form autocomplete="off" name="frm_editdialtemplate" id="frm_editbutons" class="fpbx-submit" action="" method="post" data-id="dial_template">
|
||||||
|
|
||||||
<input type="hidden" name="idtemplet" value="<?php echo $dev_id;?>">
|
<input type="hidden" name="idtemplate" value="<?php echo $dev_id;?>">
|
||||||
<input type="hidden" name="Submit" value="Submit">
|
<input type="hidden" name="Submit" value="Submit">
|
||||||
<?php
|
<?php
|
||||||
if ($dev_id == '*new*') {
|
if ($dev_id == '*new*') {
|
||||||
echo $this->ShowGroup('sccp_dp_new_templet',0,'sccp_dial',$def_val);
|
echo $this->ShowGroup('sccp_dp_new_template',0,'sccp_dial',$def_val);
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ if ($dev_id != '*new*') {
|
||||||
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
// echo $this->ShowGroup('sccp_dp_new_templet',0,'sccp_dial',$def_val);
|
// echo $this->ShowGroup('sccp_dp_new_template',0,'sccp_dial',$def_val);
|
||||||
echo $this->ShowGroup('sccp_dp_templet',0,'sccp_dial',$def_val);
|
echo $this->ShowGroup('sccp_dp_template',0,'sccp_dial',$def_val);
|
||||||
?>
|
?>
|
||||||
</form>
|
</form>
|
|
@ -12,7 +12,7 @@ foreach ($this->get_DP_list() as $value) {
|
||||||
if (strlen($data) >0 ){
|
if (strlen($data) >0 ){
|
||||||
$data = substr ($data,0,-1);
|
$data = substr ($data,0,-1);
|
||||||
}
|
}
|
||||||
$this->sccpvalues['dial_templet'] = array('keyword' => 'dial_templet', 'data' => $data, 'type' => '10', 'seq' => '90');
|
$this->sccpvalues['dial_template'] = array('keyword' => 'dial_template', 'data' => $data, 'type' => '10', 'seq' => '90');
|
||||||
?>
|
?>
|
||||||
<form autocomplete="off" name="frm_device" id="frm_device" class="fpbx-submit" action="" method="post">
|
<form autocomplete="off" name="frm_device" id="frm_device" class="fpbx-submit" action="" method="post">
|
||||||
<input type="hidden" name="category" value="deviceform">
|
<input type="hidden" name="category" value="deviceform">
|
||||||
|
|
|
@ -13,13 +13,13 @@
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
<div class="display no-border">
|
<div class="display no-border">
|
||||||
<h1><?php echo _("Cisco Dial Templet") ?></h1>
|
<h1><?php echo _("Cisco Dial Templet") ?></h1>
|
||||||
<div id="toolbar-sccp-dialtemplet">
|
<div id="toolbar-sccp-dialtemplate">
|
||||||
<a class="btn btn-default" href="config.php?display=sccp_adv&tech_hardware=dialplan&extdisplay=*new*"><i class="fa fa-plus"> </i><?php echo _("Add Dialplan") ?></a>
|
<a class="btn btn-default" href="config.php?display=sccp_adv&tech_hardware=dialplan&extdisplay=*new*"><i class="fa fa-plus"> </i><?php echo _("Add Dialplan") ?></a>
|
||||||
<button id="remove-sccp-dialtemplet" class="btn btn-danger btn-remove" data-type="dialtemplet" data-section="sccp-dialtemplet" disabled>
|
<button id="remove-sccp-dialtemplate" class="btn btn-danger btn-remove" data-type="dialtemplate" data-section="sccp-dialtemplate" disabled>
|
||||||
<i class="glyphicon glyphicon-remove"></i> <span><?php echo _('Delete') ?></span>
|
<i class="glyphicon glyphicon-remove"></i> <span><?php echo _('Delete') ?></span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<table data-cookie="true" data-cookie-id-table="sccp-dialtemplet-table" data-url="ajax.php?module=sccp_manager&command=getDialTemplete" data-cache="false" data-show-refresh="true" data-toolbar="#toolbar-dialtemplet" data-maintain-selected="true" data-show-columns="true" data-show-toggle="true" data-toggle="table" data-pagination="true" data-search="true" class="table table-striped ext-list-sccp" id="table-sccp-dialtemplet" data-id="id">
|
<table data-cookie="true" data-cookie-id-table="sccp-dialtemplate-table" data-url="ajax.php?module=sccp_manager&command=getDialTemplete" data-cache="false" data-show-refresh="true" data-toolbar="#toolbar-dialtemplate" data-maintain-selected="true" data-show-columns="true" data-show-toggle="true" data-toggle="table" data-pagination="true" data-search="true" class="table table-striped ext-list-sccp" id="table-sccp-dialtemplate" data-id="id">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<!-- <th data-checkbox="true"></th> -->
|
<!-- <th data-checkbox="true"></th> -->
|
|
@ -43,7 +43,7 @@
|
||||||
<th data-sortable="false" data-field="buttons"><?php echo _('Buttons');?></th>
|
<th data-sortable="false" data-field="buttons"><?php echo _('Buttons');?></th>
|
||||||
<th data-sortable="false" data-formatter="SetColColorFirm" data-field="loadimage"><?php echo _('Loadimage');?></th>
|
<th data-sortable="false" data-formatter="SetColColorFirm" data-field="loadimage"><?php echo _('Loadimage');?></th>
|
||||||
<th data-sortable="false" data-field="loadinformationid"><?php echo _('Loadinformation ID');?></th>
|
<th data-sortable="false" data-field="loadinformationid"><?php echo _('Loadinformation ID');?></th>
|
||||||
<th data-sortable="false" data-formatter="SetColColorTempl" data-field="nametemplet"><?php echo _('Model templet');?></th>
|
<th data-sortable="false" data-formatter="SetColColorTempl" data-field="nametemplate"><?php echo _('Model template');?></th>
|
||||||
<th data-field="actions" data-formatter="DispayActionsModelFormatter"><?php echo _('Actions');?></th>
|
<th data-field="actions" data-formatter="DispayActionsModelFormatter"><?php echo _('Actions');?></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
@ -131,13 +131,13 @@
|
||||||
</div></div></div>
|
</div></div></div>
|
||||||
|
|
||||||
<div class="element-container"><div class="row"> <div class="form-group"><div class="col-md-3">
|
<div class="element-container"><div class="row"> <div class="form-group"><div class="col-md-3">
|
||||||
<label class="control-label" for="new_nametemplet"><?php echo _('Model templet XML');?></label>
|
<label class="control-label" for="new_nametemplate"><?php echo _('Model template XML');?></label>
|
||||||
<i class="fa fa-question-circle fpbx-help-icon" data-for="new_nametemplet"></i>
|
<i class="fa fa-question-circle fpbx-help-icon" data-for="new_nametemplate"></i>
|
||||||
</div><div class="col-md-9">
|
</div><div class="col-md-9">
|
||||||
<input type="text" class="form-control" id="new_nametemplet" name="new_nametemplet" value="">
|
<input type="text" class="form-control" id="new_nametemplate" name="new_nametemplate" value="">
|
||||||
</div> </div></div>
|
</div> </div></div>
|
||||||
<div class="row"><div class="col-md-12">
|
<div class="row"><div class="col-md-12">
|
||||||
<span id="new_nametemplet-help" class="help-block fpbx-help-block">Help.</span>
|
<span id="new_nametemplate-help" class="help-block fpbx-help-block">Help.</span>
|
||||||
</div></div></div>
|
</div></div></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
|
@ -181,13 +181,13 @@
|
||||||
</div></div></div>
|
</div></div></div>
|
||||||
|
|
||||||
<div class="element-container"><div class="row"> <div class="form-group"><div class="col-md-3">
|
<div class="element-container"><div class="row"> <div class="form-group"><div class="col-md-3">
|
||||||
<label class="control-label" for="editd_nametemplet"><?php echo _('Model templet XML');?></label>
|
<label class="control-label" for="editd_nametemplate"><?php echo _('Model template XML');?></label>
|
||||||
<i class="fa fa-question-circle fpbx-help-icon" data-for="editd_nametemplet"></i>
|
<i class="fa fa-question-circle fpbx-help-icon" data-for="editd_nametemplate"></i>
|
||||||
</div><div class="col-md-9">
|
</div><div class="col-md-9">
|
||||||
<input type="text" class="form-control" id="editd_nametemplet" name="editd_nametemplet" value="">
|
<input type="text" class="form-control" id="editd_nametemplate" name="editd_nametemplate" value="">
|
||||||
</div> </div></div>
|
</div> </div></div>
|
||||||
<div class="row"><div class="col-md-12">
|
<div class="row"><div class="col-md-12">
|
||||||
<span id="editd_nametemplet-help" class="help-block fpbx-help-block">Help.</span>
|
<span id="editd_nametemplate-help" class="help-block fpbx-help-block">Help.</span>
|
||||||
</div></div></div>
|
</div></div></div>
|
||||||
|
|
||||||
|
|
||||||
|
@ -212,7 +212,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// function DispayInputFormatter(value, row, index) {
|
// function DispayInputFormatter(value, row, index) {
|
||||||
// return (value == null) ? '<input class="tabl-edit form-control" name="' + row['model'] + '_templet" type="text" value="">' : '<input class="tabl-edit form-control" name="' + row['model'] + '_templet" type="text" value="' + value + '">';
|
// return (value == null) ? '<input class="tabl-edit form-control" name="' + row['model'] + '_template" type="text" value="">' : '<input class="tabl-edit form-control" name="' + row['model'] + '_template" type="text" value="' + value + '">';
|
||||||
// }
|
// }
|
||||||
|
|
||||||
function DispayActionsModelFormatter(value, row, index) {
|
function DispayActionsModelFormatter(value, row, index) {
|
||||||
|
@ -258,7 +258,7 @@
|
||||||
} else {
|
} else {
|
||||||
document.getElementById("editd_model").value = clr;
|
document.getElementById("editd_model").value = clr;
|
||||||
document.getElementById("editd_loadimage").value = drow['loadimage'];
|
document.getElementById("editd_loadimage").value = drow['loadimage'];
|
||||||
document.getElementById("editd_nametemplet").value = drow['nametemplet'];
|
document.getElementById("editd_nametemplate").value = drow['nametemplate'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in a new issue