Update 433
- Added support for updated driver configuration - Added revision control database schema (258fed034e
) - Added option "callhistory_answered_elsewhere" - save point in phone directory for pickup calls. (bug fix by dkgroot0291207d82
) - Bug fix options (TFTP SERVER remapping support) - And traditionally added new bugs. - И для тех кто хочет помочь проекту добавлены свежие баги. Я их еще не нашел, а вы ?
This commit is contained in:
parent
b6a411f96e
commit
55f6dd73f9
|
@ -1,4 +1,4 @@
|
||||||
## Welcome to Chan_SCCP GUI Manager for FreePBX
|
## Welcome to Develop Chan_SCCP GUI Manager for FreePBX
|
||||||
| [English](README.md) | [Russian](README.ru.md) |
|
| [English](README.md) | [Russian](README.ru.md) |
|
||||||
|
|
||||||

|

|
||||||
|
@ -79,6 +79,7 @@ Make sure you have the following installed on your system:
|
||||||
> cd /var/www/html/admin/modules/sccp_manager/
|
> cd /var/www/html/admin/modules/sccp_manager/
|
||||||
> git fetch
|
> git fetch
|
||||||
> git pull
|
> git pull
|
||||||
|
> git checkout develop
|
||||||
|
|
||||||
### IMPORTANT NOTES:
|
### IMPORTANT NOTES:
|
||||||
- This system assumes/requires that you are using the Asterisk realtime database. If you are not yet using the realtime database,
|
- This system assumes/requires that you are using the Asterisk realtime database. If you are not yet using the realtime database,
|
||||||
|
|
14
README.ru.md
14
README.ru.md
|
@ -1,4 +1,4 @@
|
||||||
## Welcome to Chan_SCCP GUI Manager for FreePBX
|
## Welcome to Develop Chan_SCCP GUI Manager for FreePBX
|
||||||
| [English](README.md) | [Russian](README.ru.md) |
|
| [English](README.md) | [Russian](README.ru.md) |
|
||||||
|
|
||||||

|

|
||||||
|
@ -33,6 +33,10 @@
|
||||||
3. Драйвер протокола SCCP страница (https://github.com/chan-sccp/chan-sccp/)
|
3. Драйвер протокола SCCP страница (https://github.com/chan-sccp/chan-sccp/)
|
||||||
4. Ну и это модуль.
|
4. Ну и это модуль.
|
||||||
|
|
||||||
|
### Вжно! В этой ветке лежат самые последне нововведения и обновления, и самые последние БАГИ !
|
||||||
|
Пользуйся и наслождайся. Так же не забывай писать нам об ошибках, которые ты нашел !
|
||||||
|
Это очень нам поможет, Я с радостью исправлю то что ты нашел и добалю новых.
|
||||||
|
|
||||||
### Wiki - Основные Инструкции по настройке
|
### Wiki - Основные Инструкции по настройке
|
||||||
Вся документация лежит на Вики [](https://github.com/PhantomVl/sccp_manager/wiki)
|
Вся документация лежит на Вики [](https://github.com/PhantomVl/sccp_manager/wiki)
|
||||||
|
|
||||||
|
@ -51,7 +55,10 @@ Make sure you have the following installed on your system:
|
||||||
|
|
||||||
### Installation Очень короткая инструкция
|
### Installation Очень короткая инструкция
|
||||||
###### [Полная версия инструкции] (https://github.com/PhantomVl/sccp_manager/wiki/step-by-step-instlation)
|
###### [Полная версия инструкции] (https://github.com/PhantomVl/sccp_manager/wiki/step-by-step-instlation)
|
||||||
- Chan_SCCP module 4.3.0 (or later) [See our WIKI] (https://github.com/chan-sccp/chan-sccp/wiki/Building-and-Installation-Guide)
|
- Chan_SCCP module 4.3.1 (or later) [See our WIKI] (https://github.com/chan-sccp/chan-sccp/wiki/Building-and-Installation-Guide)
|
||||||
|
> git clone https://github.com/chan-sccp/chan-sccp.git
|
||||||
|
> git checkout develop
|
||||||
|
|
||||||
- Собираем с флагами и создаем БД для работы:
|
- Собираем с флагами и создаем БД для работы:
|
||||||
> ./configure --enable-conference --enable-advanced-functions --enable-distributed-devicestate
|
> ./configure --enable-conference --enable-advanced-functions --enable-distributed-devicestate
|
||||||
> mysql -u root asterisk < mysql-v5_enum.sql
|
> mysql -u root asterisk < mysql-v5_enum.sql
|
||||||
|
@ -62,6 +69,8 @@ Make sure you have the following installed on your system:
|
||||||
- Установка модуля
|
- Установка модуля
|
||||||
> cd /var/www/html/admin/modules/
|
> cd /var/www/html/admin/modules/
|
||||||
> git clone https://github.com/PhantomVl/sccp_manager.git
|
> git clone https://github.com/PhantomVl/sccp_manager.git
|
||||||
|
> cd /var/www/html/admin/modules/sccp_manager/
|
||||||
|
> git checkout develop
|
||||||
> amportal chown
|
> amportal chown
|
||||||
> amportal a ma install sccp_manager
|
> amportal a ma install sccp_manager
|
||||||
|
|
||||||
|
@ -73,6 +82,7 @@ Make sure you have the following installed on your system:
|
||||||
> cd /var/www/html/admin/modules/sccp_manager/
|
> cd /var/www/html/admin/modules/sccp_manager/
|
||||||
> git fetch
|
> git fetch
|
||||||
> git pull
|
> git pull
|
||||||
|
> git checkout develop
|
||||||
|
|
||||||
### Важно:
|
### Важно:
|
||||||
- Желательно иметь Firmware телефонов Cisco, языковые пакеты ну всякое разное.
|
- Желательно иметь Firmware телефонов Cisco, языковые пакеты ну всякое разное.
|
||||||
|
|
|
@ -141,8 +141,12 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
$this->init_sccp_path();
|
$this->init_sccp_path();
|
||||||
$this->initVarfromDefs();
|
$this->initVarfromDefs();
|
||||||
$this->initTftpLang();
|
$this->initTftpLang();
|
||||||
|
|
||||||
|
if (!empty($this->sccpvalues['SccpDBmodel'])) {
|
||||||
|
if ($this->sccpvalues['sccp_compatible']['data'] > $this->sccpvalues['SccpDBmodel']['data']) {
|
||||||
|
$this->sccpvalues['sccp_compatible']['data'] = $this->sccpvalues['SccpDBmodel']['data'] ;
|
||||||
|
}
|
||||||
|
}
|
||||||
// Load Advanced Form Constuctor Data
|
// Load Advanced Form Constuctor Data
|
||||||
if (empty($this->sccpvalues['displayconfig'])) {
|
if (empty($this->sccpvalues['displayconfig'])) {
|
||||||
$xml_vars = __DIR__ . '/conf/sccpgeneral.xml.v' . $this->sccpvalues['sccp_compatible']['data'];
|
$xml_vars = __DIR__ . '/conf/sccpgeneral.xml.v' . $this->sccpvalues['sccp_compatible']['data'];
|
||||||
|
@ -1463,7 +1467,7 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
function init_sccp_path() {
|
function init_sccp_path() {
|
||||||
global $db;
|
global $db;
|
||||||
global $amp_conf;
|
global $amp_conf;
|
||||||
$driver_revision = array('0' => '', '430' => '.v431', '431' => '.v432');
|
$driver_revision = array('0' => '', '430' => '.v431', '431' => '.v432', '432' => '.v432', '433' => '.v433');
|
||||||
|
|
||||||
|
|
||||||
$confDir = $amp_conf["ASTETCDIR"];
|
$confDir = $amp_conf["ASTETCDIR"];
|
||||||
|
@ -1475,6 +1479,9 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$ver_id = $this->srvinterface->get_compatible_sccp();
|
$ver_id = $this->srvinterface->get_compatible_sccp();
|
||||||
|
if (!empty($this->sccpvalues['SccpDBmodel'])) {
|
||||||
|
$ver_id =$this->sccpvalues['SccpDBmodel']['data'];
|
||||||
|
}
|
||||||
|
|
||||||
$driver = $this->FreePBX->Core->getAllDriversInfo();
|
$driver = $this->FreePBX->Core->getAllDriversInfo();
|
||||||
$sccp_driver_replace= '';
|
$sccp_driver_replace= '';
|
||||||
|
@ -1671,7 +1678,24 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
$data_value['ntp_timezone_id'] = $this->extconfigs->getextConfig('sccp_timezone', $data_value['ntp_timezone']);
|
$data_value['ntp_timezone_id'] = $this->extconfigs->getextConfig('sccp_timezone', $data_value['ntp_timezone']);
|
||||||
$data_value['server_if_list'] = $this->getIP_information();
|
$data_value['server_if_list'] = $this->getIP_information();
|
||||||
$dev_config['tftp_path'] = $this->sccppath["tftp_path"];
|
$dev_config['tftp_path'] = $this->sccppath["tftp_path"];
|
||||||
|
$dev_config['tftp_firmware'] = '';
|
||||||
|
/* if (!empty($this->sccpvalues['tftp_rewrite'])) {
|
||||||
|
if ( $this->sccpvalues['tftp_rewrite']['data'] == 'internal' ) {
|
||||||
|
$dir_list = $this->find_all_files($dev_config['tftp_path'], $dev_config['loadimage']);
|
||||||
|
foreach ($dir_list as $filek){
|
||||||
|
if (!empty($filek)) {
|
||||||
|
$fnd_path= '';
|
||||||
|
$fnd_path = str_replace($dev_config['tftp_path'],'',$filek);
|
||||||
|
$fnd_path = substr($fnd_path,1,strpos($fnd_path, $dev_config['loadimage'])-1);
|
||||||
|
if (!empty($fnd_path)) {
|
||||||
|
$dev_config['tftp_firmware'] = $fnd_path;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*/
|
||||||
$dev_config['addon_info'] = array();
|
$dev_config['addon_info'] = array();
|
||||||
if (!empty($dev_config['addon'])) {
|
if (!empty($dev_config['addon'])) {
|
||||||
$hw_addon = explode(',', $dev_config['addon']);
|
$hw_addon = explode(',', $dev_config['addon']);
|
||||||
|
@ -1745,8 +1769,19 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
// $dir = $this->sccppath["tftp_path"];
|
// $dir = $this->sccppath["tftp_path"];
|
||||||
$dir = $this->sccppath["tftp_firmware_path"];
|
$dir = $this->sccppath["tftp_firmware_path"];
|
||||||
$dir_tepl = $this->sccppath["tftp_templates"];
|
$dir_tepl = $this->sccppath["tftp_templates"];
|
||||||
$dir_list = $this->find_all_files($dir, $file_ext, 'fileonly');
|
|
||||||
|
$search_mode = '';
|
||||||
|
if (!empty($this->sccpvalues['tftp_rewrite'])) {
|
||||||
|
$search_mode = $this->sccpvalues['tftp_rewrite']['data'];
|
||||||
|
if ( $search_mode == 'pro' ) {
|
||||||
|
$dir_list = $this->find_all_files($dir, $file_ext, 'fileonly');
|
||||||
|
} else {
|
||||||
|
$dir_list = $this->find_all_files($dir, $file_ext);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$dir_list = $this->find_all_files($dir, $file_ext, 'fileonly');
|
||||||
|
}
|
||||||
|
|
||||||
$raw_settings = $this->dbinterface->getDb_model_info($get, $format_list, $filter);
|
$raw_settings = $this->dbinterface->getDb_model_info($get, $format_list, $filter);
|
||||||
|
|
||||||
if ($validate) {
|
if ($validate) {
|
||||||
|
@ -1756,8 +1791,25 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
$raw_settings[$i]['validate'] = 'no;';
|
$raw_settings[$i]['validate'] = 'no;';
|
||||||
if ((strtolower($raw_settings[$i]['vendor'] == 'cisco')) || !empty($dir_list)) {
|
if ((strtolower($raw_settings[$i]['vendor'] == 'cisco')) || !empty($dir_list)) {
|
||||||
foreach ($dir_list as $filek){
|
foreach ($dir_list as $filek){
|
||||||
if (strpos(strtolower($filek), strtolower($raw_settings[$i]['loadimage'])) !== false) {
|
switch ($search_mode) {
|
||||||
$raw_settings[$i]['validate'] = 'yes;';
|
case 'pro':
|
||||||
|
case 'on':
|
||||||
|
case 'internal':
|
||||||
|
if (strpos(strtolower($filek), strtolower($raw_settings[$i]['loadimage'])) !== false) {
|
||||||
|
$raw_settings[$i]['validate'] = 'yes;';
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'internal2':
|
||||||
|
|
||||||
|
break;
|
||||||
|
case 'off':
|
||||||
|
default: // Place in root TFTP dir
|
||||||
|
// $raw_settings[$i]['buttons'] = $dir.'/'.$raw_settings[$i]['loadimage'];
|
||||||
|
if (strpos(strtolower($filek), strtolower($dir.'/'.$raw_settings[$i]['loadimage'])) !== false) {
|
||||||
|
// if (strpos(strtolower($filek), strtolower($raw_settings[$i]['loadimage'])) !== false) {
|
||||||
|
$raw_settings[$i]['validate'] = 'yes;';
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1931,7 +1983,7 @@ private function find_all_files($dir, $file_mask=null, $mode='full'){
|
||||||
}
|
}
|
||||||
} else {$result[]=null;}
|
} else {$result[]=null;}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$sub_fiend = $this->find_all_files("$dir/$value",$file_mask,$mode);
|
$sub_fiend = $this->find_all_files("$dir/$value",$file_mask,$mode);
|
||||||
if (!empty($sub_fiend)) {
|
if (!empty($sub_fiend)) {
|
||||||
foreach($sub_fiend as $sub_value) {
|
foreach($sub_fiend as $sub_value) {
|
||||||
|
|
|
@ -220,7 +220,9 @@ class extconfigs {
|
||||||
$adv_config = Array('tftproot' => '', 'firmware' => 'firmware', 'settings' => 'settings',
|
$adv_config = Array('tftproot' => '', 'firmware' => 'firmware', 'settings' => 'settings',
|
||||||
'locales' => 'locales', 'languages' => 'languages', 'templates' => 'templates');
|
'locales' => 'locales', 'languages' => 'languages', 'templates' => 'templates');
|
||||||
$adv_tree['pro'] = Array('templates' => 'tftproot', 'settings' => 'tftproot', 'locales' => 'tftproot', 'firmware' => 'tftproot', 'languages' => 'locales');
|
$adv_tree['pro'] = Array('templates' => 'tftproot', 'settings' => 'tftproot', 'locales' => 'tftproot', 'firmware' => 'tftproot', 'languages' => 'locales');
|
||||||
$adv_tree['def'] = Array('templates' => 'tftproot', 'settings' => '', 'locales' => '', 'firmware' => '', 'languages' => '');
|
|
||||||
|
// $adv_tree['def'] = Array('templates' => 'tftproot', 'settings' => '', 'locales' => 'tftproot', 'firmware' => 'tftproot', 'languages' => '');
|
||||||
|
$adv_tree['def'] = Array('templates' => 'tftproot', 'settings' => '', 'locales' => 'tftproot', 'firmware' => 'tftproot', 'languages' => 'tftproot');
|
||||||
//* **************------ ****
|
//* **************------ ****
|
||||||
$base_tree = Array('tftp_templates' => 'templates', 'tftp_path_store' => 'settings', 'tftp_lang_path' => 'languages', 'tftp_firmware_path'=>'firmware');
|
$base_tree = Array('tftp_templates' => 'templates', 'tftp_path_store' => 'settings', 'tftp_lang_path' => 'languages', 'tftp_firmware_path'=>'firmware');
|
||||||
|
|
||||||
|
@ -230,7 +232,7 @@ class extconfigs {
|
||||||
|
|
||||||
$base_config = Array( 'asterisk' => $confDir, 'sccp_conf' => $confDir . '/sccp.conf', 'tftp_path' => '');
|
$base_config = Array( 'asterisk' => $confDir, 'sccp_conf' => $confDir . '/sccp.conf', 'tftp_path' => '');
|
||||||
|
|
||||||
|
// Test Base dir (/tftproot)
|
||||||
if (!empty($db_vars["tftp_path"])) {
|
if (!empty($db_vars["tftp_path"])) {
|
||||||
if (file_exists($db_vars["tftp_path"]["data"])) {
|
if (file_exists($db_vars["tftp_path"]["data"])) {
|
||||||
$base_config["tftp_path"] = $db_vars["tftp_path"]["data"];
|
$base_config["tftp_path"] = $db_vars["tftp_path"]["data"];
|
||||||
|
@ -253,6 +255,7 @@ class extconfigs {
|
||||||
}
|
}
|
||||||
return array('error' => 'No write permision on tftp DIR' );
|
return array('error' => 'No write permision on tftp DIR' );
|
||||||
}
|
}
|
||||||
|
// END Test Base dir (/tftproot)
|
||||||
|
|
||||||
if (!empty($db_vars['tftp_rewrite_path'])) {
|
if (!empty($db_vars['tftp_rewrite_path'])) {
|
||||||
$adv_ini = $db_vars['tftp_rewrite_path']["data"];
|
$adv_ini = $db_vars['tftp_rewrite_path']["data"];
|
||||||
|
@ -275,7 +278,7 @@ class extconfigs {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($db_vars["tftp_rewrite"]["data"] == 'on') {
|
if ($db_vars["tftp_rewrite"]["data"] == 'on') {
|
||||||
$adv_tree_mode = 'pro';
|
$adv_tree_mode = 'def';
|
||||||
}
|
}
|
||||||
foreach ($adv_tree[$adv_tree_mode] as $key => $value) {
|
foreach ($adv_tree[$adv_tree_mode] as $key => $value) {
|
||||||
if (!empty($adv_config[$key])) {
|
if (!empty($adv_config[$key])) {
|
||||||
|
|
|
@ -180,11 +180,26 @@ class srvinterface {
|
||||||
if (empty($res)) {
|
if (empty($res)) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
switch ($res["vCode"]) {
|
||||||
|
case 433:
|
||||||
|
return 433;
|
||||||
|
|
||||||
|
case 432:
|
||||||
|
case 431:
|
||||||
|
return 431;
|
||||||
|
default:
|
||||||
|
return 430;
|
||||||
|
}
|
||||||
|
/* if ($res["vCode"] >= 433) {
|
||||||
|
|
||||||
|
}
|
||||||
if ($res["vCode"] >= 431) {
|
if ($res["vCode"] >= 431) {
|
||||||
return 431;
|
return 431;
|
||||||
} else {
|
} else {
|
||||||
return 430;
|
return 430;
|
||||||
}
|
}
|
||||||
|
*
|
||||||
|
*/
|
||||||
// return $res["vCode"];
|
// return $res["vCode"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -285,6 +300,9 @@ class srvinterface {
|
||||||
if ($metadata["RevisionNum"] >= "10403") { // new method, RevisionNum is incremental
|
if ($metadata["RevisionNum"] >= "10403") { // new method, RevisionNum is incremental
|
||||||
$result["vCode"] = 432;
|
$result["vCode"] = 432;
|
||||||
}
|
}
|
||||||
|
if ($metadata["RevisionNum"] >= "10491") { // new method, RevisionNum is incremental
|
||||||
|
$result["vCode"] = 433;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (array_key_exists("ConfigureEnabled", $metadata)) {
|
if (array_key_exists("ConfigureEnabled", $metadata)) {
|
||||||
$result["futures"] = implode(';', $metadata["ConfigureEnabled"]);
|
$result["futures"] = implode(';', $metadata["ConfigureEnabled"]);
|
||||||
|
|
|
@ -274,7 +274,12 @@ class xmlinterface {
|
||||||
$xml_work->$key = time();
|
$xml_work->$key = time();
|
||||||
break;
|
break;
|
||||||
case 'loadInformation':
|
case 'loadInformation':
|
||||||
$xml_work->$key = (isset($dev_config["loadimage"])) ? $dev_config["loadimage"] : '';
|
// Set Path Image ????
|
||||||
|
if (isset($dev_config["tftp_firmware"])) {
|
||||||
|
$xml_work->$key = (isset($dev_config["loadimage"])) ? $dev_config["tftp_firmware"].$dev_config["loadimage"] : '';
|
||||||
|
} else {
|
||||||
|
$xml_work->$key = (isset($dev_config["loadimage"])) ? $dev_config["loadimage"] : '';
|
||||||
|
}
|
||||||
// $xml_work->$key = $dev_config["loadimage"];
|
// $xml_work->$key = $dev_config["loadimage"];
|
||||||
if (!empty($dev_config['addon'])) {
|
if (!empty($dev_config['addon'])) {
|
||||||
$xnode = $xml_work->addChild('addOnModules');
|
$xnode = $xml_work->addChild('addOnModules');
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
</srstInfo>
|
</srstInfo>
|
||||||
<connectionMonitorDuration>120</connectionMonitorDuration>
|
<connectionMonitorDuration>120</connectionMonitorDuration>
|
||||||
</devicePool>
|
</devicePool>
|
||||||
|
<versionStamp>{Jan 01 2003 00:00:00}</versionStamp>
|
||||||
<loadInformation>SCCP11.8-5-2S</loadInformation>
|
<loadInformation>SCCP11.8-5-2S</loadInformation>
|
||||||
<vendorConfig>
|
<vendorConfig>
|
||||||
<disableSpeaker>false</disableSpeaker>
|
<disableSpeaker>false</disableSpeaker>
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
</members>
|
</members>
|
||||||
</callManagerGroup>
|
</callManagerGroup>
|
||||||
</devicePool>
|
</devicePool>
|
||||||
|
<versionStamp>{Jan 01 2003 00:00:00}</versionStamp>
|
||||||
<loadInformation>P00308010100</loadInformation>
|
<loadInformation>P00308010100</loadInformation>
|
||||||
<vendorConfig>
|
<vendorConfig>
|
||||||
<disableSpeaker>false</disableSpeaker>
|
<disableSpeaker>false</disableSpeaker>
|
||||||
|
|
|
@ -39,6 +39,7 @@
|
||||||
</srstInfo>
|
</srstInfo>
|
||||||
<connectionMonitorDuration>120</connectionMonitorDuration>
|
<connectionMonitorDuration>120</connectionMonitorDuration>
|
||||||
</devicePool>
|
</devicePool>
|
||||||
|
<versionStamp>{Jan 01 2003 00:00:00}</versionStamp>
|
||||||
<loadInformation>P00308010100</loadInformation>
|
<loadInformation>P00308010100</loadInformation>
|
||||||
<vendorConfig>
|
<vendorConfig>
|
||||||
<disableSpeaker>false</disableSpeaker>
|
<disableSpeaker>false</disableSpeaker>
|
||||||
|
|
446
conf/Sccp.class.php.v433
Normal file
446
conf/Sccp.class.php.v433
Normal file
|
@ -0,0 +1,446 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
// vim: set ai ts=4 sw=4 ft=php:
|
||||||
|
// Version for SCCP Manager 13.0.X
|
||||||
|
//
|
||||||
|
// Templete for Sccp Driver
|
||||||
|
//
|
||||||
|
|
||||||
|
namespace FreePBX\modules\Core\Drivers;
|
||||||
|
class Sccp extends \FreePBX\modules\Core\Driver {
|
||||||
|
public $version;
|
||||||
|
// Key (db) = > key Settings
|
||||||
|
private $data_fld = array("pin"=>'pin', "label" => 'label', "accountcode" => 'account',
|
||||||
|
"context" =>'lcontext',"incominglimit"=>'incominglimit',
|
||||||
|
// "callgroup"=>'callgroup',"pickupgroup"=>'pickupgroup',
|
||||||
|
'directed_pickup_context' => 'directed_pickup_context',
|
||||||
|
'directed_pickup' => 'directed_pickup',
|
||||||
|
'pickup_modeanswer' => 'pickup_modeanswer',
|
||||||
|
'namedcallgroup'=>'namedcallgroup', 'namedpickupgroup' => 'namedpickupgroup',
|
||||||
|
"transfer" => 'transfer', "echocancel" => 'echocancel',
|
||||||
|
"language" => 'language', "description" => 'callerid',
|
||||||
|
"cid_num" => 'cid_num', "cid_name" => 'label', "mailbox" => 'mailbox',
|
||||||
|
"musicclass" => 'musicclass',
|
||||||
|
"dnd" => 'dnd', "silencesuppression" => 'silencesuppression',
|
||||||
|
"secondary_dialtone_digits" => 'secondary_dialtone_digits', "secondary_dialtone_tone" => 'secondary_dialtone_tone'
|
||||||
|
);
|
||||||
|
|
||||||
|
public function __construct($freepbx) {
|
||||||
|
parent::__construct($freepbx);
|
||||||
|
// $this->version = $freepbx->Config->get('ASTVERSION');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getInfo() {
|
||||||
|
return array(
|
||||||
|
"rawName" => "sccp",
|
||||||
|
"hardware" => "sccp_custom",
|
||||||
|
"prettyName" => _("Sccp Custom Driver"),
|
||||||
|
"shortName" => "SCCP",
|
||||||
|
"description" => _("Sccp Device"),
|
||||||
|
"Version" => "11.3.v433",
|
||||||
|
"about" => "Sccp mysql class Base ver: 11.3, Sccp ver: 433"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
public function addDevice1($id, $settings) {
|
||||||
|
$sql = 'INSERT INTO sccp (id, keyword, data, flags) values (?,?,?,?)';
|
||||||
|
$sth = $this->database->prepare($sql);
|
||||||
|
$settings = is_array($settings)?$settings:array();
|
||||||
|
foreach($settings as $key => $setting) {
|
||||||
|
$sth->execute(array($id,$key,$setting['value'],$setting['flag']));
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
public function addDevice($id, $settings) {
|
||||||
|
$add_fld = array ("name"=>'label',"outboundcid"=>'cid_num',"langcode"=>'language',"extdisplay"=>'description','devinfo_mailbox'=>'mailbox');
|
||||||
|
// print_r($_REQUEST);
|
||||||
|
// echo '<br><br>';
|
||||||
|
// die(print_r($settings));
|
||||||
|
$settings['cid_num']['value']='';
|
||||||
|
$settings['mailbox']['value']= '';
|
||||||
|
if (isset($_REQUEST)){
|
||||||
|
foreach($add_fld as $key => $val) {
|
||||||
|
if (!empty($_REQUEST[$key])){
|
||||||
|
$settings[$val]['value'] = $_REQUEST[$key];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (empty($settings['cid_num']['value'])) {
|
||||||
|
$settings['cid_num']['value']= $id;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($_REQUEST['vm']) && ($_REQUEST['vm'] =='enabled')){ // mailbox
|
||||||
|
if (empty($settings['mailbox']['value'])) {
|
||||||
|
$settings['mailbox']['value']= $id;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// die(print_r($settings));
|
||||||
|
|
||||||
|
$sql = 'REPLACE INTO sccpline (name';
|
||||||
|
$sqlv = 'values ("'.$id.'"';
|
||||||
|
foreach($this->data_fld as $key => $val) {
|
||||||
|
switch ($key) {
|
||||||
|
case 'incominglimit':
|
||||||
|
$sql .= ', '.$key;
|
||||||
|
if (!empty($settings[$val]['value'])){
|
||||||
|
$sqlv .= ", '".$settings[$val]['value']."' ";
|
||||||
|
} else {
|
||||||
|
$sqlv .= ", DEFAULT(`".$key."`)";
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'secondary_dialtone_digits':
|
||||||
|
case 'secondary_dialtone_tone':
|
||||||
|
case 'dnd':
|
||||||
|
$sql .= ', '.$key;
|
||||||
|
if (!$this->is_my_blank($settings[$val]['value'])){
|
||||||
|
$sqlv .= ", '".$settings[$val]['value']."' ";
|
||||||
|
} else {
|
||||||
|
$sqlv .= ", NULL ";
|
||||||
|
// $sqlv .= ", DEFAULT(`".$key."`)";
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
if (!empty($settings[$val]) ) {
|
||||||
|
if (!empty($settings[$val]['value'])){
|
||||||
|
$sql .= ', '.$key;
|
||||||
|
$sqlv .= ", '".$settings[$val]['value']."' ";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$sql .= ") ".$sqlv.");";
|
||||||
|
// die(print_r($sql));
|
||||||
|
$sth = $this->database->prepare($sql);
|
||||||
|
$sth->execute();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function delDevice($id) {
|
||||||
|
// $sql = "DELETE FROM sccpline WHERE id = ?";
|
||||||
|
$sql = "DELETE FROM sccpline WHERE name = ?";
|
||||||
|
$sth = $this->database->prepare($sql);
|
||||||
|
$sth->execute(array($id));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function getDevice($id) {
|
||||||
|
$sccp_line = array();
|
||||||
|
$sql = "SELECT name as id, name as name ";
|
||||||
|
foreach($this->data_fld as $key => $val) {
|
||||||
|
$sql .= ',`'. $key .'` as '.$val;
|
||||||
|
}
|
||||||
|
// $sql .= " FROM sccpline WHERE id = ?";
|
||||||
|
$sql .= " FROM sccpline WHERE name = ?";
|
||||||
|
$sth = $this->database->prepare($sql);
|
||||||
|
$result = array();
|
||||||
|
$tech = array();
|
||||||
|
try {
|
||||||
|
$sth->execute(array($id));
|
||||||
|
$result = $sth->fetch(\PDO::FETCH_ASSOC);
|
||||||
|
$tech = $result;
|
||||||
|
$tech['dial']='SCCP/'.$id;
|
||||||
|
} catch(\Exception $e) {}
|
||||||
|
|
||||||
|
// print_r($tech);
|
||||||
|
// echo '<br><br>';
|
||||||
|
// print_r($sql);
|
||||||
|
// die(print_r($id));
|
||||||
|
// echo '<br><br>';
|
||||||
|
|
||||||
|
return $tech;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getNamedGroup() {
|
||||||
|
$sql = "select namedcallgroup from sccpline group by namedcallgroup";
|
||||||
|
$sth = $this->database->prepare($sql);
|
||||||
|
$result = array();
|
||||||
|
$tech = array();
|
||||||
|
// $tech['namedcallgroup'] = '';
|
||||||
|
// $tech['namedpickupgroup'] = '';
|
||||||
|
try {
|
||||||
|
$sth->execute();
|
||||||
|
$result = $sth->fetchAll();
|
||||||
|
foreach($result as $val) {
|
||||||
|
$tech['namedcallgroup'][] = $val[0];
|
||||||
|
}
|
||||||
|
} catch(\Exception $e) {}
|
||||||
|
$sql = "select namedpickupgroup from sccpline group by namedpickupgroup";
|
||||||
|
$sth = $this->database->prepare($sql);
|
||||||
|
try {
|
||||||
|
$sth->execute();
|
||||||
|
$result = $sth->fetchAll();
|
||||||
|
foreach($result as $val) {
|
||||||
|
$tech['namedpickupgroup'][] = $val[0];
|
||||||
|
}
|
||||||
|
} catch(\Exception $e) {}
|
||||||
|
|
||||||
|
return $tech;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getDefaultDeviceSettings($id, $displayname, &$flag) {
|
||||||
|
$dial = 'SCCP';
|
||||||
|
$settings = array(
|
||||||
|
"mailbox" => array(
|
||||||
|
"value" => "",
|
||||||
|
"flag" => $flag++
|
||||||
|
),
|
||||||
|
"incominglimit" => array(
|
||||||
|
"value" => "2",
|
||||||
|
"flag" => $flag++
|
||||||
|
),
|
||||||
|
"directed_pickup_context" => array(
|
||||||
|
"value" => "from-internal",
|
||||||
|
"flag" => $flag++
|
||||||
|
),
|
||||||
|
"lcontext" => array(
|
||||||
|
"value" => "from-internal",
|
||||||
|
"flag" => $flag++
|
||||||
|
),
|
||||||
|
// "callgroup" => array(
|
||||||
|
// "value" => "from-internal",
|
||||||
|
// "flag" => $flag++
|
||||||
|
// ),
|
||||||
|
"namedcallgroup" => array(
|
||||||
|
"value" => "",
|
||||||
|
"flag" => $flag++
|
||||||
|
),
|
||||||
|
// "pickupgroup" => array(
|
||||||
|
// "value" => "",
|
||||||
|
// "flag" => $flag++
|
||||||
|
// ),
|
||||||
|
"namedpickupgroup" => array(
|
||||||
|
"value" => "",
|
||||||
|
"flag" => $flag++
|
||||||
|
),
|
||||||
|
"secondary_dialtone_digits" => array(
|
||||||
|
"value" => "9",
|
||||||
|
"flag" => $flag++
|
||||||
|
),
|
||||||
|
"secondary_dialtone_tone" => array(
|
||||||
|
"value" => "0x22",
|
||||||
|
"flag" => $flag++
|
||||||
|
),
|
||||||
|
"transfer" => array(
|
||||||
|
"value" => "on",
|
||||||
|
"flag" => $flag++
|
||||||
|
),
|
||||||
|
"echocancel" => array(
|
||||||
|
"value" => "on",
|
||||||
|
"flag" => $flag++
|
||||||
|
),
|
||||||
|
"dnd" => array(
|
||||||
|
"value" => "",
|
||||||
|
"flag" => $flag++
|
||||||
|
),
|
||||||
|
"silencesuppression" => array(
|
||||||
|
"value" => "off",
|
||||||
|
"flag" => $flag++
|
||||||
|
),
|
||||||
|
"musicclass" => array(
|
||||||
|
"value" => "default",
|
||||||
|
"flag" => $flag++
|
||||||
|
),
|
||||||
|
"pin" => array(
|
||||||
|
"value" => "",
|
||||||
|
"flag" => $flag++
|
||||||
|
),
|
||||||
|
"musicclass" => array(
|
||||||
|
"value" => "default",
|
||||||
|
"flag" => $flag++
|
||||||
|
),
|
||||||
|
);
|
||||||
|
return array(
|
||||||
|
"dial" => $dial,
|
||||||
|
"settings" => $settings
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getDeviceDisplay($display, $deviceInfo, $currentcomponent, $primarySection) {
|
||||||
|
$section = _("SCCP Extension Details");
|
||||||
|
// $category = "general";
|
||||||
|
// Assigned DID/CID
|
||||||
|
$named_group = $this->getNamedGroup();
|
||||||
|
$tmparr = array();
|
||||||
|
$tt = _("Name or id of lincked maibox");
|
||||||
|
$tmparr['mailbox'] = array('prompttext' => _('Mailbox'), 'value' => '', 'tt' => $tt, 'level' => 1, 'section' => $section);
|
||||||
|
$tt = _("The SCCP channel number for this port. If you plaining to use this line as 'Shared' or use on several devices - leave this field blank or set limit to 10 calls.");
|
||||||
|
// $tmparr['incominglimit'] = array('prompttext' => _('Incoming Call Limit'), 'value' => '2', 'tt' => $tt, 'level' => 0, 'jsvalidation' => 'isEmpty()', 'failvalidationmsg' => $msgInvalidChannel);
|
||||||
|
// $tmparr['incominglimit'] = array('prompttext' => _('Incoming Call Limit'), 'value' => '', 'tt' => $tt, 'level' => 1, 'section' => $section, 'category' => 'general');
|
||||||
|
|
||||||
|
$tmparr['incominglimit'] = array('prompttext' => _('Incoming Call Limit'), 'value' => '', 'tt' => $tt, 'level' => 1, 'section' => $section);
|
||||||
|
|
||||||
|
$tt = _("Asterisk context this device will send calls to. Only change this is you know what you are doing.");
|
||||||
|
$tmparr['lcontext'] = array('prompttext' => _('Line context'), 'value' => 'from-internal', 'tt' => $tt, 'level' => 1, 'section' => $section);
|
||||||
|
|
||||||
|
$tt = _("Asterisk context this device will can pickup calls. Only change this is you know what you are doing.");
|
||||||
|
$tmparr['directed_pickup_context'] = array('prompttext' => _('Directed PickUp Сontext '), 'value' => 'from-internal', 'tt' => $tt, 'level' => 1, 'section' => $section);
|
||||||
|
|
||||||
|
// $tt = _("Phone call group callgroup=1,3-4");
|
||||||
|
// $tmparr['callgroup'] = array('prompttext' => _('Call group id'),'value' => '', 'tt' => $tt, 'level' => 1, 'section' => $section);
|
||||||
|
|
||||||
|
$tt = _("Sets the named caller groups this line is a member of (ast111) : ");
|
||||||
|
if (!empty($named_group['namedcallgroup'])) {
|
||||||
|
foreach ($named_group['namedcallgroup'] as $val) {
|
||||||
|
$tt .= $val. ', ';
|
||||||
|
}
|
||||||
|
$tt .= '... ';
|
||||||
|
}
|
||||||
|
$tmparr['namedcallgroup'] = array('prompttext' => _('Named Call Group'),'value' => '', 'tt' => $tt, 'level' => 1, 'section' => $section);
|
||||||
|
// $tmparr['namedcallgroup'] = array('prompttext' => _('Named Call Group'),'value' => '', 'tt' => $tt, 'level' => 1, 'section' => $section, 'category' => 'general');
|
||||||
|
// $tt = _("Phone pickup group pickupgroup=1,3-4");
|
||||||
|
// $tmparr['pickupgroup'] = array('prompttext' => _('Pickup group id'),'value' => '', 'tt' => $tt, 'level' => 1, 'section' => $section);
|
||||||
|
$tt = _("Name picapuroup : ");
|
||||||
|
if (!empty($named_group['namedpickupgroup'])) {
|
||||||
|
foreach ($named_group['namedpickupgroup'] as $val) {
|
||||||
|
$tt .= $val. ', ';
|
||||||
|
}
|
||||||
|
$tt .= '... ';
|
||||||
|
}
|
||||||
|
$tmparr['namedpickupgroup'] = array('prompttext' => _('Named Pickup Group'),'value' => '', 'tt' => $tt, 'level' => 1, 'section' => $section);
|
||||||
|
// $tmparr['namedpickupgroup'] = array('prompttext' => _('Named Pickup Group'),'value' => '', 'tt' => $tt, 'level' => 1, 'section' => $section, 'category' => 'general');
|
||||||
|
$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, 'section' => $section);
|
||||||
|
|
||||||
|
unset($select);
|
||||||
|
$select[] = array( 'value' => '0x21', 'text' => 'Inside Dial Tone');
|
||||||
|
$select[] = array( 'value' => '0x22', 'text' => 'Outside Dial Tone');
|
||||||
|
$select[] = array( 'value' => '0x23', 'text' => 'Line Busy Tone');
|
||||||
|
$select[] = array( 'value' => '0x24', 'text' => 'Alerting Tone');
|
||||||
|
$select[] = array( 'value' => '0x25', 'text' => 'Reorder Tone');
|
||||||
|
$select[] = array( 'value' => '0x26', 'text' => 'Recorder Warning Tone');
|
||||||
|
$select[] = array( 'value' => '0x27', 'text' => 'Recorder Detected Tone');
|
||||||
|
$select[] = array( 'value' => '0x28', 'text' => 'Reverting Tone');
|
||||||
|
$select[] = array( 'value' => '0x29', 'text' => 'Receiver OffHook Tone');
|
||||||
|
$select[] = array( 'value' => '0x2A', 'text' => 'Partial Dial Tone');
|
||||||
|
$select[] = array( 'value' => '0x2B', 'text' => 'No Such Number Tone');
|
||||||
|
$select[] = array( 'value' => '0x2C', 'text' => 'Busy Verification Tone');
|
||||||
|
$select[] = array( 'value' => '0x2D', 'text' => 'Call Waiting Tone');
|
||||||
|
$select[] = array( 'value' => '0x2E', 'text' => 'Confirmation Tone');
|
||||||
|
$select[] = array( 'value' => '0x2F', 'text' => 'Camp On Indication Tone');
|
||||||
|
$select[] = array( 'value' => '0x30', 'text' => 'Recall Dial Tone');
|
||||||
|
$select[] = array( 'value' => '0x31', 'text' => 'Zip Zip');
|
||||||
|
$select[] = array( 'value' => '0x32', 'text' => 'Zip');
|
||||||
|
$select[] = array( 'value' => '0x33', 'text' => 'Beep Bonk');
|
||||||
|
$select[] = array( 'value' => '0x34', 'text' => 'Music Tone');
|
||||||
|
$select[] = array( 'value' => '0x35', 'text' => 'Hold Tone');
|
||||||
|
$select[] = array( 'value' => '0x36', 'text' => 'Test Tone');
|
||||||
|
$select[] = array( 'value' => '0x37', 'text' => 'DT Monitor Warning Tone');
|
||||||
|
$select[] = array( 'value' => '0x40', 'text' => 'Add Call Waiting');
|
||||||
|
$select[] = array( 'value' => '0x41', 'text' => 'Priority Call Wait');
|
||||||
|
$select[] = array( 'value' => '0x42', 'text' => 'Recall Dial');
|
||||||
|
$select[] = array( 'value' => '0x43', 'text' => 'Barg In');
|
||||||
|
$select[] = array( 'value' => '0x44', 'text' => 'Distinct Alert');
|
||||||
|
$select[] = array( 'value' => '0x45', 'text' => 'Priority Alert');
|
||||||
|
$select[] = array( 'value' => '0x46', 'text' => 'Reminder Ring');
|
||||||
|
$select[] = array( 'value' => '0x47', 'text' => 'Precedence RingBank');
|
||||||
|
$select[] = array( 'value' => '0x48', 'text' => 'Pre-EmptionTone');
|
||||||
|
$select[] = array( 'value' => '0x67', 'text' => '2105 HZ');
|
||||||
|
$select[] = array( 'value' => '0x68', 'text' => '2600 HZ');
|
||||||
|
$select[] = array( 'value' => '0x69', 'text' => '440 HZ');
|
||||||
|
$select[] = array( 'value' => '0x6A', 'text' => '300 HZ');
|
||||||
|
$select[] = array( 'value' => '0x77', 'text' => 'MLPP Pala');
|
||||||
|
$select[] = array( 'value' => '0x78', 'text' => 'MLPP Ica');
|
||||||
|
$select[] = array( 'value' => '0x79', 'text' => 'MLPP Vca');
|
||||||
|
$select[] = array( 'value' => '0x7A', 'text' => 'MLPP Bpa');
|
||||||
|
$select[] = array( 'value' => '0x7B', 'text' => 'MLPP Bnea');
|
||||||
|
$select[] = array( 'value' => '0x7C', 'text' => 'MLPP Upa');
|
||||||
|
/* !TODO!: I would remove the values below this line, except for 'No Tone' */
|
||||||
|
// $select[] = array( 'value' => '0x7F', 'text' => 'No Tone');
|
||||||
|
$select[] = array( 'value' => '0x80', 'text' => 'Meetme Greeting Tone');
|
||||||
|
$select[] = array( 'value' => '0x81', 'text' => 'Meetme Number Invalid Tone');
|
||||||
|
$select[] = array( 'value' => '0x82', 'text' => 'Meetme Number Failed Tone');
|
||||||
|
$select[] = array( 'value' => '0x83', 'text' => 'Meetme Enter Pin Tone');
|
||||||
|
$select[] = array( 'value' => '0x84', 'text' => 'Meetme Invalid Pin Tone');
|
||||||
|
$select[] = array( 'value' => '0x85', 'text' => 'Meetme Failed Pin Tone');
|
||||||
|
$select[] = array( 'value' => '0x86', 'text' => 'Meetme CFB Failed Tone');
|
||||||
|
$select[] = array( 'value' => '0x87', 'text' => 'Meetme Enter Access Code Tone');
|
||||||
|
$select[] = array( 'value' => '0x88', 'text' => 'Meetme Access Code Invalid Tone');
|
||||||
|
$select[] = array( 'value' => '0x89', 'text' => 'Meetme Access Code Failed Tone');
|
||||||
|
$select[] = array('value' => 'yes', 'text' => 'Yes');
|
||||||
|
$select[] = array('value' => 'no', 'text' => 'No');
|
||||||
|
|
||||||
|
$tt = _("Outside dialtone frequency (defaul 0x22)");
|
||||||
|
$tmparr['secondary_dialtone_tone'] = array('prompttext' => _('Secondary dialtone'), 'value' => '0x22', 'tt' => $tt, 'select' => $select, 'level' => 1, 'type' => 'select', 'section' => $section);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
unset($select);
|
||||||
|
$select[] = array('value' => '', 'text' => 'Inherit');
|
||||||
|
$select[] = array('value' => 'on', 'text' => 'Yes');
|
||||||
|
$select[] = array('value' => 'off', 'text' => 'No');
|
||||||
|
$tt = _("Enable/Disable the `directed` pickup softkey");
|
||||||
|
$tmparr['directed_pickup'] = array('prompttext' => _('Directed pickup'), 'value' => '', 'tt' => $tt, 'select' => $select, 'level' => 1, 'type' => 'radio', 'section' => $section);
|
||||||
|
|
||||||
|
unset($select);
|
||||||
|
$select[] = array('value' => '', 'text' => 'Inherit');
|
||||||
|
$select[] = array('value' => 'on', 'text' => 'Yes');
|
||||||
|
$select[] = array('value' => 'off', 'text' => 'No');
|
||||||
|
$tt = _("Should the picked/gpicked-up call be answered automatically");
|
||||||
|
$tmparr['pickup_modeanswer'] = array('prompttext' => _('Pickup Modeanswer'), 'value' => '', 'tt' => $tt, 'select' => $select, 'level' => 1, 'type' => 'radio', 'section' => $section);
|
||||||
|
|
||||||
|
unset($select);
|
||||||
|
$select[] = array('value' => '', 'text' => 'Inherit');
|
||||||
|
$select[] = array('value' => 'on', 'text' => 'Yes');
|
||||||
|
$select[] = array('value' => 'off', 'text' => 'No');
|
||||||
|
$tt = _("Allow call transfer.");
|
||||||
|
// $tmparr['transfer'] = array('prompttext' => _('Call Transfer'), 'value' => 'yes', 'tt' => $tt, 'select' => $select, 'level' => 1, 'type' => 'radio', 'section' => $section, 'category' => 'general');
|
||||||
|
$tmparr['transfer'] = array('prompttext' => _('Call Transfer'), 'value' => '', 'tt' => $tt, 'select' => $select, 'level' => 1, 'type' => 'radio', 'section' => $section);
|
||||||
|
|
||||||
|
unset($select);
|
||||||
|
$select[] = array('value' => 'on', 'text' => 'Yes');
|
||||||
|
$select[] = array('value' => 'off', 'text' => 'No');
|
||||||
|
$tt = _("Echo cancel");
|
||||||
|
$tmparr['echocancel'] = array('prompttext' => _('Echo cancel'), 'value' => 'on', 'tt' => $tt, 'select' => $select, 'level' => 1, 'type' => 'radio', 'section' => $section);
|
||||||
|
|
||||||
|
unset($select);
|
||||||
|
$select[] = array('value' => 'off', 'text' => 'Off');
|
||||||
|
$select[] = array('value' => 'reject', 'text' => 'Reject');
|
||||||
|
$select[] = array('value' => 'silent', 'text' => 'Silent');
|
||||||
|
$select[] = array('value' => 'user', 'text' => 'Cycle');
|
||||||
|
$tt = _("DND: Means how will dnd react when it is set on the device level dnd can have three states: off / busy(reject) / silent / Cycle").'<br>'.
|
||||||
|
_("Cycle - dnd that cycles through all three states off -> reject -> silent -> off (this is the normal behaviour)").'<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)");
|
||||||
|
$tmparr['dnd'] = array('prompttext' => _('DND'), 'value' => 'reject', 'tt' => $tt, 'select' => $select, 'level' => 1, 'type' => 'radio', 'section' => $section);
|
||||||
|
|
||||||
|
unset($select);
|
||||||
|
$select[] = array('value' => 'on', 'text' => 'Yes');
|
||||||
|
$select[] = array('value' => 'off', 'text' => 'No');
|
||||||
|
$tt = _("Silence Suppression. Asterisk Not suported");
|
||||||
|
$tmparr['silencesuppression'] = array('prompttext' => _('Silence Suppression'), 'value' => 'off', 'tt' => $tt, 'select' => $select, 'level' => 1, 'type' => 'radio', 'section' => $section);
|
||||||
|
|
||||||
|
unset($select);
|
||||||
|
$select[] = array('value' => 'default', 'text' => _('default'));
|
||||||
|
if (function_exists('music_list')){
|
||||||
|
$moh_list = music_list();
|
||||||
|
} else {
|
||||||
|
$moh_list = array('default');
|
||||||
|
}
|
||||||
|
foreach ($moh_list as $value) {
|
||||||
|
$select[] = array('value' => $value, 'text' => _($value));
|
||||||
|
}
|
||||||
|
|
||||||
|
$tt = _("Music on hold");
|
||||||
|
$tmparr['musicclass'] = array('prompttext' => _('Music on hold'), 'value' => '', 'tt' => $tt, 'select' => $select, 'level' => 1, 'section' => $section);
|
||||||
|
|
||||||
|
$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)");
|
||||||
|
$tmparr['pin'] = array('value' => '', 'tt' => $tt, 'level' => 1, 'section' => $section);
|
||||||
|
|
||||||
|
|
||||||
|
$devopts = $tmparr;
|
||||||
|
return $devopts;
|
||||||
|
}
|
||||||
|
public function getDeviceHeaders() {
|
||||||
|
return array(
|
||||||
|
'secret' => array('identifier' => _('Secret'), 'description' => sprintf(_('Secret [Enter "%s" to regenerate]'),"REGEN")),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
public function is_my_blank($value) {
|
||||||
|
return empty($value) && !is_numeric($value);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -138,7 +138,7 @@ and open the template in the editor. Base Version before all crash :-)
|
||||||
<button value="all">All</button>
|
<button value="all">All</button>
|
||||||
<help>Debug: Enable debugging level in SCCP module.</help>
|
<help>Debug: Enable debugging level in SCCP module.</help>
|
||||||
</item>
|
</item>
|
||||||
<item type="IS" id="6">
|
<item type="IS" id="6" seq="20">
|
||||||
<name>displayconfig</name>
|
<name>displayconfig</name>
|
||||||
<label>SCCP Config Mode </label>
|
<label>SCCP Config Mode </label>
|
||||||
<default>sccpgeneral</default>
|
<default>sccpgeneral</default>
|
||||||
|
@ -298,6 +298,16 @@ and open the template in the editor. Base Version before all crash :-)
|
||||||
</input>
|
</input>
|
||||||
<help>Call Waiting Tone: The tone played when a call is waiting. If you set this one to '0', you will not get a tone in your current call if a new call comes in, so you might want to disable call waiting for this line instead.</help>
|
<help>Call Waiting Tone: The tone played when a call is waiting. If you set this one to '0', you will not get a tone in your current call if a new call comes in, so you might want to disable call waiting for this line instead.</help>
|
||||||
</item>
|
</item>
|
||||||
|
<item type="IE" id="7">
|
||||||
|
<label>Directed pickup context</label>
|
||||||
|
<input>
|
||||||
|
<name>directed_pickup_context</name>
|
||||||
|
<default></default>
|
||||||
|
<options placeholder="default"></options>
|
||||||
|
<class>sccp-custom</class>
|
||||||
|
</input>
|
||||||
|
<help>Context where direct pickup search for extensions. if not set current contect will be use.</help>
|
||||||
|
</item>
|
||||||
<item type="IS" id="8">
|
<item type="IS" id="8">
|
||||||
<name>echocancel</name>
|
<name>echocancel</name>
|
||||||
<label>Echo Cancel</label>
|
<label>Echo Cancel</label>
|
||||||
|
@ -331,6 +341,14 @@ and open the template in the editor. Base Version before all crash :-)
|
||||||
<help>Directed Pickup Mode (Answer): If a call is sent with the "directed pickup" flag, the phone will answer when set to "Yes".</help>
|
<help>Directed Pickup Mode (Answer): If a call is sent with the "directed pickup" flag, the phone will answer when set to "Yes".</help>
|
||||||
</item>
|
</item>
|
||||||
<item type="IS" id="12">
|
<item type="IS" id="12">
|
||||||
|
<name>transfer_on_hangup</name>
|
||||||
|
<label>Transfer on hangup</label>
|
||||||
|
<default>off</default>
|
||||||
|
<button value="on">On</button>
|
||||||
|
<button value="off">Off</button>
|
||||||
|
<help>Complete transfer on hangup, without pressing transfer a second time. Will complete transfer, when the transferer puts the receiver on hook, after the destination has been reached. To cancel the transfer, either press resume on the transfered channel, press the 'endcall' softkey, or have the receiving party hangup first.</help>
|
||||||
|
</item>
|
||||||
|
<item type="IS" id="13">
|
||||||
<name>callanswerorder</name>
|
<name>callanswerorder</name>
|
||||||
<label>Call Answer Order</label>
|
<label>Call Answer Order</label>
|
||||||
<default>oldestfirst</default>
|
<default>oldestfirst</default>
|
||||||
|
@ -339,6 +357,16 @@ and open the template in the editor. Base Version before all crash :-)
|
||||||
<help>Call Answer Order: Which call should be answered first? The most common choice is "oldestfirst", but other orders are supported.</help>
|
<help>Call Answer Order: Which call should be answered first? The most common choice is "oldestfirst", but other orders are supported.</help>
|
||||||
</item>
|
</item>
|
||||||
<item type="IS" id="13">
|
<item type="IS" id="13">
|
||||||
|
<name>callhistory_answered_elsewhere</name>
|
||||||
|
<label>Call history stored book</label>
|
||||||
|
<default>Missed Calls</default>
|
||||||
|
<button value="Placed Calls">Placed Calls</button>
|
||||||
|
<button value="Received Calls">Received Calls</button>
|
||||||
|
<button value="Missed Calls">Missed Calls</button>
|
||||||
|
<button value="Ignore">Ignore</button>
|
||||||
|
<help></help>
|
||||||
|
</item>
|
||||||
|
<item type="IS" id="14">
|
||||||
<name>mwilamp</name>
|
<name>mwilamp</name>
|
||||||
<label>Message Lamp</label>
|
<label>Message Lamp</label>
|
||||||
<default>On</default>
|
<default>On</default>
|
||||||
|
@ -349,7 +377,7 @@ and open the template in the editor. Base Version before all crash :-)
|
||||||
<button value="blink">Blink</button>
|
<button value="blink">Blink</button>
|
||||||
<help>Set the MWI lamp style when MWI active to on, off, wink, flash or blink</help>
|
<help>Set the MWI lamp style when MWI active to on, off, wink, flash or blink</help>
|
||||||
</item>
|
</item>
|
||||||
<item type="IS" id="14">
|
<item type="IS" id="15">
|
||||||
<name>mwioncall</name>
|
<name>mwioncall</name>
|
||||||
<label>Message Lamp On Call</label>
|
<label>Message Lamp On Call</label>
|
||||||
<default>off</default>
|
<default>off</default>
|
||||||
|
@ -360,7 +388,6 @@ and open the template in the editor. Base Version before all crash :-)
|
||||||
</page_group>
|
</page_group>
|
||||||
<page_group name="sccp_dev_advconfig">
|
<page_group name="sccp_dev_advconfig">
|
||||||
<label>SCCP Device advanced config</label>
|
<label>SCCP Device advanced config</label>
|
||||||
|
|
||||||
<item type="IS" id="4" seq="0">
|
<item type="IS" id="4" seq="0">
|
||||||
<name>directrtp</name>
|
<name>directrtp</name>
|
||||||
<label>Direct RTP</label>
|
<label>Direct RTP</label>
|
||||||
|
@ -839,6 +866,14 @@ and open the template in the editor. Base Version before all crash :-)
|
||||||
|
|
||||||
</page_group>
|
</page_group>
|
||||||
<page_group name="sccp_extpath_config">
|
<page_group name="sccp_extpath_config">
|
||||||
|
<item type="HLP" id="2">
|
||||||
|
<label>Rewrite HELP </label>
|
||||||
|
<name>Help_tftp_rewrite</name>
|
||||||
|
<element type='p'>This section is responsible for the modes of operation of external services: tftp http.</element>
|
||||||
|
<element type='p'> * off - Flat model cisco. All data is in the directory /tftproot</element>
|
||||||
|
<element type='p'> * Custom - The directory structure is strictly defined in the manager (for internal use). Requires tftpd rewrite support.</element>
|
||||||
|
<element type='p'> * Provision - Directory structure data is read from an external file. This project supports phones that can work on tftp and http. Support rewrite.</element>
|
||||||
|
</item>
|
||||||
<label>SCCP Server Path config</label>
|
<label>SCCP Server Path config</label>
|
||||||
<item type="IE" id="1" seq="2">
|
<item type="IE" id="1" seq="2">
|
||||||
<label>SCCP TFTP SERVER Path</label>
|
<label>SCCP TFTP SERVER Path</label>
|
||||||
|
@ -868,6 +903,7 @@ and open the template in the editor. Base Version before all crash :-)
|
||||||
<option_hide class=".provision_hide">pro</option_hide>
|
<option_hide class=".provision_hide">pro</option_hide>
|
||||||
<option_show class=".provision_show">pro</option_show>
|
<option_show class=".provision_show">pro</option_show>
|
||||||
<button value="off">Disabled</button>
|
<button value="off">Disabled</button>
|
||||||
|
<button-d value="internal">Internal</button-d>
|
||||||
<button value="on">Custom</button>
|
<button value="on">Custom</button>
|
||||||
<button value="pro">Provision</button>
|
<button value="pro">Provision</button>
|
||||||
<help>Support the use of regular-expression-based filename remapping</help>
|
<help>Support the use of regular-expression-based filename remapping</help>
|
||||||
|
@ -1141,7 +1177,6 @@ and open the template in the editor. Base Version before all crash :-)
|
||||||
<button value="off">Off</button>
|
<button value="off">Off</button>
|
||||||
<help>You can specifying 'useRedialMenu = yes' in the sccp.conf device section and the redial softkey will cause the "placed calls" list instead of immediately calling the last dialed number.</help>
|
<help>You can specifying 'useRedialMenu = yes' in the sccp.conf device section and the redial softkey will cause the "placed calls" list instead of immediately calling the last dialed number.</help>
|
||||||
</item>
|
</item>
|
||||||
|
|
||||||
<item type="IS" id="6" seq="99">
|
<item type="IS" id="6" seq="99">
|
||||||
<name>force_dtmfmode</name>
|
<name>force_dtmfmode</name>
|
||||||
<label>Dual-Tone Multi-Frequency (DTMF)</label>
|
<label>Dual-Tone Multi-Frequency (DTMF)</label>
|
||||||
|
|
1502
conf/sccpgeneral.xml.v433
Normal file
1502
conf/sccpgeneral.xml.v433
Normal file
File diff suppressed because it is too large
Load diff
|
@ -166,6 +166,16 @@ and open the template in the editor. Base Version before all crash :-)
|
||||||
<class>sccp-custom</class>
|
<class>sccp-custom</class>
|
||||||
<help>Device Table: This is the devicetable for your realtime configuration. Don't change this unless you know what you are doing and have made all the appropriate changes in the rest of your Asterisk config files. There are two reasonable settings for this - the sccpdevice table or the sccpdeviceconfig view. If you do not want to use the realtime database anymore, you can set this to blank. NOT RECOMMENDED.</help>
|
<help>Device Table: This is the devicetable for your realtime configuration. Don't change this unless you know what you are doing and have made all the appropriate changes in the rest of your Asterisk config files. There are two reasonable settings for this - the sccpdevice table or the sccpdeviceconfig view. If you do not want to use the realtime database anymore, you can set this to blank. NOT RECOMMENDED.</help>
|
||||||
</item>
|
</item>
|
||||||
|
<item type="IS" id="13">
|
||||||
|
<name>callhistory_answered_elsewhere</name>
|
||||||
|
<label>Call history stored book</label>
|
||||||
|
<default>Missed Calls</default>
|
||||||
|
<button value="Placed Calls">Placed Calls</button>
|
||||||
|
<button value="Received Calls">Received Calls</button>
|
||||||
|
<button value="Missed Calls">Missed Calls</button>
|
||||||
|
<button value="Ignore">Ignore</button>
|
||||||
|
<help></help>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -246,7 +256,7 @@ and open the template in the editor. Base Version before all crash :-)
|
||||||
<button value="all">All</button>
|
<button value="all">All</button>
|
||||||
<help>Debug: Enable debugging level in SCCP module.</help>
|
<help>Debug: Enable debugging level in SCCP module.</help>
|
||||||
</item>
|
</item>
|
||||||
<item type="IS" id="6">
|
<item type="IS" id="6" seq="20">
|
||||||
<name>displayconfig</name>
|
<name>displayconfig</name>
|
||||||
<label>SCCP Config Mode </label>
|
<label>SCCP Config Mode </label>
|
||||||
<default>sccpgeneral</default>
|
<default>sccpgeneral</default>
|
||||||
|
@ -370,6 +380,16 @@ and open the template in the editor. Base Version before all crash :-)
|
||||||
</input>
|
</input>
|
||||||
<help>Autoanswer Ring Time: The amount of time the phones will ring when being called as Intercom or Paging mode.</help>
|
<help>Autoanswer Ring Time: The amount of time the phones will ring when being called as Intercom or Paging mode.</help>
|
||||||
</item>
|
</item>
|
||||||
|
<item type="IE" id="7">
|
||||||
|
<label>Directed pickup context</label>
|
||||||
|
<input>
|
||||||
|
<name>directed_pickup_context</name>
|
||||||
|
<default></default>
|
||||||
|
<options placeholder="default"></options>
|
||||||
|
<class>sccp-custom</class>
|
||||||
|
</input>
|
||||||
|
<help>Context where direct pickup search for extensions. if not set current contect will be use.</help>
|
||||||
|
</item>
|
||||||
<item type="IS" id="8">
|
<item type="IS" id="8">
|
||||||
<name>echocancel</name>
|
<name>echocancel</name>
|
||||||
<label>Echo Cancel</label>
|
<label>Echo Cancel</label>
|
||||||
|
@ -402,6 +422,14 @@ and open the template in the editor. Base Version before all crash :-)
|
||||||
<button value="off">Off</button>
|
<button value="off">Off</button>
|
||||||
<help>Directed Pickup Mode (Answer): If a call is sent with the "directed pickup" flag, the phone will answer when set to "Yes".</help>
|
<help>Directed Pickup Mode (Answer): If a call is sent with the "directed pickup" flag, the phone will answer when set to "Yes".</help>
|
||||||
</item>
|
</item>
|
||||||
|
<item type="IS" id="12">
|
||||||
|
<name>transfer_on_hangup</name>
|
||||||
|
<label>Transfer on hangup</label>
|
||||||
|
<default>off</default>
|
||||||
|
<button value="on">On</button>
|
||||||
|
<button value="off">Off</button>
|
||||||
|
<help>Complete transfer on hangup, without pressing transfer a second time. Will complete transfer, when the transferer puts the receiver on hook, after the destination has been reached. To cancel the transfer, either press resume on the transfered channel, press the 'endcall' softkey, or have the receiving party hangup first.</help>
|
||||||
|
</item>
|
||||||
<item type="IS" id="12">
|
<item type="IS" id="12">
|
||||||
<name>callanswerorder</name>
|
<name>callanswerorder</name>
|
||||||
<label>Call Answer Order</label>
|
<label>Call Answer Order</label>
|
||||||
|
@ -896,6 +924,7 @@ and open the template in the editor. Base Version before all crash :-)
|
||||||
<option_hide class=".provision_hide">pro</option_hide>
|
<option_hide class=".provision_hide">pro</option_hide>
|
||||||
<option_show class=".provision_show">pro</option_show>
|
<option_show class=".provision_show">pro</option_show>
|
||||||
<button value="off">Disabled</button>
|
<button value="off">Disabled</button>
|
||||||
|
<button-d value="internal">Internal</button-d>
|
||||||
<button value="on">Custom</button>
|
<button value="on">Custom</button>
|
||||||
<button value="pro">Provision</button>
|
<button value="pro">Provision</button>
|
||||||
<help>Support the use of regular-expression-based filename remapping</help>
|
<help>Support the use of regular-expression-based filename remapping</help>
|
||||||
|
|
1557
conf/sccpsimple.xml.v433
Normal file
1557
conf/sccpsimple.xml.v433
Normal file
File diff suppressed because it is too large
Load diff
93
install.php
93
install.php
|
@ -208,6 +208,88 @@ function Get_DB_config($sccp_compatible) {
|
||||||
'dnd' => array('create' => "enum('off','reject','silent','user') NOT NULL default 'reject'", 'modify' => "enum('off','reject','silent','user')", 'def_modify' => "reject")
|
'dnd' => array('create' => "enum('off','reject','silent','user') NOT NULL default 'reject'", 'modify' => "enum('off','reject','silent','user')", 'def_modify' => "reject")
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$db_config_v4 = array(
|
||||||
|
'sccpdevmodel' => array(
|
||||||
|
'enabled' => array('create' => "INT(2) NULL DEFAULT '0'"),
|
||||||
|
'nametemplate' => array('create' => 'VARCHAR(50) NULL DEFAULT NULL'),
|
||||||
|
'loadinformationid' => array('create' => "VARCHAR(30) NULL DEFAULT NULL")
|
||||||
|
),
|
||||||
|
'sccpdevice' => array(
|
||||||
|
'pickupexten' => array('drop' => "yes"),
|
||||||
|
'directed_pickup' => array('drop' => "yes"),
|
||||||
|
'directed_pickup_context' => array('drop' => "yes"),
|
||||||
|
'pickupcontext' => array('drop' => "yes"),
|
||||||
|
'directed_pickup_modeanswer' => array('drop' => "yes"),
|
||||||
|
'pickupmodeanswer' => array('drop' => "yes"),
|
||||||
|
'callhistory_answered_elsewhere' => array('create' => "enum('Ignore','Missed Calls','Received Calls', 'Placed Calls') NULL default NULL", 'modify' => "enum('Ignore','Missed Calls','Received Calls','Placed Calls')"),
|
||||||
|
|
||||||
|
'hwlang' => array('rename' => "_hwlang"),
|
||||||
|
'_hwlang' => array('create' => 'varchar(12) NULL DEFAULT NULL'),
|
||||||
|
'useRedialMenu' => array('create' => "VARCHAR(5) NULL DEFAULT 'no' AFTER `_hwlang`"),
|
||||||
|
//'dtmfmode' => array('create' => "VARCHAR(10) default 'outofband'", 'modify' => "VARCHAR(10)", 'def_modify'=> 'outofband'),
|
||||||
|
'dtmfmode' => array('drop' => "yes"),
|
||||||
|
// 'force_dtmfmode' => array('create' => "VARCHAR(10) default 'auto'", 'modify' => "VARCHAR(10)", 'def_modify'=> 'auto'),
|
||||||
|
'force_dtmfmode' => array('create' => "ENUM('auto','rfc2833','skinny') NOT NULL default 'auto'", 'modify' => "ENUM('auto','rfc2833','skinny')", 'def_modify'=> 'auto'),
|
||||||
|
'deny' => array('create' => 'VARCHAR(100) NULL DEFAULT NULL', 'modify' => "VARCHAR(100)"),
|
||||||
|
'permit' => array('create' => 'VARCHAR(100) NULL DEFAULT NULL', 'modify' => "VARCHAR(100)"),
|
||||||
|
'backgroundImage' => array('create' => 'VARCHAR(255) NULL DEFAULT NULL', 'modify' => "VARCHAR(255)"),
|
||||||
|
'ringtone' => array('create' => 'VARCHAR(255) NULL DEFAULT NULL', 'modify' => "VARCHAR(255)"),
|
||||||
|
'transfer' => array('create' => "enum('on','off') NOT NULL default 'on'", 'modify' => "enum('on','off')"),
|
||||||
|
'cfwdall' => array('create' => "enum('on','off') NULL default 'on'", 'modify' => "enum('on','off')"),
|
||||||
|
'cfwdbusy' => array('create' => "enum('on','off') NULL default 'on'", 'modify' => "enum('on','off')"),
|
||||||
|
'directrtp' => array('create' => "enum('on','off') NULL default NULL", 'modify' => "enum('on','off')"),
|
||||||
|
'dndFeature' => array('create' => "enum('on','off') NULL default NULL", 'modify' => "enum('on','off')"),
|
||||||
|
'earlyrtp' => array('create' => "ENUM('immediate','offHook','dialing','ringout','progress','none') NULL default NULL", 'modify' => "ENUM('immediate','offHook','dialing','ringout','progress','none')"),
|
||||||
|
'audio_tos' => array('def_modify' => "0xB8"),
|
||||||
|
'audio_cos' => array('def_modify' => "6"),
|
||||||
|
'video_tos' => array('def_modify' => "0x88"),
|
||||||
|
'video_cos' => array('def_modify' => "5"),
|
||||||
|
'trustphoneip' => array('drop' => "yes"),
|
||||||
|
'mwilamp' => array('create' => "enum('on','off','wink','flash','blink') NULL default 'on'", 'modify' => "enum('on','off','wink','flash','blink')"),
|
||||||
|
'mwioncall' => array('create' => "enum('on','off') NULL default 'on'", 'modify' => "enum('on','off')"),
|
||||||
|
'private' => array('create' => "enum('on','off') NOT NULL default 'off'", 'modify' => "enum('on','off')"), // Что-то лишенне
|
||||||
|
'privacy' => array('create' => "enum('full','on','off') NOT NULL default 'full'", 'modify' => "enum('full','on','off')"), // Что-то лишенне
|
||||||
|
'nat' => array('create' => "enum('on','off','auto') NULL default NULL", 'modify' => "enum('on','off','auto')"),
|
||||||
|
'conf_allow' => array('create' => "enum('on','off') NOT NULL default 'on'", 'modify' => "enum('on','off')"),
|
||||||
|
'conf_play_part_announce' => array('create' => "enum('on','off') NOT NULL default 'on'", 'modify' => "enum('on','off')"),
|
||||||
|
'conf_mute_on_entry' => array('create' => "enum('on','off') NOT NULL default 'off'", 'modify' => "enum('on','off')"),
|
||||||
|
'conf_show_conflist' => array('create' => "enum('on','off') NOT NULL default 'on'", 'modify' => "enum('on','off')"),
|
||||||
|
'type' => array('create' => 'VARCHAR(15) NULL DEFAULT NULL', 'modify' => "VARCHAR(15)"),
|
||||||
|
'imageversion' => array('create' => 'VARCHAR(31) NULL DEFAULT NULL', 'modify' => "VARCHAR(31)"),
|
||||||
|
'softkeyset' => array('def_modify' => "softkeyset")
|
||||||
|
),
|
||||||
|
'sccpline' => array(
|
||||||
|
'directed_pickup' => array('create' => "enum('on','off') NOT NULL default NULL", 'modify' => "enum('on','off')"),
|
||||||
|
'directed_pickup_context' => array('create' => "VARCHAR(100) NULL DEFAULT NULL"),
|
||||||
|
'pickup_modeanswer' => array('create' => "enum('on','off') NULL default NULL", 'modify' => "enum('on','off')"),
|
||||||
|
'namedcallgroup' => array('create' => "VARCHAR(100) NULL DEFAULT NULL AFTER `setvar`", 'modify' => "VARCHAR(100)"),
|
||||||
|
'namedpickupgroup' => array('create' => "VARCHAR(100) NULL DEFAULT NULL AFTER `namedcallgroup`", 'modify' => "VARCHAR(100)"),
|
||||||
|
'adhocNumber' => array('create' => "VARCHAR(45) NULL DEFAULT NULL AFTER `namedpickupgroup`"),
|
||||||
|
'meetme' => array('create' => "VARCHAR(5) NULL DEFAULT NULL AFTER `adhocNumber`"),
|
||||||
|
'meetmenum' => array('create' => "VARCHAR(45) NULL DEFAULT NULL AFTER `meetme`"),
|
||||||
|
'meetmeopts' => array('create' => "VARCHAR(45) NULL DEFAULT NULL AFTER `meetmenum`"),
|
||||||
|
'regexten' => array('create' => "VARCHAR(45) NULL DEFAULT NULL AFTER `meetmeopts`"),
|
||||||
|
'rtptos' => array('drop' => "yes"),
|
||||||
|
'audio_tos' => array('drop' => "yes"),
|
||||||
|
'audio_cos' => array('drop' => "yes"),
|
||||||
|
'video_tos' => array('drop' => "yes"),
|
||||||
|
'video_cos' => array('drop' => "yes"),
|
||||||
|
'incominglimit' => array('create' => "INT(11) DEFAULT '6'", 'modify' => 'INT(11)', 'def_modify' => "6"),
|
||||||
|
'transfer' => array('create' => "enum('on','off') NOT NULL default 'on'", 'modify' => "enum('on','off')"),
|
||||||
|
'vmnum' => array('def_modify' => "*97"),
|
||||||
|
'musicclass' => array('def_modify' => "default"),
|
||||||
|
'id' => array('create' => 'MEDIUMINT(9) NOT NULL AUTO_INCREMENT, ADD UNIQUE(id);', 'modify' => "MEDIUMINT(9)", 'index' => 'id'),
|
||||||
|
// 'id' =>array('create' => 'VARCHAR( 20 ) NULL DEFAULT NULL', 'modify' => "VARCHAR(20)", 'def_modify' =>"NULL"),
|
||||||
|
'echocancel' => array('create' => "enum('on','off') NOT NULL default 'off'", 'modify' => "enum('on','off')"),
|
||||||
|
'silencesuppression' => array('create' => "enum('on','off') NOT NULL default 'off'", 'modify' => "enum('on','off')"),
|
||||||
|
'dnd' => array('create' => "enum('off','reject','silent','user') NOT NULL default 'reject'", 'modify' => "enum('off','reject','silent','user')", 'def_modify' => "reject")
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
if ($sccp_compatible >= 433 ) {
|
||||||
|
return $db_config_v4;
|
||||||
|
}
|
||||||
if ($sccp_compatible >= 430) {
|
if ($sccp_compatible >= 430) {
|
||||||
return $db_config_v3;
|
return $db_config_v3;
|
||||||
} else {
|
} else {
|
||||||
|
@ -487,6 +569,16 @@ function InstallDB_createButtonConfigTrigger() {
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
function InstallDB_updateDBVer($sccp_compatible) {
|
||||||
|
global $db;
|
||||||
|
outn("<li>" . _("Update DB Ver") . "</li>");
|
||||||
|
$sql = "REPLACE INTO `sccpsettings` (`keyword`, `data`, `seq`, `type`), VALUES ('SccpDBmodel', '"+$sccp_compatible+ "','30','0');";
|
||||||
|
$results = $db->query($sql);
|
||||||
|
if (DB::IsError($check)) {
|
||||||
|
die_freepbx(sprintf(_("Error updating sccpdeviceconfig view. Command was: %s; error was: %s "), $sql, $results->getMessage()));
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
function InstallDB_CreateSccpDeviceConfigView($sccp_compatible) {
|
function InstallDB_CreateSccpDeviceConfigView($sccp_compatible) {
|
||||||
global $db;
|
global $db;
|
||||||
|
@ -615,6 +707,7 @@ InstallDB_fillsccpdevmodel();
|
||||||
InstallDB_updateSccpDevice();
|
InstallDB_updateSccpDevice();
|
||||||
InstallDB_createButtonConfigTrigger();
|
InstallDB_createButtonConfigTrigger();
|
||||||
InstallDB_CreateSccpDeviceConfigView($sccp_compatible);
|
InstallDB_CreateSccpDeviceConfigView($sccp_compatible);
|
||||||
|
InstallDB_updateDBVer($sccp_compatible);
|
||||||
Setup_RealTime();
|
Setup_RealTime();
|
||||||
outn("<br>");
|
outn("<br>");
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,12 @@
|
||||||
$def_val = null;
|
$def_val = null;
|
||||||
$dev_id = null;
|
$dev_id = null;
|
||||||
$dev_new = null;
|
$dev_new = null;
|
||||||
|
// Default value from Server setings
|
||||||
|
|
||||||
|
$def_val['netlang'] = array("keyword" => 'netlang', "data" => $this->sccpvalues['netlang']['data'], "seq" => "99");
|
||||||
|
$def_val['devlang'] = array("keyword" => 'devlang', "data" => $this->sccpvalues['devlang']['data'], "seq" => "99");
|
||||||
|
$def_val['directed_pickup_context'] = array("keyword" => 'directed_pickup_context', "data" => $this->sccpvalues['directed_pickup_context']['data'], "seq" => "99");
|
||||||
|
|
||||||
if (!empty($_REQUEST['new_id'])) {
|
if (!empty($_REQUEST['new_id'])) {
|
||||||
$dev_id = $_REQUEST['new_id'];
|
$dev_id = $_REQUEST['new_id'];
|
||||||
$val = str_replace(array('SEP','ATA','VG'), '', $dev_id);
|
$val = str_replace(array('SEP','ATA','VG'), '', $dev_id);
|
||||||
|
|
|
@ -767,8 +767,9 @@ foreach ($items as $child) {
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading"><?php echo _($child->label);?>
|
<div class="panel-heading">
|
||||||
<a data-toggle="collapse" href="<?php echo '#'.$res_id;?>"><i class="fa fa-plus pull-right"></i></a>
|
<h3 class="panel-title"><i class="fa fa-info-circle"></i> <nbsp> <?php echo _($child->label);?>
|
||||||
|
<a data-toggle="collapse" href="<?php echo '#'.$res_id;?>"><i class="fa fa-plus pull-right"></i></a></h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body collapse" id="<?php echo $res_id;?>">
|
<div class="panel-body collapse" id="<?php echo $res_id;?>">
|
||||||
<?php
|
<?php
|
||||||
|
|
|
@ -57,7 +57,9 @@ if (!empty($_REQUEST['id'])) {
|
||||||
<label class="control-label" for="codecw"><?php echo _("SCCP Audio Codecs (allow)") ?></label>
|
<label class="control-label" for="codecw"><?php echo _("SCCP Audio Codecs (allow)") ?></label>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-9">
|
<div class="col-md-9">
|
||||||
<?php echo \show_help(_("This is the default Codec setting for SCCP Device.")) ?>
|
<div>
|
||||||
|
<?php echo show_help(_("This is the default Codec setting for SCCP Device.")) ?>
|
||||||
|
</div>
|
||||||
<?php
|
<?php
|
||||||
$seq = 1;
|
$seq = 1;
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,7 @@ if (strlen($data) >0 ){
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
echo $this->ShowGroup('sccp_dev_config',1);
|
echo $this->ShowGroup('sccp_dev_config',1);
|
||||||
|
echo $this->ShowGroup('sccp_dev_group_config',1);
|
||||||
echo $this->ShowGroup('sccp_dev_advconfig',1);
|
echo $this->ShowGroup('sccp_dev_advconfig',1);
|
||||||
echo $this->ShowGroup('sccp_dev_softkey',1);
|
echo $this->ShowGroup('sccp_dev_softkey',1);
|
||||||
echo $this->ShowGroup('sccp_dev_url',1);
|
echo $this->ShowGroup('sccp_dev_url',1);
|
||||||
|
|
|
@ -19,6 +19,9 @@ $info['XML'] = $this->xmlinterface->info();
|
||||||
$info['sccp_class'] = $driver['sccp'];
|
$info['sccp_class'] = $driver['sccp'];
|
||||||
$info['Core_sccp'] = array('Version' => $core['Version'], 'about'=> 'Sccp ver.'. $core['Version'].' r'.$core['vCode']. ' Revision :'. $core['RevisionNum']. ' Hash :'. $core['RevisionHash']);
|
$info['Core_sccp'] = array('Version' => $core['Version'], 'about'=> 'Sccp ver.'. $core['Version'].' r'.$core['vCode']. ' Revision :'. $core['RevisionNum']. ' Hash :'. $core['RevisionHash']);
|
||||||
$info['Asterisk'] = array('Version' => FreePBX::Config()->get('ASTVERSION'), 'about'=> 'Asterisk.');
|
$info['Asterisk'] = array('Version' => FreePBX::Config()->get('ASTVERSION'), 'about'=> 'Asterisk.');
|
||||||
|
if (!empty($this->sccpvalues['SccpDBmodel'])) {
|
||||||
|
$info['DB Model'] = array('Version' => $this->sccpvalues['SccpDBmodel']['data'], 'about'=> 'SCCP DB Configure');
|
||||||
|
}
|
||||||
if (!empty($this->sccpvalues['tftp_rewrite'])) {
|
if (!empty($this->sccpvalues['tftp_rewrite'])) {
|
||||||
if ($this->sccpvalues['tftp_rewrite']['data'] == 'pro') {
|
if ($this->sccpvalues['tftp_rewrite']['data'] == 'pro') {
|
||||||
$info['Provision_SCCP'] = array('Version' => 'base', 'about'=> 'Provision Sccp enabled');
|
$info['Provision_SCCP'] = array('Version' => 'base', 'about'=> 'Provision Sccp enabled');
|
||||||
|
@ -26,18 +29,21 @@ if (!empty($this->sccpvalues['tftp_rewrite'])) {
|
||||||
$info['TFTP_Rewrite'] = array('Version' => 'base', 'about'=> 'Rewrite Supported');
|
$info['TFTP_Rewrite'] = array('Version' => 'base', 'about'=> 'Rewrite Supported');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$info['Сompatible'] = array('Version' => $this->srvinterface->get_compatible_sccp(), 'about'=> '');
|
$info['Сompatible'] = array('Version' => $this->srvinterface->get_compatible_sccp(), 'about'=> 'Ok');
|
||||||
|
if (!empty($this->sccpvalues['SccpDBmodel'])) {
|
||||||
|
if ($this->srvinterface->get_compatible_sccp()> $this->sccpvalues['SccpDBmodel']['data']){
|
||||||
|
$info['Сompatible']['about'] = '<div class="alert signature alert-danger"> Reinstall SCCP manager required</div>';
|
||||||
|
}
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
print_r("<br> Request:<br><pre>");
|
print_r("<br> Request:<br><pre>");
|
||||||
//$asss = $this->extconfigs->validate_init_path($this->sccppath["asterisk"],$this->sccpvalues,$driver_ver);
|
//$asss = $this->extconfigs->validate_init_path($this->sccppath["asterisk"],$this->sccpvalues,$driver_ver);
|
||||||
|
|
||||||
$asss = $this->srvinterface->getеtestChanSCC();
|
$asss = $this->sccpvalues;
|
||||||
$json = '';
|
$json = '';
|
||||||
print_r("<br>");
|
print_r("<br>");
|
||||||
print_r($asss);
|
print_r($asss);
|
||||||
print_r("<br>");
|
print_r("<br>");
|
||||||
$decode = json_decode($asss['JSON'], true);
|
|
||||||
print_r($decode);
|
|
||||||
|
|
||||||
print("</pre>");
|
print("</pre>");
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
<button type="button" class="btn btn-primary btn-lg" data-toggle="modal" onclick="load_oncliсk(this,'*new*')" data-target=".new_network"><i class="fa fa-bolt"></i> <?php echo _("Add Keyset"); ?></button>
|
<button type="button" class="btn btn-primary btn-lg" data-toggle="modal" onclick="load_oncliсk(this,'*new*')" data-target=".new_network"><i class="fa fa-bolt"></i> <?php echo _("Add Keyset"); ?></button>
|
||||||
</div -->
|
</div -->
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
echo $this->ShowGroup('sccp_general',1);
|
echo $this->ShowGroup('sccp_general',1);
|
||||||
echo $this->ShowGroup('sccp_dev_time_s',1);
|
echo $this->ShowGroup('sccp_dev_time_s',1);
|
||||||
echo $this->ShowGroup('sccp_net',1);
|
echo $this->ShowGroup('sccp_net',1);
|
||||||
|
|
Loading…
Reference in a new issue