From 7ae24cc71a5ebc49f38a68bffc1f152cfd5ce04f Mon Sep 17 00:00:00 2001 From: PhantomVl Date: Wed, 13 Sep 2017 15:06:07 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D1=80=D0=B5=D1=80=D0=B5=D0=BB=D0=B8?= =?UTF-8?q?=D0=B7=2013.09.2017=20=D0=9A=D0=BE=D0=BD=D1=84=D0=B8=D0=B3?= =?UTF-8?q?=D0=B8=20=D0=B8=20=D0=9F=D0=BE=D0=BC=D0=BE=D1=89=D1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 87 +++++++++++++++-------- Sccp_manager.class.php | 2 +- conf/SEP0000000000.cnf.xml_791x_template | 88 +++++++++++++++++++++++ conf/SEP0000000000.cnf.xml_796x_template | 90 ++++++++++++++++++++++++ conf/SEP0000000000.cnf.xml_79df_template | 88 +++++++++++++++++++++++ conf/XMLDefault.cnf.xml_template | 24 +++++++ views/formShow.php | 11 ++- views/sccpgeneral.xml | 37 +++++----- 8 files changed, 373 insertions(+), 54 deletions(-) create mode 100644 conf/SEP0000000000.cnf.xml_791x_template create mode 100644 conf/SEP0000000000.cnf.xml_796x_template create mode 100644 conf/SEP0000000000.cnf.xml_79df_template create mode 100644 conf/XMLDefault.cnf.xml_template diff --git a/README.md b/README.md index c69c6aa..5fbf37d 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,35 @@ -## Welcome to Chan_SCCP GUI Manager +## Welcome to Chan_SCCP GUI Manager for FreePBX ``` - ______ _____ ______ __ -| ____| | __ \| _ \ \ / / -| |__ _ __ ___ ___| |__) | |_) \ V / -| __| '__/ _ \/ _ \ ___/| _ < > < -| | | | | __/ __/ | | |_) / . \ -|_| |_| \___|\___|_| |____/_/ \_\ -Your Open Source Asterisk PBX GUI Solution + SSSSS CCCCC CCCCC PPPP +SS SS CC C CC CC PP P +SS S CC CC PPPP +SS CC CC CC CC PP + SSS CCCCC CCCCC PP + SSS + SS GGGGG UU UU IIII + SS GG UU UU II +S SS GG GGG UU UU II +SS SS GG G UU UU II + SSSSS GGGGG UUUUU IIII ``` -SCCP Manager is free software. Please see the file COPYING for details. -For documentation, please see the files in the doc subdirectory. -For building and installation instructions please see the INSTALL file. +[![Download Sccp-Mamager] (https://img.shields.io/badge/SccpGUI-build-ff69b4.svg)] (https://github.com/PhantomVl/sccp_manager/archive/master.zip) [![Download Chan-SCCP channel driver for Asterisk](https://img.shields.io/sourceforge/dt/chan-sccp-b.svg)](https://github.com/chan-sccp/chan-sccp/releases/latest) -[![Documentation](https://img.shields.io/badge/docs-wiki-blue.svg)](https://github.com/chan-sccp/chan-sccp/wiki) +[![Chan-SCCP Documentation](https://img.shields.io/badge/docs-wiki-blue.svg)](https://github.com/chan-sccp/chan-sccp/wiki) + +This module has been developed to help IT Staff with their Asterisk-Cisco infrastructure deployment, +providing easily provisioning and managing Cisco IP phones and extensions in a similar way as it does with Cisco CallManager. +The idea of creating a module is borrowed from (https://github.com/Cynjut/SCCP_Manager) +SCCP Manager is free software. Please see the file COPYING for details. + +This module has been developed to help IT Staff with their Asterisk-Cisco infrastructure deployment, +providing easily provisioning and managing Cisco IP phones and extensions in a similar way as it does with Cisco CallManager. + +This module will suit you if you are planing the to migrate from CallManager to Asterisk (or did it), SCCP-Manager allows you to administer SCCP extensions and a wide range of Cisco phone types (including IP Communicator). +You can control phone buttons (depending on the phone model) assigning multiple lines, speeddials and BLF’s. +And you can use the driver functions "sccp_chain" from the GUI module. + ### Prerequisites Make sure you have the following installed on your system: @@ -27,32 +42,44 @@ Make sure you have the following installed on your system: - asterisk >= 13.7 or asterisk >= 14.0 recommended - gui: - freepbx >= 13.0.192 -- Chan_SCCP module: - - configure flags ./configure --enable-conference --enable-advanced-functions --enable-distributed-devicestate - - creating mysql DB from sorce (mysql -u root asterisk < mysql-v5.sql) - - cofigure TFTP server - - cofigure DHCP server - standard posix compatible applications like sed, awk, tr +### Requirements +- Chan_SCCP module 4.3.0 (or later) channel driver for Asterisk: [See our WIKI] (https://github.com/chan-sccp/chan-sccp/wiki/Building-and-Installation-Guide) + - configure flags ./configure --enable-conference --enable-advanced-functions --enable-distributed-devicestate + +- Real Time cofiguration for Chan_SCCP + - Creating mysql DB from sorce (mysql -u root asterisk < mysql-v5.sql) + +- 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" + sample: copy /usr/src/chan-sccp/conf/tftp/*.xml* /tftpboot/templets/ + +- cofigure DHCP server [See our WIKI] (https://github.com/chan-sccp/chan-sccp/wiki/setup-dhcp-service) + ### Setting up a FreePBX system [See our WIKI](http://wiki.freepbx.org/display/FOP/Install+FreePBX) -### Setting up a Sccp manager +### Setting up a Sccp [See our WIKI] https://github.com/chan-sccp/chan-sccp/wiki/How-to-setup-the-chan_sccp-Module -### Module requred -SCCP channel driver Compiling: - -./configure --enable-conference --enable-advanced-functions --enable-distributed-devicestate -or -./configure --enable-indications --enable-conference --enable-advanced-functions --enable-distributed-devicestate - -copy all from sorce/conf/tftp to /tftpboot-directory - -create mysql-db -cd sorce/conf -mysql -u root asterisk < mysql-v5.sql +### Module installation +1. Download module into your local system. (/var/www/html/admin/module/) +2. Goto FreePBX Admin -> Module Admin. +3. Click Upload Modules. +4. Browse to the location of the module on your computer and select Upload. +5. Click Manage Local Modules. +6. Find and click SCCP Manager. Check Install. Click Process button. +7. Confirm installation. +8. Close Status window. +9. Apply Config to FreePBX. +### IMPORTANT NOTE: +- This system assumes you are using the SCCP Real-time Database. If you are +not yet using the RTD, you will need to set it up for this module to be +effective. +- For the correct operation of the cisco-phones you will be tempted cisco phone firmware (recomended v 8.1 or later) +- You can also use cisco language profiles to personalize sysnem and any cisco phones. diff --git a/Sccp_manager.class.php b/Sccp_manager.class.php index a9db677..1febe12 100644 --- a/Sccp_manager.class.php +++ b/Sccp_manager.class.php @@ -1614,7 +1614,7 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO { if (!(empty($var_hw_config['nametemplet']))) { $xml_templet = $this->sccppath["tftp_templets"] . '/' . $var_hw_config['nametemplet']; } else { - $xml_templet = $this->sccppath["tftp_templets"] . '/SEP0000000000.cnf.xml_791x_template'; + $xml_templet = $this->sccppath["tftp_templets"] . '/SEP0000000000.cnf.xml_79df_template'; } $xml_name = $this->sccppath["tftp_path"] . '/' . $dev_id . '.cnf.xml'; if (file_exists($xml_templet)) { diff --git a/conf/SEP0000000000.cnf.xml_791x_template b/conf/SEP0000000000.cnf.xml_791x_template new file mode 100644 index 0000000..bdd2092 --- /dev/null +++ b/conf/SEP0000000000.cnf.xml_791x_template @@ -0,0 +1,88 @@ + + + cisco + cisco + + + D-M-YA + W. Europe Standard/Daylight Time + + + x.x.x.x + Unicast + + + + + + + + + 2000 + + x.x.x.x + + + + + + Enable + x.x.x.x + 2000 + + 2000 + + 2000 + + + SCCP11.8-5-2S + + false + false + 1 + 0 + 1 + 0 + 0 + 0 + 0 + 0 + 1,7 + 08:30 + 11:30 + 01:00 + + + Netherlands + nl + 4.0(1) + iso-8859-1 + + Netherlands + + + 64 + 4.0(1) + + 1 + 3600 + http://x.x.x.x/cisco_menu/authentication.php + http://x.x.x.x/cisco_menu/idle.php + http://x.x.x.x/cisco_menu/help/help.php + + + http://x.x.x.x/cisco_menu/menu.php + http://x.x.x.x/cisco_menu/directory/menu.php + 104 + 0 + 184 + 4 + 0 + + + 3804 + + + + false + diff --git a/conf/SEP0000000000.cnf.xml_796x_template b/conf/SEP0000000000.cnf.xml_796x_template new file mode 100644 index 0000000..02afe7b --- /dev/null +++ b/conf/SEP0000000000.cnf.xml_796x_template @@ -0,0 +1,90 @@ + + + cisco + cisco + + + Netherlands + D-M-YA + W. Europe Standard/Daylight Time + + + x.x.x.x + Unicast + + + + + + + + + 2000 + + x.x.x.x + + + + + + Enable + Enable + true + x.x.x.x + 2000 + + 2000 + + 2000 + + + P00308010100 + + false + false + 1 + 0 + 1 + 0 + 0 + 0 + 0 + 0 + 1,7 + 08:30 + 11:30 + 01:00 + + + Dutch_Netherlands + nl + iso-8859-1 + + Netherlands + + + 64 + 4.0(1) + + 1 + 3600 + http://x.x.x.x/cisco_menu/authentication.php + http://x.x.x.x/cisco_menu/idle.php + http://x.x.x.x/cisco_menu/help/help.php + + + http://x.x.x.x/cisco_menu/menu.php + http://x.x.x.x/cisco_menu/directory/menu.php + 104 + 0 + 184 + 4 + 0 + + + 3804 + + + + false + diff --git a/conf/SEP0000000000.cnf.xml_79df_template b/conf/SEP0000000000.cnf.xml_79df_template new file mode 100644 index 0000000..bdd2092 --- /dev/null +++ b/conf/SEP0000000000.cnf.xml_79df_template @@ -0,0 +1,88 @@ + + + cisco + cisco + + + D-M-YA + W. Europe Standard/Daylight Time + + + x.x.x.x + Unicast + + + + + + + + + 2000 + + x.x.x.x + + + + + + Enable + x.x.x.x + 2000 + + 2000 + + 2000 + + + SCCP11.8-5-2S + + false + false + 1 + 0 + 1 + 0 + 0 + 0 + 0 + 0 + 1,7 + 08:30 + 11:30 + 01:00 + + + Netherlands + nl + 4.0(1) + iso-8859-1 + + Netherlands + + + 64 + 4.0(1) + + 1 + 3600 + http://x.x.x.x/cisco_menu/authentication.php + http://x.x.x.x/cisco_menu/idle.php + http://x.x.x.x/cisco_menu/help/help.php + + + http://x.x.x.x/cisco_menu/menu.php + http://x.x.x.x/cisco_menu/directory/menu.php + 104 + 0 + 184 + 4 + 0 + + + 3804 + + + + false + diff --git a/conf/XMLDefault.cnf.xml_template b/conf/XMLDefault.cnf.xml_template new file mode 100644 index 0000000..9cb0a06 --- /dev/null +++ b/conf/XMLDefault.cnf.xml_template @@ -0,0 +1,24 @@ + + + + + + + + 2000 + + 10.0.0.3 + + + + + + http://10.0.0.3/authentication.php + http://10.0.0.3/idle.php + http://10.0.0.3/help/help.php + + + http://10.0.0.3/menu.php + http://10.0.0.3/directory.php + + diff --git a/views/formShow.php b/views/formShow.php index 7b36a96..cf1f145 100644 --- a/views/formShow.php +++ b/views/formShow.php @@ -62,7 +62,10 @@ if ($h_show==1) { help)) { + $child->help = 'Help is not available.'; + } + if ($child['type'] == 'IE') { $res_input = ''; $res_name = ''; @@ -221,8 +224,9 @@ foreach ($items as $child) { } if ($child['type'] == 'IS') { - $res_n = (string)$child->name; - $res_id = $npref.$child->name; + $res_n = (string)$child->name; + $res_id = $npref.$child->name; + echo ''; ?>
@@ -282,6 +286,7 @@ foreach ($items as $child) { if (empty($child->class)) { $child->class = 'form-control'; } + if ($child['type'] == 'SLD') { $select_opt= $day_format; } diff --git a/views/sccpgeneral.xml b/views/sccpgeneral.xml index 52d55d7..b4f57b5 100644 --- a/views/sccpgeneral.xml +++ b/views/sccpgeneral.xml @@ -33,9 +33,6 @@ and open the template in the editor. - - Help. - servername @@ -264,7 +261,7 @@ and open the template in the editor. pool.ntp.org pool.ntp.org - Help. + NTP Server name or IP ntp_server_mode unicast @@ -272,7 +269,7 @@ and open the template in the editor. - . + Configure NTP Server protocol time syncronization @@ -289,7 +286,7 @@ and open the template in the editor. - + Date Format: Time zone @@ -303,7 +300,7 @@ and open the template in the editor. - Help. + @@ -312,7 +309,7 @@ and open the template in the editor. - Help. + The above is simply a dummy authentication page. It literally contains one word: AUTHORIZED (it receives UserId, Password, and devicename in the url - if you truly wish to implement special auth) @@ -321,7 +318,7 @@ and open the template in the editor. - Help. + URL of CiscoIPPhoneImage. Requires a non-zero setting in idleTimeout. @@ -329,7 +326,7 @@ and open the template in the editor. - Help. + @@ -337,7 +334,7 @@ and open the template in the editor. - Help. + @@ -345,7 +342,7 @@ and open the template in the editor. - Help. + This is the URL for a CiscoIPPhoneMenu which gets appended to the end of the Missed/Received/Placed calls. I don't use it (I find it makes more sense to put my phone book under services) @@ -354,7 +351,7 @@ and open the template in the editor. - Help. + @@ -365,7 +362,7 @@ and open the template in the editor. number - Help. + @@ -460,7 +457,7 @@ and open the template in the editor. no - Help. + Enables and disables auto line selection. meetme no @@ -483,7 +480,7 @@ and open the template in the editor. no - Help. + backgroundImageAccess no @@ -500,7 +497,7 @@ and open the template in the editor. /tftpboot sccp-custom - Help. + Path to tftp home directory devicetable @@ -525,7 +522,7 @@ and open the template in the editor. no - Help. + Say "yes" if you need to create cisco default language directory in tftp path. @@ -606,7 +603,7 @@ and open the template in the editor. softkeyset default - Help. + System default softkey tzoffset @@ -651,7 +648,7 @@ and open the template in the editor. 000000000 sccp-custom - Help. +