Compare commits

...

No commits in common. "develop" and "gh-pages" have entirely different histories.

97 changed files with 59 additions and 25347 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 762 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 762 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 762 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 762 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

1
.gitignore vendored
View file

@ -1 +0,0 @@
*~

121
README.md
View file

@ -1,121 +0,0 @@
## Welcome to Develop Chan_SCCP GUI Manager for FreePBX
| [English :gb:/:us:](README.md) | [Russian :ru:](README.ru.md) | [Previous Stable Releases](https://github.com/PhantomVl/sccp_manager/tree/master)
![Gif](https://github.com/chan-sccp/sccp_manager/raw/develop/.dok/image/Demo_1s5.gif)
* [Installation](https://github.com/chan-sccp/sccp_manager#installation)
* [Prerequisites](https://github.com/chan-sccp/sccp_manager#prerequisites)
* [Links](https://github.com/chan-sccp/sccp_manager#link)
* [Wiki](https://github.com/chan-sccp/sccp_manager/wiki)
## Link
[![Download Sccp-Mamager](https://img.shields.io/badge/SccpGUI-build-ff69b4.svg)](https://github.com/chan-sccp/sccp_manager/archive/tarball/develop)
[![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)
[![Chan-SCCP Documentation](https://img.shields.io/badge/docs-wiki-blue.svg)](https://github.com/chan-sccp/chan-sccp/wiki)
This FreePBX module has been developed to help IT Staff with their Asterisk-Cisco infrastructure deployment,
providing easy provisioning and management of Cisco IP phones and extensions in a similar way to Cisco CallManager.
The idea of creating a module is borrowed from (https://github.com/Cynjut/SCCP_Manager), and was further developed and managed
by PhantomVl (https://github.com/PhantomVl/sccp_manager) who has been unavailable for some time. sccp_manager relies heavily
on chan-sccp, so having the same repository will help improve integration.
SCCP Manager is free software. Please see the file COPYING for details.
This module will suit you if you are planing the to migrate from CallManager to Asterisk (or have already done 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 BLFs.
And you can use the driver functions "sccp_chain" from the GUI module.
### Wiki
You can find more information and documentation on our [![SCCP Manager Wiki](https://img.shields.io/badge/Wiki-new-blue.svg)](https://github.com/chan-sccp/wiki)
## Prerequisites
Make sure you have the following installed on your system:
- gui:
- freepbx >= 13.0.192
- a working version of [chan-sccp](https://github.com/chan-sccp/chan-sccp)
- PHPx.x-zip has to be installed (where x.x is the installed version of PHP).
For example, on Debian, using PHP7.3
```
apt-get install PHP7.3-zip
```
### Requirements
- chan-sccp module 4.3.4 (or later) channel driver for Asterisk: [See our WIKI](https://github.com/chan-sccp/chan-sccp/wiki/Building-and-Installation-Guide)
- sccp_manager expects these configure flags to be set during compilation:
```./configure --enable-conference --enable-advanced-functions --enable-distributed-devicestate --enable-video```
- TFTP Server running under (recommended) /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"
```cp /usr/src/chan-sccp/conf/tftp/\*.xml\* /tftpboot/templates/```
- configure DHCP server [See our WIKI](https://github.com/chan-sccp/chan-sccp/wiki/setup-dhcp-service)
Important!
### Setup
- [Setting up a FreePBX system](http://wiki.freepbx.org/display/FOP/Install+FreePBX)
- [Setting up Chan-Sccp](https://github.com/chan-sccp/chan-sccp/wiki/How-to-setup-the-chan_sccp-Module)
- The sccp_manager module will automatically setup and configure asterisk realtime database for chan-sccp.
For more information about realtime [See chan-sccp wiki](https://github.com/chan-sccp/chan-sccp/wiki/Realtime-Configuration).
## Installation
How to install sccp_manager
-----
1. Log in to FreePBX
2. Go to Admin -> Module Admin
3. Click Upload Modules.
4. Enter one of the following urls:
Stable - Version 14.3.
This is the latest version of sccp_manager and has many bug fixes. It is targetted for FreePbx 16 and as such requires PHP > 7.3. It works fine with FreePbx 15 as long as you can upgrade PHP (this cannot be done if you use commercial modules). There are changes to the database structure, and so this cannot be easily reverted to prior versions without using a backup, which the installer will create. If you are using a VM, it is recommended to take a snapshot before upgrading.
Upgrades via FreePbx module admin are enabled in this release, but do not work because of a FreePbx issue (a patch has been posted). To workaround this, if you see that an upgrade is available, you can download it via the command line console which is unaffected by this issue
```
fwconsole ma upgrade sccp_manager
```
```
https://github.com/chan-sccp/sccp_manager/archive/refs/tags/14.3.0.13.zip
```
Stable (For PHP < 7 only)
```
https://github.com/chan-sccp/sccp_manager/archive/refs/tags/v14.2.0.11.zip
```
Develop.
This version can be updated through module admin as modifications are made (pending fix by FreePbx)
_This is development software and so may have issues_
```
https://github.com/chan-sccp/sccp_manager/archive/refs/heads/develop.zip
```
5. Click Download From Web.
6. Click Manage Local Modules.
7. Find and click SCCP Manager. Check Install. Click Process button.
8. Confirm installation.
9. Close Status window.
10. Apply Config to FreePBX.
11. Continue to [Using-SCCP_Manager-to-Manage-chan-sccp](https://github.com/chan-sccp/chan-sccp/wiki/Using-SCCP_Manager-to-Manage-chan-sccp)
### Module update to latest state
If you installed any version >14.3.0.13, the module can be updated to the latest version via FreePBX. The GUI version FreePBX -> Admin -> Module Admin currently has a reported bug, but the upgrade can be made via the command line using
```
fwconsole ma upgrade sccp_manager
```
### IMPORTANT NOTES:
- If something stops working, use the Stable branch as described in [Installation](https://github.com/chan-sccp/sccp_manager#installation)
- This system assumes/requires that you are using the Asterisk realtime database. If you are not yet using the realtime database,
you will have to set it up for this module to work ([See](https://github.com/chan-sccp/chan-sccp/wiki/Realtime-Configuration)).
- For the cisco phones to work correctly, they should be provisioned with the latest firmware (v8.1 or higher)
- You can use cisco language profiles (localization) to switch the phones to your locale.
### Chat
[![Gitter](https://badges.gitter.im/chan-sccp/chan-sccp.svg)](https://gitter.im/sccp_manager/community)

View file

@ -1,118 +0,0 @@
## Добро пожаловать странник на SCCP страницу веб интерфейса для FreePBX (SCCP Manager)
| [English :gb:/:us:](README.md) | [Russian :ru:](README.ru.md) | [Старая страница проекта](https://github.com/PhantomVl/sccp_manager/tree/master)
![Gif](https://github.com/chan-sccp/sccp_manager/raw/develop/.dok/image/Demo_1s5.gif)
* [Installation](https://github.com/chan-sccp/sccp_manager#installation)
* [Prerequisites](https://github.com/chan-sccp/sccp_manager#prerequisites)
* [Links](https://github.com/chan-sccp/sccp_manager#link)
* [Wiki](https://github.com/chan-sccp/sccp_manager/wiki)
## Link
[![Download Sccp-Mamager](https://img.shields.io/badge/SccpGUI-build-ff69b4.svg)](https://github.com/chan-sccp/sccp_manager/archive/tarball/develop)
[![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)
[![Chan-SCCP Documentation](https://img.shields.io/badge/docs-wiki-blue.svg)](https://github.com/chan-sccp/chan-sccp/wiki)
### История
.... давнем давно в далеком прошлом ....
Группа программистов пыталось быстро бороться с несовершенством продуктов CISCO, но повседневные дела угробили проект.
Но на помощь им пришел молодой программист и возродил идею уже заброшенного проекта.
Для желающих попробовать себя в этой борьбе на просторах программирования ссылка на проект (https://github.com/Cynjut/SCCP_Manager).
### Кому это надо...
Ну в первую очередь для Себя любимого ну и для тех, у кого есть куча телефонного хлама от компании Cisco.
Если вы планируете использовать Aserisk + FreePBX, то я надеюсь, что данный модуль существенно упростит управление и настройки телефонами от Cisco.
В интернете существует замечательный проект (IMHO), который интегрирует проприетарный протокол Cisco в Asterisk, конечно, он пока далек от идеала,
но все же это замечательная замена серверам CCME, СCM, СUСM !
Ну я совершенно не представляю себе, сколько времени данный проект будет поддерживаться.
### Ну если ты еще с нами ...
Как я говорил выше, это дополнение к (Aserisk + FreePBX), но нам еще потребуется:
1. У меня не получилось поставить добиться работы с дисками Aserisk и FreePBX - собираем из исходников
1.1. Замечательная копания freepbx. Теперь с SNG7-PBX-64bit-... все работает!
2. Mysql (Maria)
3. Драйвер протокола SCCP страница (https://github.com/chan-sccp/chan-sccp/)
4. Этот модуль.
5. Руки
6. Возможно еще несколько проектов
### Вжно! В этой ветке лежат самые последне нововведения и обновления, и самые последние БАГИ!
Пользуйся и наслождайся. Так же не забывай писать нам об ошибках, которые ты нашел!
Это очень нам поможет, Я с радостью исправлю то, что ты нашел и добалю новых.
### Wiki - Основные Инструкции по настройке
Вся документация по проекту пока лежит на старой Вики [![SCCP Manager Wiki](https://img.shields.io/badge/Wiki-new-blue.svg)](https://github.com/PhantomVl/sccp_manager/wiki)
Вся документация по драйверу Chan-SCCP [![SCCP Manager Wiki](https://img.shields.io/badge/Wiki-new-blue.svg)](https://github.com/chan-sccp/wiki)
Ну и как водится у на SCCP Manager это бесплатное дополнение. И помни "(C)" означает "Копия верна". Please see the file COPYING for details.
### Prerequisites - как говориться все, что хуже этого возможно работать тоже будет .... но только вопрос как ?
Make sure you have the following installed on your system:
- PHPx.x-zip has to be installed (where x.x is the installed version of PHP).
For example, on Debian, using PHP7.3
- pbx:
- asterisk >= 1.8 (absolute minimum & not recommended)
- asterisk >= 13.7 or asterisk >= 14.0 or asterisk >= 15.0 (Тестировалось на стендах)
- gui:
- freepbx >= 13.0.192 (http://wiki.freepbx.org/display/FOP/Install+FreePBX)
- standard posix compatible applications like sed, awk, tr
- a working version of [chan-sccp](https://github.com/chan-sccp/chan-sccp)
- PHPx.x Ну тут уж как повезет, 5.6 от freepbx, но мы уже пишем под PHP7.3
```
apt-get install PHP7.3-zip
```
### Installation Очень короткая инструкция
- открой полную инструкцию [Полная версия инструкции] (https://github.com/PhantomVl/sccp_manager/wiki/step-by-step-instlation)
### Installation Другие инструкции по установке :-)
- [Setting up a FreePBX system](http://wiki.freepbx.org/display/FOP/Install+FreePBX)
- [Setting up Chan-Sccp](https://github.com/chan-sccp/chan-sccp/wiki/How-to-setup-the-chan_sccp-Module)
- [See chan-sccp wiki](https://github.com/chan-sccp/chan-sccp/wiki/Realtime-Configuration).
## Установка в Веб морде
-----
1. Log in to FreePBX
2. Go to Admin -> Module Admin
3. Click Upload Modules.
4. Enter one of the following urls:
Мы решили, что это стабильная версия:
```
https://github.com/chan-sccp/sccp_manager/archive/refs/heads/Legacy.zip
```
Для тех, кто ищет нового и интересного:
_This is development software and so may have issues_
```
https://github.com/chan-sccp/sccp_manager/archive/refs/heads/develop.zip
```
5. Жми Download From Web.
6. Открывай Manage Local Modules.
7. Практически в конце списка "SCCP Manager". Тут и так понятно, выбрать "Install", и нажать "Process".
8. "Confirm installation".
9. "Close" Status window.
10. Красная кнопка "Apply" в правом верхнем углу.
11. Далее вопрос ни одного научного труда [Using-SCCP_Manager-to-Manage-chan-sccp](https://github.com/chan-sccp/chan-sccp/wiki/Using-SCCP_Manager-to-Manage-chan-sccp)
### Важно:
- !!! Если это это проект не заработал на твоей системе - переключись на ветку мастер [master](https://github.com/PhantomVl/sccp_manager)
!!! Но есть ограничение - ветка master не поддерживает изменения в chan-sccp сделаные после октября 2018 г.
- И чуть не забыл настраиваем Realtime-Configuration ([See](https://github.com/chan-sccp/chan-sccp/wiki/Realtime-Configuration)).
- Желательно иметь Firmware телефонов Cisco, языковые пакеты ну всякое разное.
- Возможно, ты найдешь, то, что ищешь, в проекте (https://github.com/dkgroot/provision_sccp)
- Если что-то не так [Wiki GUI] (https://github.com/PhantomVl/sccp_manager), [Wiki chan-sccp] (https://github.com/chan-sccp/chan-sccp/wiki),
### Chat
[![Gitter](https://badges.gitter.im/chan-sccp/chan-sccp.svg)](https://gitter.im/sccp_manager/community)

File diff suppressed because it is too large Load diff

View file

@ -1,64 +0,0 @@
https://www.cisco.com/c/en/us/td/docs/voice_ip_comm/cata/186_188/2_15_ms/english/administration/guide/sccp/sccp/sccpaape.html
Äëÿ ðàáîòû Cisco ATA-186, 188
îáíîâëåíèå ïðîøèâêè
--- linux
/sata186us.linux -any -d3 ATA030204SCCP090202A.zup
Äëÿ ðàáîòû Cisco ATA-186, 188 ìîæåò ïîòðåáîâàòüñÿ ôàéë atadefault.cfg
---------- Config
cfgfmt.linux atadefault.txt atadefault.cfg
----------------------begin atadefault.txt ---------------------
#txt
UIPassword:0
UseTftp:1
TftpURL:0
cfgInterval:3600
EncryptKey:0
ToConfig:0
upgradecode:0,0x301,0x0400,0x0200,0.0.0.0,69,0,none
upgradelang:0,0x301,0x0400,0x0200,0.0.0.0,69,0,none
Dhcp:1
StaticIp:0
StaticRoute:0
StaticNetMask:0
CA0orCM0:172.30.122.41:2000
CA1orCM1:0
CA0UID:0
CA1UID:0
EPID0orSID0:.
EPID1orSID1:.
PrfCodec:1
LBRCodec:3
AudioMode:0x00350035
NumTxFrames:2
CallerIdMethod:0x00019e60
ConnectMode:0x90000400
DNS1IP:0.0.0.0
DNS2IP:0.0.0.0
UDPTOS:0xA0
RingCadence:2,4,25
DialTone:2,31538,30831,1380,1740,1,0,0,0
BusyTone:2,30467,28959,1191,1513,0,4000,4000,0
ReorderTone:2,30467,28959,1191,1513,0,2000,2000,0
RingBackTone:2,30831,30467,1943,2111,0,16000,32000,0
CallWaitTone:1,30831,0,5493,0,0,2400,2400,4800
ConfirmTone:1,30467,0,5970,0,0,480,480,1920
MediaPort:16384
UseMGCP:0
MGCPPort:2427
RetxIntvl:500
RetxLim:7
MGCPVer:MGCP1.0
NPrintf:0
TraceFlags:0x00000000
SigTimer:0x00000064
CodecName:PCMU,PCMA,G723,G729
OpFlags:0x2
VLANSetting:0x0000002b
-----------------------end atadefault.txt ------------------

View file

@ -1,49 +0,0 @@
Conference - NOT CONFERENCE BRIDGE !!!!! ( Sccp Conference)
Conference Introduction
The integrated conference solution build in chan-sccp-b is based on asterisk's ConfBridge functionality. In stead of having to memorize the confbridge voice menu and having to press DTMF keys to control your conference we have opted to include a visual Cisco-XML menu, which give you (the Moderator) the ability to Kick, Mute and Promote another user to become an additional Moderator.
Note: You need to './configure --enable-conference ...' when you built the chan_sccp.so module. Note: A conference always requires at least one moderator.
Conference Settings
The standard conference settings are setup per device and contain:
param default description
conf_allow yes Allow the use of conference
conf_play_general_announce yes Playback General Announcements (like: 'You are Entering/Leaving the conference')
conf_play_part_announce yes Playback Personal/Participant Announcements, (like: 'You have been muted / You have been kicked')
conf_mute_on_entry no Mute new participants from the start, when they enter the conference (Preventing them to talk amongst one another). The Moderator will have to UnMute a participant manually to allow them to speak. Useful in a classroom setting.
conf_music_on_hold_class 'default' Play music on hold of this class when no moderator is listening on the conference. If set to an empty string, no music on hold will be played.
conf_show_conflist yes Automatically show conference list to the moderator
Creating a New Conference (Conf Softkey)
Using the Conference Button makes it possible to set up a Simple Conference between 3 or more participant. (The actual minimum to start a conference is 2, but that doesn't make a lot of sense now does it.)
You already have 2 or more lines connected (One is active and the other(s) is/are on Hold), which you would like to put in a Conference; Simply Press the Conf Softkey Button.
If you do not already have these lines connected, that call some people first and then start the conference. It does not make sense to be conferencing on your own.
Conference List (ConfList Softkey)
When conf_show_conflist=yes or you press the ConfList Softkey, you will be presented with a Cisco-XML Menu, showing you all currently connected Participant. Something like this:
7970_Conference.png
You can use the Softkeys underneath the menu, for example:
Softkey Description
EndConf Hangup all participants and end the current conference
Kick Through a specific participant out of the conference (Call is hungup)
Mute Do not allow a specific participant to speak (The hear a voiceprompt stating that they have been muted (if conf_play_part_announce = yes), and the mute status is displayed on their display (if they have an sccp device))
Unmute Allow a specific participant to speak (The hear a voiceprompt stating that they have been unmuted (if conf_play_part_announce = yes), and the mute status is displayed on their display (if they have an sccp device)).
Promote Make a specific participant a moderator as well (giving them control over the conference as well). You can leave the conference by hanging up, without the conference being terminated.
Exit Leave the ConfList Menu, but remain connected to the conference. This makes it possible to put the conference onhold and invite someone new for examples. You need to press the ConfList Softkey to get back into the ConfList Menu.
Adding another Participant after the conference has already started (Join Softkey)
If you do need to add a person after having started the conference, then you need to exit the conflist menu, put the conference on hold and dial the new "future" participant, once that person has picked up, you press the join button on that new call and this new participant will be added to the conference and you will automatically resume the conference you where in before.
Once the conference is started you will be presented with the conflist menu which will allow you to control the conference directly from your phone (kick / mute participant and even promote one of the participant to become a secondary moderator, so that they can take over control of the conference and you are free to leave).
Q & A:
The Conference Softkey just created a two person conference
Question: Creating a conference call on my 7961 does not seem to work. Once I hit the Conference softbutton, it will create a conference but put me and the other person directly into the conference without giving me any way to call a third party.
Solution: Just put the first person on hold, dial the second person (and a third, fourth etc) and then press the conference button. All of the calls connected to your phone will automatically be put into the conference.

View file

@ -1,24 +0,0 @@
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.
CallListStateUpdate (java phones)
If you add/enable the 'callLogBlfEnabled' xml entry in SEPXXX.cnf.xml under commonProfile, like so:
<commonProfile>
<callLogBlfEnabled>3</callLogBlfEnabled>
</commonProfile>
and you have added hints for your local extension in your dialplan, like:
exten => _XX.,hint,SCCP/${EXTEN}
Then the placed calls list will include the status of the remote extension, like this:
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.
Note: the hints for the extension need to be in the same context as the device/global context, for callLogBlfEnabled to work
# This does not apply to phones 7940. Be careful with these keys the phone may not boot !!!

View file

@ -1,560 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<device>
<fullConfig>true</fullConfig>
<deviceProtocol>SCCP</deviceProtocol>
<sshUserId>cisco</sshUserId>
<sshPassword>cisco</sshPassword>
<!--
After using the above login, you will be prompted again for a username/password.
Use debug/debug for this second login, and type 'help' for commands.
(also see note about sshAccess below)
-->
<devicePool>
<revertPriority>0</revertPriority>
<name>Default</name>
<dateTimeSetting>
<name>Netherlands</name>
<dateTemplate>D/M/YA</dateTemplate>
<timeZone>W. Europe Standard/Daylight Time</timeZone>
<ntps>
<ntp>
<name>pool.ntp.org</name>
<ntpMode>Unicast</ntpMode>
</ntp>
</ntps>
</dateTimeSetting>
<callManagerGroup>
<name>Default</name>
<tftpDefault>true</tftpDefault>
<members>
<member priority="0">
<callManager>
<name>Asterisk</name>
<description>Primary Asterisk Server</description>
<ports>
<ethernetPhonePort>2000</ethernetPhonePort>
<!--
<sipPort>5060</sipPort>
<securedSipPort>5061</securedSipPort>
<mgcpPorts>
<listen>2427</listen>
<keepAlive>2428</keepAlive>
</mgcpPorts>
-->
</ports>
<processNodeName>x.x.x.x</processNodeName>
</callManager>
</member>
<member priority="1">
<callManager>
<name>Asterisk 1</name>
<description>Secundary Asterisk Server</description>
<ports>
<ethernetPhonePort>2000</ethernetPhonePort>
<!--
<sipPort>5060</sipPort>
<securedSipPort>5061</securedSipPort>
<mgcpPorts>
<listen>2427</listen>
<keepAlive>2428</keepAlive>
</mgcpPorts>
-->
</ports>
<processNodeName>x.x.x.x</processNodeName>
<!--
'processNodeName' is the ip address of your asterisk server.
-->
</callManager>
</member>
</members>
</callManagerGroup>
<srstInfo>
<name>Enable</name>
<srstOption>Enable</srstOption>
<userModifiable>true</userModifiable>
<ipAddr1>x.x.x.x</ipAddr1>
<port1>2000</port1>
<ipAddr2></ipAddr2>
<port2>2000</port2>
<ipAddr3></ipAddr3>
<port3>2000</port3>
<sipIpAddr1>192.168.5.101</sipIpAddr1>
<sipPort1>5060</sipPort1>
<sipIpAddr2></sipIpAddr2>
<sipPort2>5060</sipPort2>
<sipIpAddr3></sipIpAddr3>
<sipPort3>5060</sipPort3>
<isSecure>false</isSecure>
</srstInfo>
<mlppDomainId>-1</mlppDomainId>
<mlppIndicationStatus>Default</mlppIndicationStatus>
<preemption>Default</preemption>
<connectionMonitorDuration>120</connectionMonitorDuration>
</devicePool>
<commonProfile>
<phonePassword></phonePassword>
<backgroundImageAccess>true</backgroundImageAccess>
<callLogBlfEnabled>2</callLogBlfEnabled>
</commonProfile>
<vendorConfig>
<ehookEnable>1</ehookEnable>
<!--
Headset Hookswitch Control
This allows the headset to take the phone off-hook (with appropriate
cables/connections etc)
-->
<disableSpeaker>false</disableSpeaker>
<!--
Disable only the speakerphone functionality.
Disabling speakerphone functionality will not affect the handset.
true = Disabled.
false = Enabled (default).
-->
<disableSpeakerAndHeadset>false</disableSpeakerAndHeadset>
<!--
Enables and disables the speakerphone and headset.
true = Disabled.
false = Enabled (default).
-->
<pcPort>0</pcPort>
<!--
Enables and disables the Ethernet switch port on the phone so the IP phone can
have access to an Ethernet connection for a PC connection through the phone.
0 = Enabled (default).
1 = Disabled.
-->
<settingsAccess>1</settingsAccess>
<!--
Enables and disables the Settings button on an IP phone.
Indicates whether the Settings button on the phone is functional. When Settings Access is enabled, you can change the phone network configuration, ring type, and volume on the phone. When Settings Access is disabled, the Settings button is completely disabled; no options appear when you press the button. Also, you cannot adjust the ringer volume or save any volume settings. By default, Settings Access is enabled.
0 = Disabled.
1 = Enabled (default). The phone user can modify features by using the Settings menu.
2 = Restricted. The phone user is allowed to access User Preferences and volume settings only.
-->
<garp>0</garp>
<!--
Enables and disables IP phone response to gratuitous Address Resolution
Protocol (ARP) messages from the IP phone's Ethernet interface.
Indicates whether the phone will learn MAC addresses from Gratuitous ARP responses. Disabling the phones ability to accept Gratuitous ARP will prevent applications which use this mechanism for monitoring and recording of voice streams from working. If monitoring capability is not desired, change this setting to Disabled.
0 = Disabled.
1 = Enabled (default).
-->
<voiceVlanAccess>0</voiceVlanAccess>
<!--
Enables and disables spanning, which is the IP phone's access to the voice
VLAN of the PC to which the IP phone's Ethernet port is connected.
0 = Enabled (default).
1 = Disabled.
-->
<videoCapability>1</videoCapability>
<!--
a 7975G doesn't have any "real" video capability, it requires software
called video advantage to stream webcam/video from a pc connected to
the pc-port on the back of the phone. Enabled here just as a
curiosity for now.
Make sure this is only set when video is available. Seems to cause sporadic issues if not.
-->
<autoSelectLineEnable>0</autoSelectLineEnable>
<!--
Enables and disables auto line selection.
0 = Disabled.
1 = Enabled (default).
-->
<webAccess>0</webAccess>
<!--
Enables and disables web access that allows phone users to configure settings and features on User Option web pages.
This parameter indicates whether the phone will accept connections from a web browser or other HTTP client.
Disabling the web server functionality of the phone will block access to the phones internal web pages.
These pages provide statistics and configuration information.
Features, such as QRT ( Quality Report Tool ), will not function properly without access to the phones web pages.
This setting will also affect any serviceability application such as CiscoWorks 2000 that relies on web access.
The following options are available.
Disabled: Phone does not accept any HTTP connection. HTTP server is disabled on the phone.
Read Only: Phone displays web pages but does not allow any configuration.
Full: Phone displays web pages and allows configuration.
0 = Enabled (default).
1 = Disabled.
2 = Read Only.
-->
<daysDisplayNotActive>1,7</daysDisplayNotActive> <!-- sunday = 1, sat = 7 -->
<displayOnTime>08:00</displayOnTime>
<displayOnDuration>12:00</displayOnDuration>
<displayIdleTimeout>00:10</displayIdleTimeout>
<displayOnWhenIncomingCall>1</displayOnWhenIncomingCall>
<forwardingDelay>1</forwardingDelay>
<loggingDisplay>1</loggingDisplay>
<!-- <headsetWidebandUIControl>1</headsetWidebandUIControl> -->
<!--
Enables or disables wideband headset option on supported IP phones.
If the headsetWidebandUIControl parameter is set to Enable (0), the option set
in the phone UI, by the phone user, has priority over the value set for this
parameter.
0 = Enabled (default). Enables wideband headset on phone.
1 = Disabled. Disables wideband headset on phone.
-->
<!-- <handsetWidebandUIControl>1</handsetWidebandUIControl> -->
<!--
Enables or disables control of handset options by phone user.
0 = Enabled (default). Allows phone user to select either narrowband or wideband handset in the phone UI.
1 = Disabled.
-->
<!-- <headsetWidebandEnable>1</headsetWidebandEnable> -->
<!--
Enables or disables control of headset option by phone user.
0 = Enabled (default). Allows phone user to select either narrowband or wideband headset
1 = Disabled.
-->
<!-- <handsetWidebandEnable>1</handsetWidebandEnable> -->
<!--
Enables or disables wideband handset option on supported IP phones.
If the handsetWidebandUIControl parameter is set to Enable (1), the option
set in the phone UI, by the phone user, has priority over the value set for
this parameter.
0 = Phone default (default), equal to disabled or enabled and set by manufacturer.
1 = Enabled. Enables wideband handset on phone.
2 = Disabled. Disables wideband headset on phone.
-->
<spanToPCPort>1</spanToPCPort>
<!--
Enables and disables the path between the Ethernet switch port of an IP phone
and a connection to a PC.
0 = Enabled (default).
1 = Disabled.
-->
<g722CodecSupport>2</g722CodecSupport>
<!--
Enables and disables the registration of the G.722 codec on the IP phone.
0 = Phone default (default), equal to disabled or enabled and set by manufacturer.
1 = Disabled. Disables G.722-64K2 codec on phone.
2 = Enabled. Enables G.722-64K codec on phone.
See also advertiseG722Codec
-->
<peerFirmwareSharing>1</peerFirmwareSharing>
<enableCdpSwPort>1</enableCdpSwPort>
<enableCdpPcPort>1</enableCdpPcPort>
<enableLldpSwPort>1</enableLldpSwPort>
<enableLldpPcPort>1</enableLldpPcPort>
<lldpAssetId></lldpAssetId>
<powerPriority>1</powerPriority>
<!--
I have the above turned on just for curiosity.
-->
<sshAccess>0</sshAccess> <!-- 0 = enabled -->
<sshPort>22</sshPort>
<!--
The above 2 lines are *required* to enable ssh on this phone, it is off
by default.
-->
<adminPassword></adminPassword>
<!--
Password to access the web interface on the phone
string
length = 32
-->
<loadServer></loadServer>
<!--
Indicates that the phone will use an alternative server to obtain firmware loads and upgrades, rather than the defined TFTP server.
This option enables you to indicate a local server to be used for firmware upgrades, which can assist in reducing install times, particularly for upgrades over a WAN. Enter the hostname or the IP address (using standard IP addressing format) of the server. The indicated server must be running TFTP services and have the load file in the TFTP path. If the load file is not found, the load will not install. The phone will not be redirected to the TFTP server.
If this field is left blank, the phone will use the designated TFTP server to obtain its load files and upgrades
string
length = 256
-->
<WlanProfile1>0</WlanProfile1>
<!--
Only on 7921/7925/7926
Indicates whether WLAN Profile 1 can be modified by the user.
If the profile is locked, the user can not modify it.
To allow the user to edit only the username and password in the profile, set it to restricted.
0 = Unlocked
1 = Locked
2 = Restricted
-->
<WlanProfile2>0</WlanProfile1>
<WlanProfile3>0</WlanProfile1>
<WlanProfile4>0</WlanProfile1>
<specialNumbers></specialNumbers>
<!--
Only on 7921/7925/7926
Special numbers are telephone numbers that do not require unlocking the phone to call.
For example, in the United States, the 911 emergency number is a good special number candidate so that it can be dialed without unlocking the phone.
You may enter one or more special numbers in this field.
To enter more than one special number, use a comma as separator.
For example, if you want to enter 411, 511, and 911 as special numbers, enter 411,511,911 in the field without spaces.
string
length = 16
comma separated
-->
<PushToTalkURL></PushToTalkURL>
<!--
Only on 7921/7925/7926
This parameter specifies the URL which the phone contacts for application services.
-->
<sendKeyAction></sendKeyAction>
<!--
This field controls the behavior of the "Send" (green) key when it is pressed. If the "Onhook Dialing" option is selected, the phone displays a list of the last numbers dialed. If the "Offhook Dialing" option is selected, the phone sends a SCCP "offhook" message to the Cisco Unified CallManager.
-->
<phoneBookWebAccess></phoneBookWebAccess>
<!--
This field controls the accessibility of the local phone book via the web and works in conjunction with the 'Web Access' parameter. When 'Web Access' is 'Disabled', the local phone book is not accessible via the web regardless of this parameter setting. When 'Web Access' is 'Read-Only' or 'Full', access to the local phone book is as follows: 'Deny All' will not allow web access for reading or writing of the local phone book; 'Allow Admin' will allow only the phone administrator to read from and write to the local phone book.
-->
<unlockSettingsSequence></unlockSettingsSequence>
<!--
Only on 7921/7925/7926
This parameter determines if a "**#" (star-star-pound) key sequence is required for write-access to the phone's settings menu. A value of 'Enabled' requires the user to enter **# first before making changes to the settings menu. If the value is 'Disabled', the user is allowed to make modifications to the settings menu without having to enter the unlock key sequence.
-->
<appButtonTimer></appButtonTimer>
<!--
Amount of time you must hold down the Application Button to activate the application. The timer values are in seconds. A value of 0 indicates that a simple push of the Application Button will active the application. For non-zero values, the application is activated after the specified timer value expires.
-->
<appButtonPriority></appButtonPriority>
<!--
This parameter indicates the priority of the Application Button relative to all other tasks on the phone. The priorities are defined as follows.
Low: The Application Button only works when the phone is idle and on the main screen.
Medium: The Application Button takes precedence over all tasks on the phone except when the keypad is locked.
High: The Application Button takes precedence over all tasks on the phone.
-->
<outOfRangeAlert></outOfRangeAlert>
<!--
Only on 7921/7925/7926
This parameter controls the frequency of audible alerts when the phone is out of range of an access point. The phone does not play audible alerts when the parameter value is "disabled." The phone can beep once or regularly at a selected interval (10, 30, or 60 seconds) when it is out of range of an access point. Once the phone is within range of an access point, audible alerts stop.
-->
<scanningMode></scanningMode>
<!--
Only on 7921/7925/7926
This parameter controls when the phone performs scanning. The parameter values are as follow.
Auto: Phone scans when it is in a call or when the received strength signal indicator (RSSI) is low.
Single AP: Phone never scans except when the basic service set (BSS) is lost.
Continuous: Phone scans continuously even when it is not in a call.
-->
<restrictDataRates></restrictDataRates>
<!--
This parameter enables or disables the restriction of the upstream and downstream PHY rates according to CCX V4 Traffic Stream Rate Set IE (S54.2.6).
-->
<powerOffWhenCharging></powerOffWhenCharging>
<!--
Only on 7921/7925/7926
This parameter indicates whether the phone powers off when it is connected to a charger or placed in a charging station.
-->
<cdpEnable></cdpEnable>
<!--
This parameter enables or disables the Cisco Discovery Protocol (CDP) on the phone.
-->
<g722CodecSupport></g722CodecSupport>
<!--
This parameter indicates whether the phone will advertise the G.722 codec to the Cisco Unified CallManager. Codec negotiation involves two steps: first, the phone must advertise the supported codec(s) to the Cisco Unified CallManager (not all endpoints support the same set of codecs). Second, when the Cisco Unified CallManager gets the list of supported codecs from all phones involved in the call attempt, it chooses a commonly-supported codec based on various factors, including the region pair setting. Valid values specify Use System Default (this phone will defer to the setting specified in the enterprise parameter, Advertise G.722 Codec), Disabled (this phone will not advertise G.722 to the Cisco Unified CallManager) or Enabled (this phone will advertise G.722 to the Cisco Unified CallManager).
-->
<homeScreen></homeScreen>
<!--
This parameter sets the phone's default home screen.
-->
<fipsMode></fipsMode>
<!--
This parameter sets the Federal Information Processing Standards (FIPS) mode for the phone. The Cisco 7926 is a FIPS 140-2 level 1 compliant device when this option is enabled.
-->
<autoSelectLineEnable></autoSelectLineEnable>
<!--
When enabled, indicates that the phone will shift the call focus to incoming calls on all lines. When disabled, the phone will only shift the focus to incoming calls on the currently used line.
-->
<bluetooth></bluetooth>
<!--
Indicates whether the Bluetooth device on the phone is enabled or disabled.
-->
<fileSystemVerificationEnable></fileSystemVerificationEnable>
<!--
This parameter indicates whether the phone will perform a file system integrity check as part of the firmware upgrade process. Enable this option to troubleshoot file system issues. This feature may impact phone performance if it is enabled.
-->
<barCodeSymbologyGroup></barCodeSymbologyGroup>
<!--
Only on 7921/7925/7926
-->
<scannerCommands></scannerCommands>
<!--
Only on 7921/7925/7926
-->
<minimumRingVolume></minimumRingVolume>
<!--
-->
<java></java>
<!--
-->
<headsetHandsetMonitor>0</handsetHeadsetMonitor>
<!--
0: will not enable the handset monitoring and only the headset will be active
1: will enable activate both the headset as well as the handset during a call
-->
<detectCMConnectionFailure>0</detectCMConnectionFailure>
<!--
Switch from measured keepalive packet delivery time falure detection to delayed failure detection
See: https://github.com/chan-sccp/chan-sccp/wiki/Unregister%2C-ReRegistering%2C-Keepalive-issues
See: http://www.cisco.com/c/en/us/support/docs/collaboration-endpoints/unified-ip-phone-7900-series/200410-Troubleshoot-IP-Phone-Unregistration-A.html
0: Normal Failure Detection
1: Delayed Failure Detection
-->
</vendorConfig>
<versionStamp>{Jan 01 2003 00:00:00}</versionStamp>
<loadInformation>P00308010100</loadInformation>
<!--
The firmware version that the phone looks for at boot.
Can be either the actual firmware version like P00308010100 or SCCP70.8-5-4S or a reference to the termXX.default file.
The later is actually much easier to maintain, just unpack the new firmware, which replaces the termXX.default.loads file.
You don't have to update all your SEP... files because it just refers them to the loads file, from which they get the
new firmware version number.
-->
<userLocale>
<name>Dutch_Netherlands</name>
<langCode>nl</langCode>
<winCharSet>iso-8859-1</winCharSet>
</userLocale>
<networkLocale>Netherlands</networkLocale>
<networkLocaleInfo>
<name>Dutch_Netherlands</name>
<langCode>nl</langCode>
<uid>64</uid>
<version>4.0(1)</version>
</networkLocaleInfo>
<!--
This is something to do with dialtones. The above config gives Dutch dialtones.
-->
<authenticationURL>http://x.x.x.x/cisco_menu/authentication.php</authenticationURL>
<!--
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)
-->
<informationURL>http://x.x.x.x/cisco_menu/help/help.php</informationURL>
<messagesURL></messagesURL>
<proxyServerURL></proxyServerURL>
<servicesURL>http://x.x.x.x/cisco_menu/menu.php</servicesURL>
<directoryURL>http://x.x.x.x/cisco_menu/directory/menu.php</directoryURL>
<!--
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)
-->
<idleURL>http://x.x.x.x/cisco_menu/idle.php</idleURL>
<!--
URL of CiscoIPPhoneImage.
Requires a non-zero setting in idleTimeout.
-->
<idleTimeout>3600</idleTimeout>
<deviceSecurityMode>1</deviceSecurityMode>
<phonePersonalization>1</phonePersonalization>
<!--
ToDo Three options. Must be numeric. actual numerics need to be confirmed
0 Disabled-The user cannot customize the Cisco Unified IP Phone by using Phone Designer.
1 Enabled-The user can use Phone Designer to customize the phone.
2 Default-The phone uses the configuration from the Phone Personalization enterprise parameter if you choose Default in both the Phone Configuration and Common Phone Profile Configuration windows. If you choose Default in the Common Phone Profile Configuration window but not in the Phone Configuration window, the phone uses the configuration that you specify in the Phone Configuration window.
-->
<singleButtonBarge>1</singleButtonBarge>
<joinAcrossLines>1</joinAcrossLines>
<autoCallPickupEnable>false</autoCallPickupEnable>
<blfAudibleAlertSettingOfIdleStation>1</blfAudibleAlertSettingOfIdleStation>
<blfAudibleAlertSettingOfBusyStation>1</blfAudibleAlertSettingOfBusyStation>
<advertiseG722Codec>1</advertiseG722Codec>
<mobility>
<handoffdn></handoffdn>
<dtmfdn></dtmfdn>
<ivrdn></ivrdn>
<dtmfHoldCode>*81</dtmfHoldCode>
<dtmfExclusiveHoldCode>*82</dtmfExclusiveHoldCode>
<dtmfResumeCode>*83</dtmfResumeCode>
<dtmfTxfCode>*84</dtmfTxfCode>
<dtmfCnfCode>*85</dtmfCnfCode>
</mobility>
<dscpForSCCPPhoneConfig>104</dscpForSCCPPhoneConfig>
<dscpForSCCPPhoneServices>0</dscpForSCCPPhoneServices>
<dscpForCm2Dvce>184</dscpForCm2Dvce>
<transportLayerProtocol>4</transportLayerProtocol>
<capfAuthMode>0</capfAuthMode>
<capfList>
<capf>
<phonePort>3804</phonePort>
</capf>
</capfList>
<certHash></certHash>
<encrConfig>false</encrConfig>
<phoneServices>
<provisioning>0</provisioning>
<!-- provisioning:
0 = Use PhoneServices
1 = Use ServicerURL / DirectoryURL and MessagesURL (Above)
2 = Use Both (Merge Both)
-->
<!-- Below
type = 0 -> applicaton menu
type = 1 -> contacts menu
type = 2 -> messages menu
-->
<phoneService type="0" category="0">
<name>Corporate Directory</name>
<url>Application:Cisco/CorporateDirectory</url>
<vendor></vendor>
<version></version>
</phoneService>
<phoneService type="1" category="0">
<name>Missed Calls</name>
<url>Application:Cisco/MissedCalls</url>
<vendor></vendor>
<version></version>
</phoneService>
<phoneService type="1" category="0">
<name>Received Calls</name>
<url>Application:Cisco/ReceivedCalls</url>
<vendor></vendor>
<version></version>
</phoneService>
<phoneService type="1" category="0">
<name>Placed Calls</name>
<url>Application:Cisco/PlacedCalls</url>
<vendor></vendor>
<version></version>
</phoneService>
<phoneService type="1" category="0">
<name>Personal Directory</name>
<url>Application:Cisco/PersonalDirectory</url>
<vendor></vendor>
<version></version>
</phoneService>
<phoneService type="2" category="0">
<name>Voicemail</name>
<url>Application:Cisco/Voicemail</url>
<vendor></vendor>
<version></version>
</phoneService>
</phoneServices>
</device>

View file

@ -1,8 +0,0 @@
http://usecallmanager.nz/sepmac-cnf-xml.html
http://usecallmanager.nz/line-keys-xml.html
http://usecallmanager.nz/user-locale.html
https://www.voip-info.org/wiki/view/Asterisk+phone+cisco+79x1+xml+configuration+files+for+SIP
https://www.voip-info.org/wiki/view/Asterisk+phone+cisco+7970+SIP
https://www.cisco.com/c/en/us/td/docs/voice_ip_comm/cuipph/all_models/xsi/8_5_1/xsi_dev_guide/xmlobjects.html
https://habrahabr.ru/post/176019/
https://learningnetwork.cisco.com/thread/14585

View file

@ -1,91 +0,0 @@
Config Structure & Handling explained
-------------------------------------
Asterisk has a config parsing system that provides a generic interface to
config sections and paramater, this system has multiple backends like
ini, ldap, database that all present their data in a unified structure.
From chan-sccp's view all the config sections and parameters looks exactly
the same. In principal we don't have to know where the settings are coming
from, we just need to be able to handle three cases:
- requested section+paramater does not exist -> error
- requested section+parameter exists and returns a value
- requested section+parameter exists and returns NULL (ie: no field present in
ini/table or is set to NULL)
Based on this simple view of the world we built sccp_config.c and it's
primary source of information sccp_config_entries.hh. The latter contains:
- all valid config sections and parameters
- their links to the in memory entity structures (POD's)
- flags:
- their deprecated/obsolete status
- their value inheritance structure, device or lines can inherit values from
the [general] section if they are not provided (See more about inheritance
below)
- what to do when a value changes (either directly or through inheritance)
- ultimate fallback value for parameter that cannot be/work `unspecified`
- dedicated parser required to process the value, if a generic parser would
not work (for example handling codecs, deny/permit)
- help descriptions for each parameter
Config value inheritance
------------------------
sccp_config_entries.hh contains universal fallback values for parameters
that cannot work without one. Without this ultimate fallback
value, chan-sccp would crash/not work. For example chan-sccp would not know
what tcp-port to use for it's listerning connection, if not provided.
They are built-in fallback values fixed at compile time.
sccpdevices or sccplines can inherit values from the general section
in sccp.conf. The parameters in the general section are further backed by
the sccp_config_entries.hh with it's fallback value, in case they
are not provided.
So for example:
If sccpdevice:keepalive is not set, it will get it's value from
general:keepalive, which if not set, will fallback to the value provided
in sccp_config_entries.hh. The actual sccpdevice:keepalive is on evaluated
at the moment the device is connecting and registering to chan-sccp, at
which moment the value trickles down. So let's assume this situation:
sccp.conf:
```
[general]
;keepalive=120
[SEPxxxxx]
;keepalive=140
```
In this case the universal default will be provided by
sccp_config_entries.hh. When we now set general:keepalive to 120 and issue
`sccp reload`, all devices will have to be restart (RESTART_REQUIRED flag
is set for keepalive in sccp_config_entries.hh). They will start to connect
again, and the keepalive parameter is reevalueated, they will now see that
they do not have a personal keepalive parameter provided and will use the
general one, instead.
Note: inheritance is specifically specified in the sccp_config_entries.hh
file and just not automatically happen just based on the parameter name for
example.
You can think of the sccp_config_entries.hh and a universal section in the
sccp.conf that has a slew of fallback values that are there to have your
back. It will allow you to get by with a minimal config file without having
to worry about chan-sccp not working, becasue you forgot to set the port
number for example.
So mentally you can think of it like this:
```
[universal]
keepalive=60
[general]
;keepalive=120
[SEPxxxxx]
;keepalive=140
```
Note: changing sccp_config_entries.hh after the binary has been build, will
not do anything, the fallback values are backed into the final binary at
compile time.

View file

@ -1,57 +0,0 @@
https://github.com/chan-sccp/chan-sccp/wiki/Adding-custom-background-images
http://www.voicecerts.com/2011/08/changing-cisco-ip-phone-background.html
https://silver-golem.livejournal.com/432591.html
> Real Time !
http://silver-golem.livejournal.com/431942.html
General Information
Cisco IP Phones support either colored or monochrom background images in various resolutions (depending on model). The background can either be set up in sccp.conf server side or the user can be enabled to select a background image from a defined list of backgrounds. The image has to be a graphic file with .PNG extension. Other requirements apply, depending on phone model (see below).
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.
[SEPXXXXXXXXX]
...
backgroundImage=http://PATH-TO-BACKGROUND-IMAGE/filename.png
!!!> Phone personalization needs to be set to allow the server to push background or ringtones to the phone in the SEPXXXXXXXXXX.cnf.xml of each phone:
------------------------------------
<phonePersonalization>1</phonePersonalization>
------------------------------------
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:
Phone Model Image Size Thumbnail Size Directory
7906 / 7911 95x34 23x8 /Desktops/95x34x1
7941 / 7961 320x196 80x49 /Desktops/320x196x4
7942 / 7962 320x196 80x49 /Desktops/320x196x4
7945 / 7965 320x212 80x53 /Desktops/320x212x16
7970 / 7971 320x212 80x53 /Desktops/320x212x12
7975 320x216 80x53 /Desktops/320x216x16
7985 800x600 not supported /Desktops/800x600x16
8941 / 8945 640x480 123x111 /Desktops/640x480x24
The Image file is used for the background of the phone display. An additional thumbnail is used as a preview image on the phone settings menu (on 7985 only the filename). The List.xml has to be in the above model-depending directory. The file has a Cisco IPPhoneImage syntax, example:
<CiscoIPPhoneImageList>
<ImageItem Image="TFTP:Desktops/640x480x24/sccp-tn.png"
URL="TFTP:Desktops/640x480x24/sccp.png"/>
<ImageItem Image="TFTP:Desktops/640x480x24/sccp_2-tn.png"
URL="TFTP:Desktops/640x480x24/sccp_2.png"/>
</CiscoIPPhoneImageList>
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>

View file

@ -1,11 +0,0 @@
Убрать коменты
в sccpgeneral.xml
- <item type="SLA-disabled" id="6"><label>Default Dial Plan</label>
+ <item type="SLA" id="6"><label>Default Dial Plan</label>
в Sccp_manager.class.php
// "sccpdialplan" => array(
// "name" => _("SCCP Dial Plan information"),
// "page" => 'views/server.dialtemplate.php'
// )

View file

@ -1 +0,0 @@
https://github.com/chan-sccp/chan-sccp/wiki/Monitor-and-Pickup-Incoming-Calls-via-Speeddial-Using-Custom-Devstate

View file

@ -1,58 +0,0 @@
diff --git a/src/sccp_config.c b/src/sccp_config.c
index e15d19db..c78bcbf2 100644
--- a/src/sccp_config.c
+++ b/src/sccp_config.c
@@ -3062,6 +3062,7 @@ int sccp_manager_config_metadata(struct mansession *s, const struct message *m)
uint i;
const char *id = astman_get_header(m, "ActionID");
const char *req_segment = astman_get_header(m, "Segment");
+ const char *req_listresult = astman_get_header(m, "ListResult");
uint comma = 0;
if (sccp_strlen_zero(req_segment)) { // return all segments
@@ -3180,11 +3181,22 @@ int sccp_manager_config_metadata(struct mansession *s, const struct message *m)
sccpConfigSegment = &sccpConfigSegments[i];
const SCCPConfigOption *config = sccpConfigSegment->config;
- astman_append(s, "Response: Success\r\n");
- if (!ast_strlen_zero(id)) {
- astman_append(s, "ActionID: %s\r\n", id);
+ if (sccp_strcaseequals(req_listresult, "yes")) {
+ //astman_append(s, "Response: Follows\r\n\r\n");
+ //astman_append(s, "EventList: Start\r\n");
+ astman_send_listack(s, m, "SCCPConfigMetaData Follows", "Start");
+ astman_append(s, "Event: SCCPConfigMetaData\r\n");
+ if (!ast_strlen_zero(id)) {
+ astman_append(s, "ActionID: %s\r\n", id);
+ }
+ } else if (sccp_strcaseequals(req_listresult, "freepbx")) {
+ astman_append(s, "Response: Follows\r\n");
+ } else {
+ astman_append(s, "Response: Success\r\n");
+ if (!ast_strlen_zero(id)) {
+ astman_append(s, "ActionID: %s\r\n", id);
+ }
}
-
astman_append(s, "JSON: {");
astman_append(s, "\"Segment\":\"%s\",", sccpConfigSegment->name);
astman_append(s, "\"Options\":[");
@@ -3296,8 +3308,17 @@ int sccp_manager_config_metadata(struct mansession *s, const struct message *m)
comma = 1;
}
}
- astman_append(s, "]}\r\n\r\n");
+ astman_append(s, "]}\r\n");
total++;
+ if (sccp_strcaseequals(req_listresult, "yes")) {
+ astman_append(s,
+ "\r\nEvent: SCCPConfigMetaDataComplete\r\n"
+ "EventList: Complete\r\n"
+ "ListItems: %d\r\n\r\n", total);
+ } else if (sccp_strcaseequals(req_listresult, "freepbx")) {
+ astman_append(s, "--END COMMAND--\r\n");
+ }
+ astman_append(s, "\r\n");
}
}
}

View file

@ -1,15 +0,0 @@
git clone https://github.com/chan-sccp/chan-sccp chan-sccp_develop
./configure --enable-indications --enable-conference --enable-advanced-functions --enable-distributed-devicestate
make
make install
load = chan_sccp.so
noload = chan_skinny.so
preload = func_db.so
preload = res_odbc.so
preload = res_config_odbc.so
preload = cdr_adaptive_odbc.so
preload = app_voicemail.so

View file

@ -1,280 +0,0 @@
;!
;! Automatically generated configuration file
;! Filename: sccp.conf.annotated (/usr/local/asterisk-13-branch/etc/asterisk/sccp.conf.annotated)
;! Generator: sccp config generate
;! Creation Date: Sun Nov 1 01:27:41 2015
;!
;
; general section
;
[general]
;servername = Asterisk ; (REQUIRED) show this name on the device registration
;keepalive = 60 ; (REQUIRED) Phone keep alive message every 60 secs. Used to check the voicemail and keep an open connection between server and phone (nat).
; Don't set any lower than 60 seconds.
;debug = core ; (MULTI-ENTRY) console debug level or categories
; examples: debug = 11 | debug = mwi,event,core | debug = all | debug = none or 0
; possible categories:
; core, sccp, hint, rtp, device, line, action, channel, cli, config, feature, feature_button, softkey, indicate, pbx
; socket, mwi, event, adv_feature, conference, buttontemplate, speeddial, codec, realtime, lock, newcode, high, all, none
;context = default ; (REQUIRED) pbx dialplan context
;dateformat = M/D/Y ; (SIZE: 7) M-D-Y in any order. Use M/D/YA (for 12h format)
;bindaddr = 0.0.0.0 ; (REQUIRED) replace with the ip address of the asterisk server (RTP important param)
;port = 2000 ; listen on port 2000 (Skinny, default)
deny = 0.0.0.0/0.0.0.0
permit = internal ; (REQUIRED) (MULTI-ENTRY) Deny every address except for the only one allowed. example: '0.0.0.0/0.0.0.0'
; Accept class C 192.168.1.0 example '192.168.1.0/255.255.255.0'
; You may have multiple rules for masking traffic.
; Rules are processed from the first to the last.
; This General rule is valid for all incoming connections. It's the 1st filter.
; using 'internal' will allow the 10.0.0.0, 172.16.0.0 and 192.168.0.0 networks
;localnet = internal ; (MULTI-ENTRY) All RFC 1918 addresses are local networks, example '192.168.1.0/255.255.255.0'
;externip = 0.0.0.0 ; External IP Address of the firewall, required in case the PBX is running on a separate host behind it. IP Address that we're going to notify in RTP media stream as the pbx source address.
;firstdigittimeout = 16 ; Dialing timeout for the 1st digit
;digittimeout = 8 ; More digits
;digittimeoutchar = # ; You can force the channel to dial with this char in the dialing state
;recorddigittimeoutchar = no ; You can force the channel to dial with this char in the dialing state
;simulate_enbloc = yes ; Use simulated enbloc dialing to speedup connection when dialing while onhook (older phones)
;ringtype = outside ; Ringtype for incoming calls (default='outside')
;autoanswer_ring_time = 1 ; Ringing time in seconds for the autoanswer.
;autoanswer_tone = 0x32 ; Autoanswer confirmation tone. For a complete list of tones: grep SKINNY_TONE sccp_protocol.h
; not all the tones can be played in a connected state, so you have to try.
;remotehangup_tone = 0x32 ; Passive hangup notification. 0 for none
;transfer_tone = 0 ; Confirmation tone on transfer. Works only between SCCP devices
;transfer_on_hangup = no ; 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 transferred channel, press the 'endcall' softkey, or have the receiving party hangup first.
;dnd_tone = 0x0 ; Use 0x2D, 0x31, 0x32, 0x33 to activate dnd incoming call indication when dnd silent is active
;callwaiting_tone = 0x2d ; Sets to 0 to disable the callwaiting tone
;callwaiting_interval = 0 ; Callwaiting ring interval in seconds. Set to 0 to disable the callwaiting ringing interval.
;musicclass = default ; Sets the default music on hold class
;language = en ; Default language setting
;callevents = yes ; Generate manager events when phone
; Performs events (e.g. hold)
;accountcode = skinny ; Accountcode to ease billing
;sccp_tos = 0x68 ; Sets the default sccp signaling packets Type of Service (TOS) (defaults to 0x68 = 01101000 = 104 = DSCP:011010 = AF31)
; Others possible values : [CS?, AF??, EF], [0x??], [lowdelay, throughput, reliability, mincost(solaris)], none
;sccp_cos = 4 ; sets the default sccp signaling packets Class of Service (COS).
;audio_tos = 0xB8 ; sets the default audio/rtp packets Type of Service (TOS) (defaults to 0xb8 = 10111000 = 184 = DSCP:101110 = EF)
;audio_cos = 6 ; sets the default audio/rtp packets Class of Service (COS).
;video_tos = 0x88 ; sets the default video/rtp packets Type of Service (TOS) (defaults to 0x88 = 10001000 = 136 = DSCP:100010 = AF41)
;video_cos = 5 ; sets the default video/rtp packets Class of Service (COS).
;echocancel = yes ; sets the phone echocancel for all devices
;silencesuppression = no ; sets the silence suppression for all devices
; we don't have to trust the phone ip address, but the ip address of the connection
;earlyrtp = progress ; valid options: none, offhook, immediate, dial, ringout and progress.
; The audio stream will be open in the progress and connected state by default. Immediate forces overlap dialing.
; (POSSIBLE VALUES: ["Immediate","OffHook","Dialing","Ringout","Progress","None"])
;dndFeature = on ; Turn on the dnd softkey for all devices. Valid values are 'off', 'on'.
;private = yes ; permit the private function softkey
;mwilamp = on ; Set the MWI lamp style when MWI active to on, off, wink, flash or blink
; (POSSIBLE VALUES: ["Off","On","Wink","Flash","Blink"])
;mwioncall = no ; Set the MWI on call.
;blindtransferindication = ring ; moh or ring. the blind transfer should ring the caller or just play music on hold
; (POSSIBLE VALUES: ["RING","MOH"])
;cfwdall = yes ; activate the callforward ALL stuff and softkeys
;cfwdbusy = yes ; activate the callforward BUSY stuff and softkeys
;cfwdnoanswer = yes ; activate the callforward NOANSWER stuff and softkeys
;nat = auto ; Global NAT support.
; (POSSIBLE VALUES: ["Auto","Off","(Auto)Off","On","(Auto)On"])
;directrtp = no ; This option allow devices to do direct RTP sessions.
;allowoverlap = no ; Enable overlap dialing support. If enabled, starts dialing immediately and sends remaining digits as DTMF/inband.
; Use with extreme caution as it is very dialplan and provider dependent.
callgroup = "" ; We are in caller groups 1,3,4. Valid for all lines
pickupgroup = "" ; We can do call pick-p for call group 1,3,4,5. Valid for all lines
;directed_pickup_modeanswer = yes ; Automatically Answer when using Directed Pickup.
;amaflags = default ; Sets the default AMA flag code stored in the CDR record
;callanswerorder = oldestfirst ; oldestfirst or lastestfirst
; (POSSIBLE VALUES: ["OldestFirst","LastFirst"])
regcontext = "" ; SCCP Lines will we added to this context in asterisk for Dundi lookup purposes.
; Do not set to an already created/used context. The context will be autocreated. You can share the sip/iax regcontext if you like.
;devicetable = sccpdevice ; datebasetable for devices
;linetable = sccpline ; datebasetable for lines
;meetme = yes ; enable/disable conferencing via meetme (on/off), make sure you have one of the meetme apps mentioned below activated in module.conf
; when switching meetme=on it will search for the first of these three possible meetme applications and set these defaults
; - {'MeetMe', 'qd'},
; - {'ConfBridge', 'Mac'},
; - {'Konference', 'MTV'}
;meetmeopts = qxd ; options to send the meetme application, defaults are dependent on meetme app see the list above
; Other options (app_meetme: A,a,b,c,C,d,D,E,e,F,i,I,l,L,m,M,o,p,P,q,r,s,S,t,T,w,x,X,1) see meetme specific documentation
;jbenable = no ; Enables the use of a jitterbuffer on the receiving side of a sccp channel.
; An enabled jitterbuffer will be used only if the sending side can create and the receiving side can not accept jitter.
; The sccp channel can accept jitter, thus a jitterbuffer on the receive sccp side will beused only if it is forced and enabled.
;jbforce = no ; Forces the use of a jitterbuffer on the receive side of a sccp channel.
;jblog = no ; Enables jitterbuffer frame logging.
;jbmaxsize = 200 ; Max length of the jitterbuffer in milliseconds.
;jbresyncthreshold = 1000 ; Jump in the frame timestamps over which the jitterbuffer is
; resynchronized. Useful to improve the quality of the voice, with
; big jumps in/broken timestamps, usually sent from exotic devices
; and programs.
;jbimpl = fixed ; (SIZE: 11) Jitterbuffer implementation, used on the receiving side of a
; sccp channel. Two implementations are currently available
; - 'fixed' (with size always equals to jbmaxsize)
; - 'adaptive' (with variable size, actually the new jb of IAX2).
;hotline_enabled = yes ; Setting the hotline Feature on a device, will make it connect to a predefined extension as soon as the Receiver
; is picked up or the 'New Call' Button is pressed. No number has to be given. This works even on devices which
; have no entry in the config file or realtime database.
; The hotline function can be used in different circumstances, for example at a door, where you want people to be
; able to only call one number, or for unprovisioned phones to only be able to call the helpdesk to get their phone
; set up. If hotline_enabled = yes, any device which is not included in the configuration explicitly will be allowed
; to registered as a guest device. All such devices will register on a single shared line called 'hotline'.
;hotline_context = sccp ;
;hotline_extension = 111 ;
;hotline_label = hotline ;
;fallback = no ; Immediately fallback to primairy/master server when it becomes available (master/slave asterisk cluster) (TokenRequest)
; Possible values are: true/false/odd/even/script.
; active/passive cluster: true on active/false on passive
; active/active cluster: even on active1/off on active2
; more complex cluster: use script. It will be called with three arguments, namely mac-address, ip-address, devicetype.
; and it should return 'ACK' (without the quotes) to acknowledge the token, or a value for the number of seconds to backoff and try again.
; Value can be changed online via CLI/AMI command 'sccp set fallback true/false/odd/even/script'
;backoff_time = 60 ; Time to wait before re-asking to fallback to primairy server (Token Reject Backoff Time)
;server_priority = 1 ; Server Priority for fallback: 1=Primairy, 2=Secundary, 3=Tertiary etc
; For active-active (fallback=odd/even) use 1 for both
;
; device section
;
[default_device](!)
device = "" ; (SIZE: 15) device type
devicetype = "" ; (SIZE: 15) device type
description = "" ; device description
keepalive = "" ; set keepalive to 60
;tzoffset = 0 ; time zone offset
;disallow = all
;allow = ulaw ; (MULTI-ENTRY) Same as entry in [general] section
;allow = alaw
;transfer = yes ; enable or disable the transfer capability. It does remove the transfer softkey
;park = yes ; take a look to the compile how-to. Park stuff is not compiled by default.
;cfwdall = no ; activate the call forward stuff and soft keys
;cfwdbusy = no ; allow call forward when line is busy
;cfwdnoanswer = no ; allow call forward when line if not being answered
;dndFeature = yes ; allow usage do not disturb button
dnd = "" ; allow setting dnd action for this device. Valid values are 'off', 'reject' (busy signal), 'silent' (ringer = silent) or 'user' (not used at the moment). . The value 'on' has been made obsolete in favor of 'reject'
; (POSSIBLE VALUES: ["Off","Reject","Silent","UserDefined"])
;force_dtmfmode = auto ; auto, skinny or rfc2833. Some phone models with bad firmware do send dtmf in a messed up order and need to be forced to skinny mode.
; (POSSIBLE VALUES: ["AUTO","RFC2833","SKINNY"])
deny = ""
permit = "" ; (MULTI-ENTRY) Same as entry in [general] section
; This device can register only using this ip address
audio_tos = "" ; sets the audio/rtp packets Type of Service (TOS) (defaults to 0xb8 = 10111000 = 184 = DSCP:101110 = EF).
; Others possible values : 0x??, lowdelay, throughput, reliability, mincost(solaris), none.
audio_cos = "" ; sets the audio/rtp packets Class of Service (COS)
video_tos = "" ; sets the video/rtp packets Type of Service (TOS) (defaults to 0x88 = 10001000 = 136 = DSCP:100010 = AF41).
video_cos = "" ; sets the video/rtp packets Class of Service (COS).
nat = "" ; Device NAT support. Currently nat is automatically detected in most cases.
; (POSSIBLE VALUES: ["Auto","Off","(Auto)Off","On","(Auto)On"])
directrtp = "" ; This option allow devices to do direct RTP sessions.
earlyrtp = "" ; valid options: none, offhook, immediate, dial, ringout and progress.
; The audio stream will be open in the progress and connected state by default. Immediate forces overlap dialing.
; (POSSIBLE VALUES: ["Immediate","OffHook","Dialing","Ringout","Progress","None"])
private = "" ; permit the private function softkey for this device
privacy = "" ; permit the private function softkey for this device
mwilamp = "" ; Set the MWI lamp style when MWI active to on, off, wink, flash or blink
; (POSSIBLE VALUES: ["Off","On","Wink","Flash","Blink"])
mwioncall = "" ; Set the MWI on call.
meetme = "" ; enable/disable conferencing via app_meetme (on/off)
meetmeopts = "" ; options to send the app_meetme application (default 'qd' = quiet,dynamic pin)
; Other options (A,a,b,c,C,d,D,E,e,F,i,I,l,L,m,M,o,p,P,q,r,s,S,t,T,w,x,X,1) see app_meetme documentation
;softkeyset = default ; use specified softkeyset with name 'default'
;useRedialMenu = no ; show redial phone book list instead of dialing the last number (adv_feature). Requires a Phone Service block in SEP....cnf.xml to work correct on Java phones (See conf/tftp/SEP example files)
;directed_pickup = yes ; enable/disable Pickup button to do directed pickup from a specific extension.
directed_pickup_context = "" ; context where direct pickup search for extensions. if not set current contect will be use.
;directed_pickup_modeanswer = yes ; on = asterisk way, the call has been answered when picked up.
monitor = "" ;
allowoverlap = "" ; Allow for Overlap dialing (Continue dialing after the first part of the number has already been send to the pstn)
setvar = "" ; (MULTI-ENTRY) extra variables to be set on line initialization multiple entries possible (for example the sip number to use when dialing outside)
; format setvar=param=value, for example setvar=sipno=12345678
permithost = "" ; (MULTI-ENTRY) permit/deny but by resolved hostname
addon = "" ; One of 7914, 7915, 7916
button = "" ; (MULTI-ENTRY) Buttons come in the following flavours (empty, line, speeddial, service, feature).
; Examples (read the documentation for more examples/combinations):
; - button = line,1234
; - button = line,1234,default
; - button = empty
; - button = line,98099@11:Phone1
; - button = line,98099@12:Phone2#ButtonLabel!silent ; append cidnum:'12' and cidname:'Phone2' to line-ci with label 'ButtonLabel', don't ring when dialed directly
; - button = line,98099@+12:Phone2@ButtonLabel!silent ; same as the previous line
; - button = line,98099@=12:Phone2!silent ; overwrite line-cid instead of appending
; - button = speeddial,Phone 2 Line 1, 98021, 98021@hints
; - button = feature,cfwdall,1234
; - button = feature,PDefault,ParkingLot,default ; feature, name, feature_type, parkinglotContext [,RetrieveSingle]
; - button = feature,PDefault,ParkingLot,default,RetrieveSingle ; feature, name, feature_type, parkinglotContext [,RetrieveSingle]
;allowRinginNotification = no ; allow ringin notification for hinted extensions. experimental configuration param that may be removed in further version
;conf_allow = yes ; Allow the use of conference
;conf_play_general_announce = yes ; Playback General Announcements (like: 'You are Entering/Leaving the conference')
;conf_play_part_announce = yes ; Playback Personal/Participant Announcements, (like: 'You have been muted / You have been kicked')
;conf_mute_on_entry = no ; Mute new participants from the start
;conf_music_on_hold_class = default ; Play music on hold of this class when no moderator is listening on the conference. If set to an empty string, no music on hold will be played.
;conf_show_conflist = yes ; Automatically show conference list to the moderator
backgroundImage = "" ; Set the Background Image after device registered. Image must be set as URI to a http served file.
ringtone = "" ; Set the Ring Tone after device registered. Ring Tone must be set as URI to a http served file.
imageversion = "" ; (SIZE: 31) ImageVersion to be loaded on the device.
;
; line section
;
[default_line](!)
id = "" ; (SIZE: 7) id
pin = "" ; (SIZE: 7) pin
description = "" ; description
context = "" ; pbx dialing context
defaultSubscriptionId_name = "" ; (SIZE: 79) Name used on a shared line when no name is specified on the line button for the device
defaultSubscriptionId_number = "" ; (SIZE: 79) Number used on a shared line when no name is specified on the line button for the device
mailbox = "" ; Mailbox to store messages in. Format 'mailbox@context' or 'mailbox' when you use 'default' context
vmnum = "" ; Number to dial to get to the users Mailbox
adhocNumber = "" ; Adhoc Number or Private-line automatic ring down (PLAR):
; Adhoc/PLAR circuits have statically configured endpoints and do not require the user dialing to connect calls.
; - The adhocNumber is dialed as soon as the Phone is taken off-hook or when the new-call button is pressed.
; - The number will not be dialed when choosing a line; so when you choose a line you can enter a number manually.
meetme = "" ; enable/disable conferencing via meetme, make sure you have one of the meetme apps mentioned below activated in module.conf.
; When switching meetme=on it will search for the first of these three possible meetme applications and set these defaults.
; Meetme=>'qd', ConfBridge=>'Mac', Konference=>'MTV'
meetmenum = "" ; This extension will receive meetme requests, SCCP_MEETME_ROOM channel variable will
; contain the room number dialed into simpleswitch (this parameter is going to be removed).
meetmeopts = "" ; options to send the meetme application, defaults are dependent on meetme app see the list above.
; Other options (app_meetme: A,a,b,c,C,d,D,E,e,F,i,I,l,L,m,M,o,p,P,q,r,s,S,t,T,w,x,X,1) see conferencing app for specific documentation
transfer = "" ; per line transfer capability
;incominglimit = 6 ; allow x number of incoming calls (call waiting)
echocancel = "" ; sets the phone echocancel for this line
silencesuppression = "" ; sets the silence suppression for this line
language = "" ; sets the language setting per line
musicclass = "" ; sets the music on hold class per line
accountcode = "" ; accountcode for this line to make billing per call possible
amaflags = "" ; sets the AMA flags stored in the CDR record for this line
callgroup = "" ; sets the caller groups this line is a member of
pickupgroup = "" ; sets the pickup groups this line is a member of (this phone can pickup calls from remote phones which are in this caller group
namedcallgroup = "" ; sets the named caller groups this line is a member of (ast111)
namedpickupgroup = "" ; 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)
parkinglot = "" ; parkinglot assigned to this line
trnsfvm = "" ; extension to redirect the caller to for voice mail
secondary_dialtone_digits = "" ; digits to indicate an external line to user (secondary dialtone) (max 9 digits)
;secondary_dialtone_tone = 0x22 ; outside dialtone frequency
setvar = "" ; (MULTI-ENTRY) extra variables to be set on line initialization multiple entries possible (for example the sip number to use when dialing outside)
; format setvar=param=value, for example setvar=sipno=12345678
dnd = "" ; allow setting dnd action for this line. Valid values are 'off', 'reject' (busy signal), 'silent' (ringer = silent) or 'user' (not used at the moment). . The value 'on' has been made obsolete in favor of 'reject'
; (POSSIBLE VALUES: ["Off","Reject","Silent","UserDefined"])
regexten = "" ; SCCP Lines will we added to the regcontext with this number for Dundi look up purpose
; If regexten is not filled in the line name (categoryname between []) will be used
;
; softkey section
;
;[mysoftkeyset]
;type = softkeyset ; (SIZE: -1) This should be set to softkeyset
;onhook = redial,newcall,cfwdall,dnd,pickup,gpickup,private ; (SIZE: 15) displayed when we are on hook
;connected = hold,endcall,park,vidmode,select,cfwdall,cfwdbusy,idivert ; (SIZE: 15) displayed when we have a connected call
;onhold = resume,newcall,endcall,transfer,conflist,select,dirtrfr,idivert,meetme ; (SIZE: 15) displayed when we have a call on hold
;ringin = answer,endcall,transvm,idivert ; (SIZE: 15) displayed when we have an incoming call
;offhook = redial,endcall,private,cfwdall,cfwdbusy,pickup,gpickup,meetme,barge ; (SIZE: 15) displayed when the phone is taken off hook
;conntrans = hold,endcall,transfer,conf,park,select,dirtrfr,vidmode,meetme,cfwdall,cfwdbusy ; (SIZE: 15) displayed when we are connected and could transfer a call
;digitsfoll = back,endcall,dial ; (SIZE: 15) displayed when one or more digits have been entered, more are expected
;connconf = conflist,newcall,endcall,hold,vidmode ; (SIZE: 15) displayed when we are in a conference
;ringout = empty,endcall,transfer,cfwdall,idivert ; (SIZE: 15) displayed when We are calling someone
;offhookfeat = redial,endcall ; (SIZE: 15) displayed wenn we went offhook using a feature
;onhint = redial,newcall,pickup,gpickup,barge ; (SIZE: 15) displayed when a hint is activated
;onstealable = redial,newcall,cfwdall,pickup,gpickup,dnd,intrcpt ; (SIZE: 15) displayed when there is a call we could steal on one of the neighboring phones
;holdconf = resume,newcall,endcall,join ; (SIZE: 15) displayed when we are a conference moderator, have the conference on hold and have another active call
uriaction = "" ; (MULTI-ENTRY) (SIZE: 7) softkey uri action to replace default handling. Format: uriaction = softkeyname, uri[,uri...]
; . URI can be an embedded cisco action (like Key:Service, Play:1041.raw) or a URLIf uri is a url the following parameters will be added to it: devicename, linename, channelname, callid, linkedid, uniqueid, appid, transactionid

1
_config.yml Normal file
View file

@ -0,0 +1 @@
theme: jekyll-theme-cayman

View file

@ -1,18 +0,0 @@
/*
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
*/
/*
Created on : 03.05.2017, 16:13:49
Author : Alex
*/
.sccpmultiselect {
min-height: 100px;
padding: 1px 1px;
}
.sccpbtn {
min-height: 10px;
padding: 1px 1px;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 472 B

View file

@ -1,69 +0,0 @@
(function ($) {
//Moves selected item(s) from sourceList to destinationList
$.fn.moveToList = function (sourceList, destinationList) {
var opts = $(sourceList + ' option:selected');
if (opts.length == 0) {
alert("Nothing to move");
}
$(destinationList).append($(opts).clone());
};
//Moves all items from sourceList to destinationList
$.fn.moveAllToList = function (sourceList, destinationList) {
var opts = $(sourceList + ' option');
if (opts.length == 0) {
alert("Nothing to move");
}
$(destinationList).append($(opts).clone());
};
//Moves selected item(s) from sourceList to destinationList and deleting the
// selected item(s) from the source list
$.fn.moveToListAndDelete = function (sourceList, destinationList) {
var opts = $(sourceList + ' option:selected');
if (opts.length == 0) {
alert("Nothing to move");
}
$(opts).remove();
$(destinationList).append($(opts).clone());
};
//Moves all items from sourceList to destinationList and deleting
// all items from the source list
$.fn.moveAllToListAndDelete = function (sourceList, destinationList) {
var opts = $(sourceList + ' option');
if (opts.length == 0) {
alert("Nothing to move");
}
$(opts).remove();
$(destinationList).append($(opts).clone());
};
//Removes selected item(s) from list
$.fn.removeSelected = function (list) {
var opts = $(list + ' option:selected');
if (opts.length == 0) {
alert("Nothing to remove");
}
$(opts).remove();
};
//Moves selected item(s) up or down in a list
$.fn.moveUpDown = function (list, btnUp, btnDown) {
var opts = $(list + ' option:selected');
if (opts.length == 0) {
alert("Nothing to move");
}
if (btnUp) {
opts.first().prev().before(opts);
} else if (btnDown) {
opts.last().next().after(opts);
}
};
})(jQuery);

File diff suppressed because it is too large Load diff

View file

@ -1,803 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XML Spy v4.4 U (http://www.xmlspy.com) by Cisco Systems, Inc. (Cisco Systems, Inc.) -->
<!-- Last updated 31 Dec 20 -->
<!-- The following Cisco IP Phones implement this XML parser: 6921, 6941, 6945, 6961, 7906G, 7911G, 7921G, 7925G, 7925G-EX, 7926G, 7931G, 7941G, 7941G-GE 7942G, 7945G, 7961G, 7961G-GE, 7962G, 7965G, 7970G, 7971G-GE, 7975G, 8800 Series, 8821, 8961, 9951, and 9971.-->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
attributeFormDefault="unqualified" version="3.3.4">
<xsd:complexType name="CiscoIPPhoneExecuteItemType">
<xsd:attribute name="Priority" use="optional">
<xsd:simpleType>
<xsd:restriction base="xsd:unsignedByte">
<xsd:minInclusive value="0"/>
<xsd:maxInclusive value="2"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
<xsd:attribute name="URL" use="required">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="256"/>
<xsd:minLength value="1"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:complexType>
<xsd:complexType name="CiscoIPPhoneResponseItemType">
<xsd:sequence>
<xsd:element name="Status" type="xsd:short"/>
<xsd:element name="Data">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="32"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="URL">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="256"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CiscoIPPhoneTouchAreaMenuItemType">
<xsd:sequence>
<xsd:element name="Name" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="0"/>
<xsd:maxLength value="32"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="URL" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="0"/>
<xsd:maxLength value="256"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="TouchArea" type="CiscoIPPhoneTouchAreaType" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CiscoIPPhoneTouchAreaType">
<xsd:attribute name="X1" type="xsd:unsignedShort" use="required"/>
<xsd:attribute name="Y1" type="xsd:unsignedShort" use="required"/>
<xsd:attribute name="X2" type="xsd:unsignedShort" use="required"/>
<xsd:attribute name="Y2" type="xsd:unsignedShort" use="required"/>
</xsd:complexType>
<xsd:complexType name="CiscoIPPhoneDirectoryEntryType">
<xsd:sequence>
<xsd:element name="Name" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="32"/>
<xsd:minLength value="0"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="Telephone" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="32"/>
<xsd:minLength value="0"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CiscoIPPhoneInputItemType">
<xsd:sequence>
<xsd:element name="DisplayName" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="32"/>
<xsd:minLength value="0"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="QueryStringParam">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="32"/>
<xsd:minLength value="1"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="InputFlags">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="A"/>
<xsd:enumeration value="T"/>
<xsd:enumeration value="N"/>
<xsd:enumeration value="E"/>
<xsd:enumeration value="U"/>
<xsd:enumeration value="L"/>
<xsd:enumeration value="AP"/>
<xsd:enumeration value="TP"/>
<xsd:enumeration value="NP"/>
<xsd:enumeration value="EP"/>
<xsd:enumeration value="UP"/>
<xsd:enumeration value="LP"/>
<xsd:enumeration value="PA"/>
<xsd:enumeration value="PT"/>
<xsd:enumeration value="PN"/>
<xsd:enumeration value="PE"/>
<xsd:enumeration value="PU"/>
<xsd:enumeration value="PL"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="DefaultValue" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="32"/>
<xsd:minLength value="0"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CiscoIPPhoneMenuItemType">
<xsd:sequence>
<xsd:element name="Name" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="0"/>
<xsd:maxLength value="64"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="URL" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="256"/>
<xsd:minLength value="0"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CiscoIPPhoneIconItemType">
<xsd:sequence>
<xsd:element name="Index" type="xsd:unsignedShort"/>
<xsd:element name="Width">
<xsd:simpleType>
<xsd:restriction base="xsd:unsignedShort">
<xsd:minInclusive value="1"/>
<xsd:maxInclusive value="16"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="Height">
<xsd:simpleType>
<xsd:restriction base="xsd:unsignedShort">
<xsd:minInclusive value="1"/>
<xsd:maxInclusive value="10"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="Depth">
<xsd:simpleType>
<xsd:restriction base="xsd:unsignedShort">
<xsd:minInclusive value="1"/>
<xsd:maxInclusive value="2"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="Data" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:hexBinary">
<xsd:maxLength value="40"/>
<xsd:minLength value="0"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CiscoIPPhoneIconMenuItemType">
<xsd:sequence>
<xsd:element name="Name" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="0"/>
<xsd:maxLength value="64"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="URL" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="256"/>
<xsd:minLength value="0"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="IconIndex" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:short">
<xsd:minInclusive value="0"/>
<xsd:maxInclusive value="9"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CiscoIPPhoneIconFileItemType">
<xsd:sequence>
<xsd:element name="Index">
<xsd:simpleType>
<xsd:restriction base="xsd:unsignedShort">
<xsd:minInclusive value="0"/>
<xsd:maxInclusive value="9"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="URL">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="256"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CiscoIPPhoneKeyType">
<xsd:sequence>
<xsd:element name="Key">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="KeyPad0"/>
<xsd:enumeration value="KeyPad1"/>
<xsd:enumeration value="KeyPad2"/>
<xsd:enumeration value="KeyPad3"/>
<xsd:enumeration value="KeyPad4"/>
<xsd:enumeration value="KeyPad5"/>
<xsd:enumeration value="KeyPad6"/>
<xsd:enumeration value="KeyPad7"/>
<xsd:enumeration value="KeyPad8"/>
<xsd:enumeration value="KeyPad9"/>
<xsd:enumeration value="KeyPadStar"/>
<xsd:enumeration value="KeyPadPound"/>
<xsd:enumeration value="NavUp"/>
<xsd:enumeration value="NavDown"/>
<xsd:enumeration value="NavLeft"/>
<xsd:enumeration value="NavRight"/>
<xsd:enumeration value="NavSelect"/>
<xsd:enumeration value="NavBack"/>
<xsd:enumeration value="PushToTalk"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="URL" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="0"/>
<xsd:maxLength value="256"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="URLDown" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="0"/>
<xsd:maxLength value="256"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CiscoIPPhoneSoftKeyType">
<xsd:sequence>
<xsd:element name="Name" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="32"/>
<xsd:minLength value="0"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="Position">
<xsd:simpleType>
<xsd:restriction base="xsd:unsignedShort">
<xsd:minInclusive value="1"/>
<xsd:maxInclusive value="8"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="URL" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="256"/>
<xsd:minLength value="0"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="URLDown" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="0"/>
<xsd:maxLength value="256"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CiscoIPPhoneDisplayableType">
<xsd:sequence>
<xsd:element name="Title" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="0"/>
<xsd:maxLength value="32"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="Prompt" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="0"/>
<xsd:maxLength value="32"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="SoftKeyItem" type="CiscoIPPhoneSoftKeyType" minOccurs="0" maxOccurs="8"/>
<xsd:element name="KeyItem" type="CiscoIPPhoneKeyType" minOccurs="0" maxOccurs="32"/>
</xsd:sequence>
<xsd:attribute name="keypadTarget" use="optional" default="application">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="application"/>
<xsd:enumeration value="applicationCall"/>
<xsd:enumeration value="activeCall"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
<xsd:attribute name="appId" use="optional">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="64"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
<xsd:attribute name="onAppFocusLost" use="optional">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="256"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
<xsd:attribute name="onAppFocusGained" use="optional">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="256"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
<xsd:attribute name="onAppMinimized" use="optional">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="256"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
<xsd:attribute name="onAppClosed" use="optional">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="256"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:complexType>
<xsd:element name="CiscoIPPhoneExecute">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="ExecuteItem" type="CiscoIPPhoneExecuteItemType" maxOccurs="3"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="CiscoIPhoneResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="ResponseItem" type="CiscoIPPhoneResponseItemType" maxOccurs="3"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="CiscoIPPhoneError">
<xsd:complexType>
<xsd:attribute name="Number" type="xsd:unsignedShort" use="required"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="CiscoIPPhoneText">
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="CiscoIPPhoneDisplayableType">
<xsd:sequence>
<xsd:element name="Text" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="0"/>
<xsd:maxLength value="4000"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="CiscoIPPhoneInput">
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="CiscoIPPhoneDisplayableType">
<xsd:sequence>
<xsd:element name="URL">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="256"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="InputItem" type="CiscoIPPhoneInputItemType" minOccurs="0" maxOccurs="5"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="CiscoIPPhoneDirectory">
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="CiscoIPPhoneDisplayableType">
<xsd:sequence>
<xsd:element name="DirectoryEntry" type="CiscoIPPhoneDirectoryEntryType" minOccurs="0" maxOccurs="32"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="CiscoIPPhoneImage">
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="CiscoIPPhoneDisplayableType">
<xsd:sequence>
<xsd:element name="LocationX" default="0" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:short">
<xsd:minInclusive value="-1"/>
<xsd:maxInclusive value="132"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="LocationY" default="0" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:short">
<xsd:minInclusive value="-1"/>
<xsd:maxInclusive value="64"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="Width">
<xsd:simpleType>
<xsd:restriction base="xsd:unsignedShort">
<xsd:minInclusive value="1"/>
<xsd:maxInclusive value="133"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="Height">
<xsd:simpleType>
<xsd:restriction base="xsd:unsignedShort">
<xsd:minInclusive value="1"/>
<xsd:maxInclusive value="65"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="Depth">
<xsd:simpleType>
<xsd:restriction base="xsd:unsignedShort">
<xsd:minInclusive value="1"/>
<xsd:maxInclusive value="2"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="Data" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:hexBinary">
<xsd:maxLength value="2162"/>
<xsd:minLength value="0"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="CiscoIPPhoneImageFile">
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="CiscoIPPhoneDisplayableType">
<xsd:sequence>
<xsd:element name="LocationX" default="0" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:short">
<xsd:minInclusive value="-1"/>
<xsd:maxInclusive value="297"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="LocationY" default="0" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:short">
<xsd:minInclusive value="-1"/>
<xsd:maxInclusive value="167"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="URL">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="256"/>
<xsd:minLength value="1"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="CiscoIPPhoneMenu">
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="CiscoIPPhoneDisplayableType">
<xsd:sequence>
<xsd:element name="MenuItem" type="CiscoIPPhoneMenuItemType" minOccurs="0" maxOccurs="100"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="CiscoIPPhoneIconMenu">
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="CiscoIPPhoneDisplayableType">
<xsd:sequence>
<xsd:element name="MenuItem" type="CiscoIPPhoneIconMenuItemType" minOccurs="0" maxOccurs="32"/>
<xsd:element name="IconItem" type="CiscoIPPhoneIconItemType" minOccurs="0" maxOccurs="10"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="CiscoIPPhoneIconFileMenu">
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="CiscoIPPhoneDisplayableType">
<xsd:sequence>
<xsd:element name="MenuItem" type="CiscoIPPhoneIconMenuItemType" minOccurs="0" maxOccurs="32"/>
<xsd:element name="IconItem" type="CiscoIPPhoneIconFileItemType" minOccurs="0" maxOccurs="10"/>
</xsd:sequence>
<xsd:attribute name="IconIndex" type="xsd:unsignedShort" use="optional"/>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="CiscoIPPhoneGraphicMenu">
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="CiscoIPPhoneDisplayableType">
<xsd:sequence>
<xsd:element name="LocationX" default="0" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:short">
<xsd:minInclusive value="-1"/>
<xsd:maxInclusive value="132"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="LocationY" default="0" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:short">
<xsd:minInclusive value="-1"/>
<xsd:maxInclusive value="64"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="Width">
<xsd:simpleType>
<xsd:restriction base="xsd:unsignedShort">
<xsd:minInclusive value="1"/>
<xsd:maxInclusive value="133"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="Height">
<xsd:simpleType>
<xsd:restriction base="xsd:unsignedShort">
<xsd:minInclusive value="1"/>
<xsd:maxInclusive value="65"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="Depth">
<xsd:simpleType>
<xsd:restriction base="xsd:unsignedShort">
<xsd:minInclusive value="1"/>
<xsd:maxInclusive value="2"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="Data" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:hexBinary">
<xsd:maxLength value="2162"/>
<xsd:minLength value="0"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="MenuItem" type="CiscoIPPhoneMenuItemType" minOccurs="0" maxOccurs="12"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="CiscoIPPhoneGraphicFileMenu">
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="CiscoIPPhoneDisplayableType">
<xsd:sequence>
<xsd:element name="LocationX" default="0" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:short">
<xsd:minInclusive value="-1"/>
<xsd:maxInclusive value="297"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="LocationY" default="0" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:short">
<xsd:minInclusive value="-1"/>
<xsd:maxInclusive value="167"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="URL">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="256"/>
<xsd:minLength value="1"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="MenuItem" type="CiscoIPPhoneTouchAreaMenuItemType" minOccurs="0" maxOccurs="32"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="CiscoIPPhoneStatus">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Text" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="0"/>
<xsd:maxLength value="32"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="Timer" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:unsignedShort">
<xsd:minInclusive value="0"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="LocationX" default="0" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:short">
<xsd:minInclusive value="-1"/>
<xsd:maxInclusive value="105"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="LocationY" default="0" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:short">
<xsd:minInclusive value="-1"/>
<xsd:maxInclusive value="20"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="Width">
<xsd:simpleType>
<xsd:restriction base="xsd:unsignedShort">
<xsd:minInclusive value="1"/>
<xsd:maxInclusive value="106"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="Height">
<xsd:simpleType>
<xsd:restriction base="xsd:unsignedShort">
<xsd:minInclusive value="1"/>
<xsd:maxInclusive value="21"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="Depth">
<xsd:simpleType>
<xsd:restriction base="xsd:unsignedShort">
<xsd:minInclusive value="1"/>
<xsd:maxInclusive value="2"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="Data" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:hexBinary">
<xsd:minLength value="0"/>
<xsd:maxLength value="557"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="CiscoIPPhoneStatusFile">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Text" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="0"/>
<xsd:maxLength value="32"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="Timer" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:unsignedShort">
<xsd:minInclusive value="0"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="LocationX" default="0" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:short">
<xsd:minInclusive value="-1"/>
<xsd:maxInclusive value="261"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="LocationY" default="0" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:short">
<xsd:minInclusive value="-1"/>
<xsd:maxInclusive value="49"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="URL">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="256"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>

View file

@ -1,300 +0,0 @@
<device>
<fullConfig>true</fullConfig>
<deviceProtocol>SIP</deviceProtocol>
<devicePool>
<dateTimeSetting>
<dateTemplate>D/M/Y</dateTemplate>
<timeZone></timeZone>
<ntps>
<ntp>
<name></name>
<ntpMode>unicast</ntpMode>
</ntp>
</ntps>
</dateTimeSetting>
<callManagerGroup>
<members>
<member priority="0">
<callManager>
<ports>
<sipPort>5060</sipPort>
<securedSipPort>5061</securedSipPort>
</ports>
<processNodeName></processNodeName>
</callManager>
</member>
</members>
</callManagerGroup>
</devicePool>
<sipProfile>
<sipProxies>
<registerWithProxy>true</registerWithProxy>
</sipProxies>
<sipCallFeatures>
<cnfJoinEnabled>true</cnfJoinEnabled>
<callForwardURI>x-cisco-serviceuri-cfwdall</callForwardURI>
<callPickupURI>x-cisco-serviceuri-pickup</callPickupURI>
<callPickupListURI>x-cisco-serviceuri-opickup</callPickupListURI>
<callPickupGroupURI>x-cisco-serviceuri-gpickup</callPickupGroupURI>
<meetMeServiceURI>x-cisco-serviceuri-meetme</meetMeServiceURI>
<abbreviatedDialURI>x-cisco-serviceuri-abbrdial</abbreviatedDialURI>
<rfc2543Hold>false</rfc2543Hold>
<callHoldRingback>1</callHoldRingback>
<localCfwdEnable>true</localCfwdEnable>
<semiAttendedTransfer>true</semiAttendedTransfer>
<anonymousCallBlock>3</anonymousCallBlock>
<callerIdBlocking>3</callerIdBlocking>
<dndControl>0</dndControl>
<remoteCcEnable>true</remoteCcEnable>
<retainForwardInformation>false</retainForwardInformation>
<uriDialingDisplayPreference>1</uriDialingDisplayPreference>
</sipCallFeatures>
<sipStack>
<sipInviteRetx>6</sipInviteRetx>
<sipRetx>10</sipRetx>
<timerInviteExpires>180</timerInviteExpires>
<timerRegisterExpires>3600</timerRegisterExpires>
<timerRegisterDelta>5</timerRegisterDelta>
<timerKeepAliveExpires>120</timerKeepAliveExpires>
<timerSubscribeExpires>120</timerSubscribeExpires>
<timerSubscribeDelta>5</timerSubscribeDelta>
<timerT1>500</timerT1>
<timerT2>4000</timerT2>
<maxRedirects>70</maxRedirects>
<remotePartyID>true</remotePartyID>
<userInfo>Phone</userInfo>
</sipStack>
<autoAnswerTimer>1</autoAnswerTimer>
<autoAnswerAltBehavior>false</autoAnswerAltBehavior>
<autoAnswerOverride>true</autoAnswerOverride>
<transferOnhookEnabled>true</transferOnhookEnabled>
<enableVad>false</enableVad>
<preferredCodec>none</preferredCodec>
<dtmfAvtPayload>101</dtmfAvtPayload>
<dtmfDbLevel>3</dtmfDbLevel>
<dtmfOutofBand>avt</dtmfOutofBand>
<alwaysUsePrimeLine>false</alwaysUsePrimeLine>
<alwaysUsePrimeLineVoiceMail>false</alwaysUsePrimeLineVoiceMail>
<kpml>0</kpml>
<phoneLabel></phoneLabel>
<stutterMsgWaiting>0</stutterMsgWaiting>
<callStats>true</callStats>
<offhookToFirstDigitTimer>15000</offhookToFirstDigitTimer>
<silentPeriodBetweenCallWaitingBursts>10</silentPeriodBetweenCallWaitingBursts>
<disableLocalSpeedDialConfig>false</disableLocalSpeedDialConfig>
<startMediaPort>16384</startMediaPort>
<stopMediaPort>32766</stopMediaPort>
<natEnabled>false</natEnabled>
<natReceivedProcessing>false</natReceivedProcessing>
<natAddress></natAddress>
<sipLines>
<line button="1" lineIndex="1">
<featureID>9</featureID>
<featureLabel></featureLabel>
<proxy>USECALLMANAGER</proxy>
<port>5060</port>
<name></name>
<displayName></displayName>
<autoAnswer>
<autoAnswerEnabled>0</autoAnswerEnabled>
</autoAnswer>
<callWaiting>3</callWaiting>
<authName></authName>
<authPassword></authPassword>
<contact></contact>
<sharedLine>false</sharedLine>
<messageWaitingLampPolicy>3</messageWaitingLampPolicy>
<messageWaitingAMWI>0</messageWaitingAMWI>
<messagesNumber></messagesNumber>
<ringSettingIdle>4</ringSettingIdle>
<ringSettingActive>5</ringSettingActive>
<forwardCallInfoDisplay>
<callerName>true</callerName>
<callerNumber>true</callerNumber>
<redirectedNumber>false</redirectedNumber>
<dialedNumber>true</dialedNumber>
</forwardCallInfoDisplay>
<maxNumCalls>5</maxNumCalls>
<busyTrigger>4</busyTrigger>
</line>
</sipLines>
<externalNumberMask></externalNumberMask>
<voipControlPort>5060</voipControlPort>
<dscpForAudio>184</dscpForAudio>
<ringSettingBusyStationPolicy>0</ringSettingBusyStationPolicy>
<dialTemplate></dialTemplate>
<softKeyFile></softKeyFile>
</sipProfile>
<MissedCallLoggingOption>1</MissedCallLoggingOption>
<featurePolicyFile></featurePolicyFile>
<commonProfile>
<phonePassword></phonePassword>
<backgroundImageAccess>true</backgroundImageAccess>
<callLogBlfEnabled>2</callLogBlfEnabled>
</commonProfile>
<vendorConfig>
<defaultWallpaperFile></defaultWallpaperFile>
<disableSpeaker>false</disableSpeaker>
<disableSpeakerAndHeadset>false</disableSpeakerAndHeadset>
<enableMuteFeature>false</enableMuteFeature>
<enableGroupListen>true</enableGroupListen>
<holdResumeKey>1</holdResumeKey>
<recentsSoftKey>1</recentsSoftKey>
<dfBit>1</dfBit>
<pcPort>0</pcPort>
<spanToPCPort>1</spanToPCPort>
<garp>0</garp>
<rtcp>1</rtcp>
<videoRtcp>1</videoRtcp>
<voiceVlanAccess>0</voiceVlanAccess>
<videoCapability>1</videoCapability>
<hideVideoByDefault>0</hideVideoByDefault>
<separateMute>0</separateMute>
<ciscoCamera>1</ciscoCamera>
<usb1>1</usb1>
<usb2>1</usb2>
<usbClasses>0,1,2</usbClasses>
<sdio>1</sdio>
<wifi>1</wifi>
<bluetooth>1</bluetooth>
<bluetoothProfile>0,1</bluetoothProfile>
<btpbap>0</btpbap>
<bthfu>0</bthfu>
<ehookEnable>0</ehookEnable>
<autoSelectLineEnable>1</autoSelectLineEnable>
<autoCallSelect>1</autoCallSelect>
<incomingCallToastTimer>10</incomingCallToastTimer>
<dialToneFromReleaseKey>0</dialToneFromReleaseKey>
<joinAndDirectTransferPolicy>0</joinAndDirectTransferPolicy>
<minimumRingVolume></minimumRingVolume>
<simplifiedNewCall>0</simplifiedNewCall>
<actionableAlert>0</actionableAlert>
<showCallHistoryForSelectedLine>0</showCallHistoryForSelectedLine>
<kemOneColumn>0</kemOneColumn>
<lineMode>0</lineMode>
<allCallsOnPrimary>0</allCallsOnPrimary>
<softKeyControl>0</softKeyControl>
<settingsAccess>1</settingsAccess>
<webProtocol>0</webProtocol>
<webAccess>0</webAccess>
<webAdmin>1</webAdmin>
<adminPassword></adminPassword>
<sshAccess>0</sshAccess>
<detectCMConnectionFailure>0</detectCMConnectionFailure>
<g722CodecSupport>1</g722CodecSupport>
<handsetWidebandEnable>2</handsetWidebandEnable>
<headsetWidebandEnable>2</headsetWidebandEnable>
<headsetWidebandUIControl>1</headsetWidebandUIControl>
<handsetWidebandUIControl>1</handsetWidebandUIControl>
<daysDisplayNotActive>1,7</daysDisplayNotActive>
<displayOnTime>08:00</displayOnTime>
<displayOnDuration>10:00</displayOnDuration>
<displayIdleTimeout>00:10</displayIdleTimeout>
<displayOnWhenIncomingCall>1</displayOnWhenIncomingCall>
<displayRefreshRate>0</displayRefreshRate>
<daysBacklightNotActive>1,7</daysBacklightNotActive>
<backlightOnTime>08:00</backlightOnTime>
<backlightOnDuration>10:00</backlightOnDuration>
<backlightIdleTimeout>00:10</backlightIdleTimeout>
<backlightOnWhenIncomingCall>1</backlightOnWhenIncomingCall>
<recordingTone>0</recordingTone>
<recordingToneLocalVolume>100</recordingToneLocalVolume>
<recordingToneRemoteVolume>50</recordingToneRemoteVolume>
<recordingToneDuration></recordingToneDuration>
<moreKeyReversionTimer>5</moreKeyReversionTimer>
<peerFirmwareSharing>0</peerFirmwareSharing>
<loadServer></loadServer>
<problemReportUploadURL></problemReportUploadURL>
<enableCdpSwPort>1</enableCdpSwPort>
<enableCdpPcPort>0</enableCdpPcPort>
<enableLldpSwPort>1</enableLldpSwPort>
<enableLldpPcPort>0</enableLldpPcPort>
<cdpEnable>true</cdpEnable>
<outOfRangeAlert>0</outOfRangeAlert>
<scanningMode>2</scanningMode>
<applicationURL></applicationURL>
<appButtonTimer>0</appButtonTimer>
<appButtonPriority>0</appButtonPriority>
<specialNumbers></specialNumbers>
<sendKeyAction>0</sendKeyAction>
<powerOffWhenCharging>0</powerOffWhenCharging>
<homeScreen>0</homeScreen>
<accessContacts>1</accessContacts>
<accessFavorites>1</accessFavorites>
<accessVoicemail>1</accessVoicemail>
<accessApps>1</accessApps>
</vendorConfig>
<versionStamp>d902ed5a-c1e5-4233-b1d6-a960d53d1c3a</versionStamp>
<loadInformation></loadInformation>
<phoneServices useHTTPS="false">
<provisioning>2</provisioning>
<phoneService type="1" category="0">
<name>Missed Calls</name>
<url>Application:Cisco/MissedCalls</url>
<vendor></vendor>
<version></version>
</phoneService>
<phoneService type="1" category="0">
<name>Received Calls</name>
<url>Application:Cisco/ReceivedCalls</url>
<vendor></vendor>
<version></version>
</phoneService>
<phoneService type="1" category="0">
<name>Placed Calls</name>
<url>Application:Cisco/PlacedCalls</url>
<vendor></vendor>
<version></version>
</phoneService>
<phoneService type="2" category="0">
<name>Voicemail</name>
<url>Application:Cisco/Voicemail</url>
<vendor></vendor>
<version></version>
</phoneService>
</phoneServices>
<userLocale>
<name></name>
<uid>1</uid>
<langCode></langCode>
<version></version>
<winCharSet>utf-8</winCharSet>
</userLocale>
<networkLocale></networkLocale>
<networkLocaleInfo>
<name></name>
<version></version>
</networkLocaleInfo>
<deviceSecurityMode>1</deviceSecurityMode>
<idleTimeout>0</idleTimeout>
<authenticationURL></authenticationURL>
<messagesURL></messagesURL>
<servicesURL></servicesURL>
<directoryURL></directoryURL>
<idleURL></idleURL>
<informationURL></informationURL>
<proxyServerURL></proxyServerURL>
<secureAuthenticationURL></secureAuthenticationURL>
<secureMessagesURL></secureMessagesURL>
<secureServicesURL></secureServicesURL>
<secureDirectoryURL></secureDirectoryURL>
<secureInformationURL></secureInformationURL>
<secureIdleURL></secureIdleURL>
<transportLayerProtocol>1</transportLayerProtocol>
<TLSResumptionTimer>3600</TLSResumptionTimer>
<phonePersonalization>1</phonePersonalization>
<autoCallPickupEnable>true</autoCallPickupEnable>
<blfAudibleAlertSettingOfIdleStation>0</blfAudibleAlertSettingOfIdleStation>
<blfAudibleAlertSettingOfBusyStation>0</blfAudibleAlertSettingOfBusyStation>
<dndCallAlert>1</dndCallAlert>
<dndReminderTimer>5</dndReminderTimer>
<advertiseG722Codec>1</advertiseG722Codec>
<rollover>0</rollover>
<joinAcrossLines>0</joinAcrossLines>
<capfAuthMode>0</capfAuthMode>
<capfList></capfList>
<certHash></certHash>
<encrConfig>false</encrConfig>
<sshUserId></sshUserId>
<sshPassword></sshPassword>
</device>

View file

@ -1,91 +0,0 @@
<?xml version="1.0"?>
<device>
<sshUserId>cisco</sshUserId>
<sshPassword>cisco</sshPassword>
<devicePool>
<dateTimeSetting>
<dateTemplate>D-M-YA</dateTemplate>
<timeZone>W. Europe Standard/Daylight Time</timeZone>
<ntps>
<ntp>
<name>x.x.x.x</name>
<ntpMode>Unicast</ntpMode>
</ntp>
</ntps>
</dateTimeSetting>
<callManagerGroup>
<members>
<member priority="0">
<callManager>
<ports>
<ethernetPhonePort>2000</ethernetPhonePort>
</ports>
<processNodeName>x.x.x.x</processNodeName>
</callManager>
</member>
</members>
</callManagerGroup>
<srstInfo>
<srstOption>Enable</srstOption>
<ipAddr1>x.x.x.x</ipAddr1>
<port1>2000</port1>
<ipAddr2/>
<port2>2000</port2>
<ipAddr3/>
<port3>2000</port3>
</srstInfo>
<connectionMonitorDuration>120</connectionMonitorDuration>
</devicePool>
<versionStamp>{Jan 01 2003 00:00:00}</versionStamp>
<loadInformation>SCCP11.8-5-2S</loadInformation>
<vendorConfig>
<disableSpeaker>false</disableSpeaker>
<disableSpeakerAndHeadset>false</disableSpeakerAndHeadset>
<forwardingDelay>1</forwardingDelay>
<pcPort>0</pcPort>
<settingsAccess>1</settingsAccess>
<garp>0</garp>
<voiceVlanAccess>0</voiceVlanAccess>
<videoCapability>0</videoCapability>
<autoSelectLineEnable>0</autoSelectLineEnable>
<webAccess>0</webAccess>
<daysDisplayNotActive>1,7</daysDisplayNotActive>
<displayOnTime>08:30</displayOnTime>
<displayOnDuration>11:30</displayOnDuration>
<displayIdleTimeout>01:00</displayIdleTimeout>
</vendorConfig>
<userLocale>
<name>Netherlands</name>
<langCode>nl</langCode>
<version>4.0(1)</version>
<winCharSet>iso-8859-1</winCharSet>
</userLocale>
<networkLocale>Netherlands</networkLocale>
<networkLocaleInfo>
<name/>
<uid>64</uid>
<version>4.0(1)</version>
</networkLocaleInfo>
<phonePersonalization>1</phonePersonalization>
<deviceSecurityMode>0</deviceSecurityMode>
<idleTimeout>3600</idleTimeout>
<authenticationURL>http://x.x.x.x/cisco_menu/authentication.php</authenticationURL>
<idleURL>http://x.x.x.x/cisco_menu/idle.php</idleURL>
<informationURL>http://x.x.x.x/cisco_menu/help/help.php</informationURL>
<messagesURL/>
<proxyServerURL/>
<servicesURL>http://x.x.x.x/cisco_menu/menu.php</servicesURL>
<directoryURL>http://x.x.x.x/cisco_menu/directory/menu.php</directoryURL>
<dscpForSCCPPhoneConfig>104</dscpForSCCPPhoneConfig>
<dscpForSCCPPhoneServices>0</dscpForSCCPPhoneServices>
<dscpForCm2Dvce>184</dscpForCm2Dvce>
<transportLayerProtocol>4</transportLayerProtocol>
<capfAuthMode>0</capfAuthMode>
<capfList>
<capf>
<phonePort>3804</phonePort>
</capf>
</capfList>
<certHash/>
<encrConfig>false</encrConfig>
</device>

View file

@ -1,237 +0,0 @@
<?xml version="1.0"?>
<device xsi:type="axl:XIPPhone" ctiid="406" uuid="{aed907f9-9e22-72d8-c218-b7165fff6d37}">
<fullConfig>true</fullConfig>
<portalDefaultServer>x.x.x.x</portalDefaultServer>
<deviceProtocol>SCCP</deviceProtocol>
<sshUserId/>
<sshPassword/>
<ipAddressMode>0</ipAddressMode>
<allowAutoConfig>true</allowAutoConfig>
<dadEnable>true</dadEnable>
<redirectEnable>false</redirectEnable>
<echoMultiEnable>false</echoMultiEnable>
<ipPreferenceModeControl>0</ipPreferenceModeControl>
<ipMediaAddressFamilyPreference>0</ipMediaAddressFamilyPreference>
<tzdata>
<tzolsonversion>2016g</tzolsonversion>
<tzupdater>tzupdater.jar</tzupdater>
</tzdata>
<mlppDomainId>000000</mlppDomainId>
<mlppIndicationStatus>Off</mlppIndicationStatus>
<preemption>Disabled</preemption>
<executiveOverridePreemptable>false</executiveOverridePreemptable>
<devicePool uuid="{f8d7c5cb-5d3b-e6c0-0200-8608c8138e66}">
<revertPriority>0</revertPriority>
<name>MyDeviceName</name>
<dateTimeSetting uuid="{ce543907-40b1-efe8-21e1-bdd1853c9594}">
<name>timezone name</name>
<dateTemplate>M-D-Y</dateTemplate>
<timeZone/>
<olsonTimeZone>Europe/Amsterdam</olsonTimeZone>
<ntps>
<ntp>
<name>x.x.x.x</name>
<ntpMode>Directed Broadcast</ntpMode>
</ntp>
</ntps>
</dateTimeSetting>
<callManagerGroup>
<name>MyGroupName</name>
<tftpDefault>false</tftpDefault>
<members>
<member priority="0">
<callManager>
<name>My CM1 name</name>
<description>My CM Description</description>
<ports>
<ethernetPhonePort>2000</ethernetPhonePort>
<sipPort>5060</sipPort>
<securedSipPort>5061</securedSipPort>
<mgcpPorts>
<listen>2427</listen>
<keepAlive>2428</keepAlive>
</mgcpPorts>
</ports>
<processNodeName>y.y.y.y</processNodeName>
</callManager>
</member>
</members>
</callManagerGroup>
<srstInfo uuid="{cd241e11-4a58-4d3d-9661-f06c912a18a3}">
<name>Disable</name>
<srstOption>Disable</srstOption>
<userModifiable>false</userModifiable>
<ipAddr1/>
<port1>2000</port1>
<ipAddr2/>
<port2>2000</port2>
<ipAddr3/>
<port3>2000</port3>
<sipIpAddr1/>
<sipPort1>5060</sipPort1>
<sipIpAddr2/>
<sipPort2>5060</sipPort2>
<sipIpAddr3/>
<sipPort3>5060</sipPort3>
<isSecure>false</isSecure>
</srstInfo>
<connectionMonitorDuration>120</connectionMonitorDuration>
</devicePool>
<commonProfile>
<phonePassword/>
<backgroundImageAccess>true</backgroundImageAccess>
<callLogBlfEnabled>3</callLogBlfEnabled>
</commonProfile>
<loadInformation>CP7925G-1.4.8.4</loadInformation>
<vendorConfig>
<disableSpeaker>false</disableSpeaker>
<garp>0</garp>
<webAccess>2</webAccess>
<WlanProfile1>0</WlanProfile1>
<WlanProfile2>0</WlanProfile2>
<WlanProfile3>0</WlanProfile3>
<WlanProfile4>0</WlanProfile4>
<loadServer>MyAdminUsername</loadServer>
<adminPassword>MyPassword#$%^!</adminPassword>
<specialNumbers/>
<PushToTalkURL/>
<sendKeyAction>0</sendKeyAction>
<phoneBookWebAccess>0</phoneBookWebAccess>
<unlockSettingsSequence>1</unlockSettingsSequence>
<appButtonTimer>0</appButtonTimer>
<appButtonPriority>0</appButtonPriority>
<outOfRangeAlert>0</outOfRangeAlert>
<scanningMode>0</scanningMode>
<restrictDataRates>0</restrictDataRates>
<powerOffWhenCharging>0</powerOffWhenCharging>
<cdpEnable>1</cdpEnable>
<g722CodecSupport>0</g722CodecSupport>
<homeScreen>0</homeScreen>
<fipsMode>0</fipsMode>
<autoSelectLineEnable>0</autoSelectLineEnable>
<fileSystemVerificationEnable>0</fileSystemVerificationEnable>
<minimumRingVolume>0</minimumRingVolume>
<java>1</java>
</vendorConfig>
<commonConfig>
<sshAccess>1</sshAccess>
<RingLocale>0</RingLocale>
<companyPhotoDir>http://z.z.z.z/pictures/%%sAMAccountName%%.jpg</companyPhotoDir>
<ice/>
<instantMessaging/>
<desktopClient/>
</commonConfig>
<enterpriseConfig>
<ciscoCamera>1</ciscoCamera>
<energyWiseDomain>MyaAdminUsername</energyWiseDomain>
<energyWiseSecret>MyPassword#$%^!</energyWiseSecret>
<webProtocol>0</webProtocol>
<companyPhotoDir>http://z.z.z.z/pictures/%%sAMAccountName%%.jpg</companyPhotoDir>
<ice/>
<instantMessaging/>
<desktopClient/>
</enterpriseConfig>
<versionStamp>1234562241-013d4ba4-5b51-4be6-9792-b7165fff6d37</versionStamp>
<userLocale>
<name>English_United_States</name>
<uid>1</uid>
<langCode>en_US</langCode>
<version>10.0.0.0(1)</version>
<winCharSet>iso-8859-1</winCharSet>
</userLocale>
<networkLocale>United_States</networkLocale>
<networkLocaleInfo>
<name>United_States</name>
<uid>64</uid>
<version>10.0.0.0(1)</version>
</networkLocaleInfo>
<deviceSecurityMode>1</deviceSecurityMode>
<idleTimeout>0</idleTimeout>
<authenticationURL>http://z.z.z.z:8080/sccp/authenticate.php</authenticationURL>
<directoryURL>http://z.z.z.z:8080/sccp/xmldirectory.php</directoryURL>
<idleURL/>
<informationURL>http://z.z.z.z:8080/sccp/helptext.php</informationURL>
<messagesURL/>
<proxyServerURL/>
<servicesURL>http://z.z.z.z:8080/sccp/servicesmenu.php</servicesURL>
<secureAuthenticationURL>https://z.z.z.z:8443/sccp/authenticate.php</secureAuthenticationURL>
<secureDirectoryURL>https://z.z.z.z:8443/sccp/xmldirectory.php</secureDirectoryURL>
<secureIdleURL/>
<secureInformationURL>https://z.z.z.z:8443/sccp/helptext.php</secureInformationURL>
<secureMessagesURL/>
<secureServicesURL>https://z.z.z.z:8443/sccp/servicesmenu.php</secureServicesURL>
<dscpForSCCPPhoneConfig>96</dscpForSCCPPhoneConfig>
<dscpForSCCPPhoneServices>0</dscpForSCCPPhoneServices>
<dscpForCm2Dvce>96</dscpForCm2Dvce>
<transportLayerProtocol>1</transportLayerProtocol>
<dndCallAlert>5</dndCallAlert>
<phonePersonalization>0</phonePersonalization>
<rollover>0</rollover>
<singleButtonBarge>0</singleButtonBarge>
<joinAcrossLines>0</joinAcrossLines>
<autoCallPickupEnable>false</autoCallPickupEnable>
<blfAudibleAlertSettingOfIdleStation>0</blfAudibleAlertSettingOfIdleStation>
<blfAudibleAlertSettingOfBusyStation>0</blfAudibleAlertSettingOfBusyStation>
<capfAuthMode>0</capfAuthMode>
<capfList>
<capf>
<phonePort>3804</phonePort>
<processNodeName>y.y.y.y</processNodeName>
</capf>
</capfList>
<certHash/>
<encrConfig>false</encrConfig>
<advertiseG722Codec>0</advertiseG722Codec>
<mobility>
<handoffdn/>
<dtmfdn/>
<ivrdn/>
<dtmfHoldCode>*81</dtmfHoldCode>
<dtmfExclusiveHoldCode>*82</dtmfExclusiveHoldCode>
<dtmfResumeCode>*83</dtmfResumeCode>
<dtmfTxfCode>*84</dtmfTxfCode>
<dtmfCnfCode>*85</dtmfCnfCode>
</mobility>
<TLSResumptionTimer>3600</TLSResumptionTimer>
<userId/>
<ownerId/>
<phoneServices useHTTPS="true">
<provisioning>2</provisioning>
<phoneService type="1" category="0">
<name>Missed Calls</name>
<url>Application:Cisco/MissedCalls</url>
<vendor/>
<version/>
</phoneService>
<phoneService type="2" category="0">
<name>Voicemail</name>
<url>Application:Cisco/Voicemail</url>
<vendor/>
<version/>
</phoneService>
<phoneService type="1" category="0">
<name>Received Calls</name>
<url>Application:Cisco/ReceivedCalls</url>
<vendor/>
<version/>
</phoneService>
<phoneService type="1" category="0">
<name>Placed Calls</name>
<url>Application:Cisco/PlacedCalls</url>
<vendor/>
<version/>
</phoneService>
<phoneService type="1" category="0">
<name>Personal Directory</name>
<url>Application:Cisco/PersonalDirectory</url>
<vendor/>
<version/>
</phoneService>
<phoneService type="1" category="0">
<name>Corporate Directory</name>
<url>Application:Cisco/CorporateDirectory</url>
<vendor/>
<version/>
</phoneService>
</phoneServices>
</device>

View file

@ -1,237 +0,0 @@
<?xml version="1.0"?>
<device ctiid="406" uuid="{aed907f9-9e22-72d8-c218-b7165fff6d37}">
<fullConfig>true</fullConfig>
<portalDefaultServer>x.x.x.x</portalDefaultServer>
<deviceProtocol>SCCP</deviceProtocol>
<sshUserId/>
<sshPassword/>
<ipAddressMode>0</ipAddressMode>
<allowAutoConfig>true</allowAutoConfig>
<dadEnable>true</dadEnable>
<redirectEnable>false</redirectEnable>
<echoMultiEnable>false</echoMultiEnable>
<ipPreferenceModeControl>0</ipPreferenceModeControl>
<ipMediaAddressFamilyPreference>0</ipMediaAddressFamilyPreference>
<tzdata>
<tzolsonversion>2016g</tzolsonversion>
<tzupdater>tzupdater.jar</tzupdater>
</tzdata>
<mlppDomainId>000000</mlppDomainId>
<mlppIndicationStatus>Off</mlppIndicationStatus>
<preemption>Disabled</preemption>
<executiveOverridePreemptable>false</executiveOverridePreemptable>
<devicePool uuid="{f8d7c5cb-5d3b-e6c0-0200-8608c8138e66}">
<revertPriority>0</revertPriority>
<name>MyDeviceName</name>
<dateTimeSetting uuid="{ce543907-40b1-efe8-21e1-bdd1853c9594}">
<name>timezone name</name>
<dateTemplate>M-D-Y</dateTemplate>
<timeZone/>
<olsonTimeZone>Europe/Amsterdam</olsonTimeZone>
<ntps>
<ntp>
<name>x.x.x.x</name>
<ntpMode>Directed Broadcast</ntpMode>
</ntp>
</ntps>
</dateTimeSetting>
<callManagerGroup>
<name>MyGroupName</name>
<tftpDefault>false</tftpDefault>
<members>
<member priority="0">
<callManager>
<name>My CM1 name</name>
<description>My CM Description</description>
<ports>
<ethernetPhonePort>2000</ethernetPhonePort>
<sipPort>5060</sipPort>
<securedSipPort>5061</securedSipPort>
<mgcpPorts>
<listen>2427</listen>
<keepAlive>2428</keepAlive>
</mgcpPorts>
</ports>
<processNodeName>y.y.y.y</processNodeName>
</callManager>
</member>
</members>
</callManagerGroup>
<srstInfo uuid="{cd241e11-4a58-4d3d-9661-f06c912a18a3}">
<name>Disable</name>
<srstOption>Disable</srstOption>
<userModifiable>false</userModifiable>
<ipAddr1/>
<port1>2000</port1>
<ipAddr2/>
<port2>2000</port2>
<ipAddr3/>
<port3>2000</port3>
<sipIpAddr1/>
<sipPort1>5060</sipPort1>
<sipIpAddr2/>
<sipPort2>5060</sipPort2>
<sipIpAddr3/>
<sipPort3>5060</sipPort3>
<isSecure>false</isSecure>
</srstInfo>
<connectionMonitorDuration>120</connectionMonitorDuration>
</devicePool>
<commonProfile>
<phonePassword/>
<backgroundImageAccess>true</backgroundImageAccess>
<callLogBlfEnabled>3</callLogBlfEnabled>
</commonProfile>
<loadInformation>CP7925G-1.4.8.4</loadInformation>
<vendorConfig>
<disableSpeaker>false</disableSpeaker>
<garp>0</garp>
<webAccess>2</webAccess>
<WlanProfile1>0</WlanProfile1>
<WlanProfile2>0</WlanProfile2>
<WlanProfile3>0</WlanProfile3>
<WlanProfile4>0</WlanProfile4>
<loadServer>MyAdminUsername</loadServer>
<adminPassword>MyPassword#$%^!</adminPassword>
<specialNumbers/>
<PushToTalkURL/>
<sendKeyAction>0</sendKeyAction>
<phoneBookWebAccess>0</phoneBookWebAccess>
<unlockSettingsSequence>1</unlockSettingsSequence>
<appButtonTimer>0</appButtonTimer>
<appButtonPriority>0</appButtonPriority>
<outOfRangeAlert>0</outOfRangeAlert>
<scanningMode>0</scanningMode>
<restrictDataRates>0</restrictDataRates>
<powerOffWhenCharging>0</powerOffWhenCharging>
<cdpEnable>1</cdpEnable>
<g722CodecSupport>0</g722CodecSupport>
<homeScreen>0</homeScreen>
<fipsMode>0</fipsMode>
<autoSelectLineEnable>0</autoSelectLineEnable>
<fileSystemVerificationEnable>0</fileSystemVerificationEnable>
<minimumRingVolume>0</minimumRingVolume>
<java>1</java>
</vendorConfig>
<commonConfig>
<sshAccess>1</sshAccess>
<RingLocale>0</RingLocale>
<companyPhotoDir>http://z.z.z.z/pictures/%%sAMAccountName%%.jpg</companyPhotoDir>
<ice/>
<instantMessaging/>
<desktopClient/>
</commonConfig>
<enterpriseConfig>
<ciscoCamera>1</ciscoCamera>
<energyWiseDomain>MyaAdminUsername</energyWiseDomain>
<energyWiseSecret>MyPassword#$%^!</energyWiseSecret>
<webProtocol>0</webProtocol>
<companyPhotoDir>http://z.z.z.z/pictures/%%sAMAccountName%%.jpg</companyPhotoDir>
<ice/>
<instantMessaging/>
<desktopClient/>
</enterpriseConfig>
<versionStamp>1234562241-013d4ba4-5b51-4be6-9792-b7165fff6d37</versionStamp>
<userLocale>
<name>English_United_States</name>
<uid>1</uid>
<langCode>en_US</langCode>
<version>10.0.0.0(1)</version>
<winCharSet>iso-8859-1</winCharSet>
</userLocale>
<networkLocale>United_States</networkLocale>
<networkLocaleInfo>
<name>United_States</name>
<uid>64</uid>
<version>10.0.0.0(1)</version>
</networkLocaleInfo>
<deviceSecurityMode>1</deviceSecurityMode>
<idleTimeout>0</idleTimeout>
<authenticationURL>http://z.z.z.z:8080/sccp/authenticate.php</authenticationURL>
<directoryURL>http://z.z.z.z:8080/sccp/xmldirectory.php</directoryURL>
<idleURL/>
<informationURL>http://z.z.z.z:8080/sccp/helptext.php</informationURL>
<messagesURL/>
<proxyServerURL/>
<servicesURL>http://z.z.z.z:8080/sccp/servicesmenu.php</servicesURL>
<secureAuthenticationURL>https://z.z.z.z:8443/sccp/authenticate.php</secureAuthenticationURL>
<secureDirectoryURL>https://z.z.z.z:8443/sccp/xmldirectory.php</secureDirectoryURL>
<secureIdleURL/>
<secureInformationURL>https://z.z.z.z:8443/sccp/helptext.php</secureInformationURL>
<secureMessagesURL/>
<secureServicesURL>https://z.z.z.z:8443/sccp/servicesmenu.php</secureServicesURL>
<dscpForSCCPPhoneConfig>96</dscpForSCCPPhoneConfig>
<dscpForSCCPPhoneServices>0</dscpForSCCPPhoneServices>
<dscpForCm2Dvce>96</dscpForCm2Dvce>
<transportLayerProtocol>1</transportLayerProtocol>
<dndCallAlert>5</dndCallAlert>
<phonePersonalization>0</phonePersonalization>
<rollover>0</rollover>
<singleButtonBarge>0</singleButtonBarge>
<joinAcrossLines>0</joinAcrossLines>
<autoCallPickupEnable>false</autoCallPickupEnable>
<blfAudibleAlertSettingOfIdleStation>0</blfAudibleAlertSettingOfIdleStation>
<blfAudibleAlertSettingOfBusyStation>0</blfAudibleAlertSettingOfBusyStation>
<capfAuthMode>0</capfAuthMode>
<capfList>
<capf>
<phonePort>3804</phonePort>
<processNodeName>y.y.y.y</processNodeName>
</capf>
</capfList>
<certHash/>
<encrConfig>false</encrConfig>
<advertiseG722Codec>0</advertiseG722Codec>
<mobility>
<handoffdn/>
<dtmfdn/>
<ivrdn/>
<dtmfHoldCode>*81</dtmfHoldCode>
<dtmfExclusiveHoldCode>*82</dtmfExclusiveHoldCode>
<dtmfResumeCode>*83</dtmfResumeCode>
<dtmfTxfCode>*84</dtmfTxfCode>
<dtmfCnfCode>*85</dtmfCnfCode>
</mobility>
<TLSResumptionTimer>3600</TLSResumptionTimer>
<userId/>
<ownerId/>
<phoneServices useHTTPS="true">
<provisioning>2</provisioning>
<phoneService type="1" category="0">
<name>Missed Calls</name>
<url>Application:Cisco/MissedCalls</url>
<vendor/>
<version/>
</phoneService>
<phoneService type="2" category="0">
<name>Voicemail</name>
<url>Application:Cisco/Voicemail</url>
<vendor/>
<version/>
</phoneService>
<phoneService type="1" category="0">
<name>Received Calls</name>
<url>Application:Cisco/ReceivedCalls</url>
<vendor/>
<version/>
</phoneService>
<phoneService type="1" category="0">
<name>Placed Calls</name>
<url>Application:Cisco/PlacedCalls</url>
<vendor/>
<version/>
</phoneService>
<phoneService type="1" category="0">
<name>Personal Directory</name>
<url>Application:Cisco/PersonalDirectory</url>
<vendor/>
<version/>
</phoneService>
<phoneService type="1" category="0">
<name>Corporate Directory</name>
<url>Application:Cisco/CorporateDirectory</url>
<vendor/>
<version/>
</phoneService>
</phoneServices>
</device>

View file

@ -1,178 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<device>
<fullConfig>true</fullConfig>
<deviceProtocol>SCCP</deviceProtocol>
<sshUserId/>
<sshPassword/>
<ipAddressMode>2</ipAddressMode>
<allowAutoConfig>true</allowAutoConfig>
<ipPreferenceModeControl>1</ipPreferenceModeControl>
<tzdata>
<tzolsonversion>2012c</tzolsonversion>
<tzupdater>tzupdater.jar</tzupdater>
</tzdata>
<mlppDomainId>000000</mlppDomainId>
<mlppIndicationStatus>Off</mlppIndicationStatus>
<preemption>Disabled</preemption>
<executiveOverridePreemptable>false</executiveOverridePreemptable>
<devicePool>
<revertPriority>0</revertPriority>
<name>Default</name>
<dateTimeSetting>
<name>CMLocal</name>
<dateTemplate>M/D/Y</dateTemplate>
<timeZone>Greenwich Standard Time</timeZone>
<olsonTimeZone>Etc/GMT</olsonTimeZone>
</dateTimeSetting>
<callManagerGroup>
<name>Default</name>
<tftpDefault>true</tftpDefault>
<members>
<member priority="0">
<callManager>
<name>asterisk</name>
<ipv6Addr/>
<description>asterisk</description>
<ports>
<ethernetPhonePort>2000</ethernetPhonePort>
<sipPort>5060</sipPort>
<securedSipPort>5061</securedSipPort>
<mgcpPorts>
<listen>2427</listen>
<keepAlive>2428</keepAlive>
</mgcpPorts>
</ports>
<processNodeName>asterisk</processNodeName>
</callManager>
</member>
</members>
</callManagerGroup>
<srstInfo uuid="{cd241e11-4a58-4d3d-9661-f06c912a18a3}">
<name>Disable</name>
<srstOption>Disable</srstOption>
<userModifiable>false</userModifiable>
<ipAddr1/>
<port1>2000</port1>
<ipAddr2/>
<port2>2000</port2>
<ipAddr3/>
<port3>2000</port3>
<sipIpAddr1/>
<sipPort1>5060</sipPort1>
<sipIpAddr2/>
<sipPort2>5060</sipPort2>
<sipIpAddr3/>
<sipPort3>5060</sipPort3>
<isSecure>false</isSecure>
</srstInfo>
<connectionMonitorDuration>120</connectionMonitorDuration>
</devicePool>
<commonProfile>
<phonePassword/>
<backgroundImageAccess>true</backgroundImageAccess>
<callLogBlfEnabled>3</callLogBlfEnabled>
</commonProfile>
<loadInformation>apps37sccp.1-4-4-0</loadInformation>
<vendorConfig>
<garp>0</garp>
<voiceVlanAccess>0</voiceVlanAccess>
<sshAccess>1</sshAccess>
<lldpAssetId/>
<voiceQualityControl>0</voiceQualityControl>
</vendorConfig>
<versionStamp>1396020461-83a09e65-e62e-4db3-9e03-e3d0cdfd7093</versionStamp>
<userLocale>
<name>English_United_States</name>
<uid>1</uid>
<langCode>en_US</langCode>
<version>9.0.0.0(1)</version>
<winCharSet>iso-8859-1</winCharSet>
</userLocale>
<networkLocale>United_States</networkLocale>
<networkLocaleInfo>
<name>United_States</name>
<uid>64</uid>
<version>9.0.0.0(1)</version>
</networkLocaleInfo>
<idleTimeout>0</idleTimeout>
<authenticationURL>http://asterisk:8080/ccmcip/authenticate.jsp</authenticationURL>
<directoryURL>http://asterisk:8080/ccmcip/xmldirectory.jsp</directoryURL>
<idleURL/>
<informationURL>http://asterisk:8080/ccmcip/GetTelecasterHelpText.jsp</informationURL>
<messagesURL/>
<proxyServerURL/>
<servicesURL>http://asterisk:8080/ccmcip/getservicesmenu.jsp</servicesURL>
<dscpForSCCPPhoneConfig>96</dscpForSCCPPhoneConfig>
<dscpForSCCPPhoneServices>0</dscpForSCCPPhoneServices>
<dscpForCm2Dvce>96</dscpForCm2Dvce>
<transportLayerProtocol>1</transportLayerProtocol>
<dndCallAlert>5</dndCallAlert>
<phonePersonalization>1</phonePersonalization>
<rollover>0</rollover>
<singleButtonBarge>0</singleButtonBarge>
<joinAcrossLines>0</joinAcrossLines>
<autoCallPickupEnable>false</autoCallPickupEnable>
<blfAudibleAlertSettingOfIdleStation>0</blfAudibleAlertSettingOfIdleStation>
<blfAudibleAlertSettingOfBusyStation>0</blfAudibleAlertSettingOfBusyStation>
<capfAuthMode>0</capfAuthMode>
<capfList>
<capf>
<phonePort>3804</phonePort>
<processNodeName>asterisk</processNodeName>
<ipv6Addr/>
</capf>
</capfList>
<certHash/>
<encrConfig>false</encrConfig>
<advertiseG722Codec>1</advertiseG722Codec>
<mobility>
<handoffdn/>
<dtmfdn/>
<ivrdn/>
<dtmfHoldCode>*81</dtmfHoldCode>
<dtmfExclusiveHoldCode>*82</dtmfExclusiveHoldCode>
<dtmfResumeCode>*83</dtmfResumeCode>
<dtmfTxfCode>*84</dtmfTxfCode>
<dtmfCnfCode>*85</dtmfCnfCode>
</mobility>
<userId/>
<phoneServices>
<provisioning>2</provisioning>
<phoneService type="1" category="0">
<name>Missed Calls</name>
<url>Application:Cisco/MissedCalls</url>
<vendor/>
<version/>
</phoneService>
<phoneService type="2" category="0">
<name>Voicemail</name>
<url>Application:Cisco/Voicemail</url>
<vendor/>
<version/>
</phoneService>
<phoneService type="1" category="0">
<name>Received Calls</name>
<url>Application:Cisco/ReceivedCalls</url>
<vendor/>
<version/>
</phoneService>
<phoneService type="1" category="0">
<name>Placed Calls</name>
<url>Application:Cisco/PlacedCalls</url>
<vendor/>
<version/>
</phoneService>
<phoneService type="1" category="0">
<name>Personal Directory</name>
<url>Application:Cisco/PersonalDirectory</url>
<vendor/>
<version/>
</phoneService>
<phoneService type="1" category="0">
<name>Corporate Directory</name>
<url>Application:Cisco/CorporateDirectory</url>
<vendor/>
<version/>
</phoneService>
</phoneServices>
</device>

View file

@ -1,81 +0,0 @@
<?xml version="1.0"?>
<device>
<sshUserId>cisco</sshUserId>
<sshPassword>cisco</sshPassword>
<deviceProtocol>SCCP</deviceProtocol>
<devicePool>
<dateTimeSetting>
<name>Netherlands</name>
<dateTemplate>D-M-YA</dateTemplate>
<timeZone>W. Europe Standard/Daylight Time</timeZone>
<ntps>
<ntp>
<name>x.x.x.x</name>
<ntpMode>Unicast</ntpMode>
</ntp>
</ntps>
</dateTimeSetting>
<callManagerGroup>
<members>
<member priority="0">
<callManager>
<ports>
<ethernetPhonePort>2000</ethernetPhonePort>
</ports>
<processNodeName>x.x.x.x</processNodeName>
</callManager>
</member>
</members>
</callManagerGroup>
</devicePool>
<versionStamp>{Jan 01 2003 00:00:00}</versionStamp>
<loadInformation>P00308010100</loadInformation>
<vendorConfig>
<disableSpeaker>false</disableSpeaker>
<disableSpeakerAndHeadset>false</disableSpeakerAndHeadset>
<forwardingDelay>1</forwardingDelay>
<pcPort>0</pcPort>
<settingsAccess>1</settingsAccess>
<garp>0</garp>
<voiceVlanAccess>0</voiceVlanAccess>
<videoCapability>0</videoCapability>
<autoSelectLineEnable>0</autoSelectLineEnable>
<webAccess>0</webAccess>
<daysDisplayNotActive>1,7</daysDisplayNotActive>
<displayOnTime>08:30</displayOnTime>
<displayOnDuration>11:30</displayOnDuration>
<displayIdleTimeout>01:00</displayIdleTimeout>
</vendorConfig>
<userLocale>
<name>Dutch_Netherlands</name>
<langCode>nl</langCode>
<winCharSet>iso-8859-1</winCharSet>
</userLocale>
<networkLocale>Netherlands</networkLocale>
<networkLocaleInfo>
<name/>
<uid>64</uid>
<version>4.0(1)</version>
</networkLocaleInfo>
<phonePersonalization>1</phonePersonalization>
<deviceSecurityMode>0</deviceSecurityMode>
<idleTimeout>3600</idleTimeout>
<authenticationURL>http://x.x.x.x/cisco_menu/authentication.php</authenticationURL>
<idleURL>http://x.x.x.x/cisco_menu/idle.php</idleURL>
<informationURL>http://x.x.x.x/cisco_menu/help/help.php</informationURL>
<messagesURL/>
<proxyServerURL/>
<servicesURL>http://x.x.x.x/cisco_menu/menu.php</servicesURL>
<directoryURL>http://x.x.x.x/cisco_menu/directory/menu.php</directoryURL>
<dscpForSCCPPhoneConfig>104</dscpForSCCPPhoneConfig>
<dscpForSCCPPhoneServices>0</dscpForSCCPPhoneServices>
<dscpForCm2Dvce>184</dscpForCm2Dvce>
<transportLayerProtocol>4</transportLayerProtocol>
<capfAuthMode>0</capfAuthMode>
<capfList>
<capf>
<phonePort>3804</phonePort>
</capf>
</capfList>
<encrConfig>false</encrConfig>
</device>

View file

@ -1,98 +0,0 @@
<?xml version="1.0"?>
<device>
<sshUserId>cisco</sshUserId>
<sshPassword>cisco</sshPassword>
<devicePool>
<dateTimeSetting>
<name>Netherlands</name>
<dateTemplate>D-M-YA</dateTemplate>
<timeZone>W. Europe Standard/Daylight Time</timeZone>
<ntps>
<ntp>
<name>x.x.x.x</name>
<ntpMode>Unicast</ntpMode>
</ntp>
</ntps>
</dateTimeSetting>
<callManagerGroup>
<members>
<member priority="0">
<callManager>
<ports>
<ethernetPhonePort>2000</ethernetPhonePort>
</ports>
<processNodeName>x.x.x.x</processNodeName>
</callManager>
</member>
</members>
</callManagerGroup>
<srstInfo>
<name>Enable</name>
<srstOption>Enable</srstOption>
<userModifiable>true</userModifiable>
<ipAddr1>x.x.x.x</ipAddr1>
<port1>2000</port1>
<ipAddr2/>
<port2>2000</port2>
<ipAddr3/>
<port3>2000</port3>
</srstInfo>
<connectionMonitorDuration>120</connectionMonitorDuration>
</devicePool>
<versionStamp>{Jan 01 2003 00:00:00}</versionStamp>
<loadInformation>P00308010100</loadInformation>
<vendorConfig>
<disableSpeaker>false</disableSpeaker>
<disableSpeakerAndHeadset>false</disableSpeakerAndHeadset>
<forwardingDelay>1</forwardingDelay>
<pcPort>0</pcPort>
<settingsAccess>1</settingsAccess>
<garp>0</garp>
<voiceVlanAccess>0</voiceVlanAccess>
<videoCapability>0</videoCapability>
<autoSelectLineEnable>0</autoSelectLineEnable>
<webAccess>0</webAccess>
<daysDisplayNotActive>1,7</daysDisplayNotActive>
<displayOnTime>08:30</displayOnTime>
<displayOnDuration>11:30</displayOnDuration>
<displayIdleTimeout>01:00</displayIdleTimeout>
</vendorConfig>
<userLocale>
<name>Dutch_Netherlands</name>
<langCode>nl</langCode>
<winCharSet>iso-8859-1</winCharSet>
</userLocale>
<networkLocale>Netherlands</networkLocale>
<networkLocaleInfo>
<name/>
<uid>64</uid>
<version>4.0(1)</version>
</networkLocaleInfo>
<commonProfile>
<phonePassword/>
<backgroundImageAccess>true</backgroundImageAccess>
<callLogBlfEnabled>3</callLogBlfEnabled>
</commonProfile>
<phonePersonalization>1</phonePersonalization>
<deviceSecurityMode>0</deviceSecurityMode>
<idleTimeout>3600</idleTimeout>
<authenticationURL>http://x.x.x.x/cisco_menu/authentication.php</authenticationURL>
<idleURL>http://x.x.x.x/cisco_menu/idle.php</idleURL>
<informationURL>http://x.x.x.x/cisco_menu/help/help.php</informationURL>
<messagesURL/>
<proxyServerURL/>
<servicesURL>http://x.x.x.x/cisco_menu/menu.php</servicesURL>
<directoryURL>http://x.x.x.x/cisco_menu/directory/menu.php</directoryURL>
<dscpForSCCPPhoneConfig>104</dscpForSCCPPhoneConfig>
<dscpForSCCPPhoneServices>0</dscpForSCCPPhoneServices>
<dscpForCm2Dvce>184</dscpForCm2Dvce>
<transportLayerProtocol>4</transportLayerProtocol>
<capfAuthMode>0</capfAuthMode>
<capfList>
<capf>
<phonePort>3804</phonePort>
</capf>
</capfList>
<certHash/>
<encrConfig>false</encrConfig>
</device>

View file

@ -1,163 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<device>
<fullConfig>true</fullConfig>
<sshUserId>cisco</sshUserId>
<sshPassword>cisco</sshPassword>
<ipAddressMode>2</ipAddressMode>
<ipPreferenceModeControl>1</ipPreferenceModeControl>
<allowAutoConfig>true</allowAutoConfig>
<devicePool uuid="{1b1b9eb6-7803-11d3-bdf0-00108302ead1}">
<revertPriority>1</revertPriority>
<dateTimeSetting>
<dateTemplate>M/D/YA</dateTemplate>
<timeZone>Eastern Standard/Daylight Time</timeZone>
<ntps>
<ntp>
<name>213.109.127.195</name>
<ntpMode>Unicast</ntpMode>
</ntp>
</ntps>
</dateTimeSetting>
<callManagerGroup>
<members>
<member priority="0">
<callManager>
<name>pbxserver1</name>
<ports>
<ethernetPhonePort>2000</ethernetPhonePort>
</ports>
<processNodeName>x.x.x.x</processNodeName>
</callManager>
</member>
</members>
</callManagerGroup>
<srstInfo>
<srstOption>Disable</srstOption>
<ipAddr1>x.x.x.x</ipAddr1>
<port1>2443</port1>
<ipAddr2/>
<port2/>
<isSecure>false</isSecure>
</srstInfo>
<connectionMonitorDuration>60</connectionMonitorDuration>
</devicePool>
<versionStamp>1b1b9eb6-7803-11d3-bdf0-00108302ead1</versionStamp>
<commonProfile>
<phonePassword>1234</phonePassword>
<defaultBackground>http://x.x.x.x/Chan-SCCP-b.png</defaultBackground>
<backgroundImageAccess>true</backgroundImageAccess>
<callLogBlfEnabled>3</callLogBlfEnabled>
</commonProfile>
<vendorConfig>
<disableSpeaker>false</disableSpeaker>
<disableSpeakerAndHeadset>false</disableSpeakerAndHeadset>
<forwardingDelay>1</forwardingDelay>
<settingsAccess>1</settingsAccess>
<videoCapability>1</videoCapability>
<autoSelectLineEnable>0</autoSelectLineEnable>
<webAccess>0</webAccess>
<daysDisplayNotActive>1,7</daysDisplayNotActive>
<displayOnTime>08:30</displayOnTime>
<displayOnDuration>11:30</displayOnDuration>
<displayIdleTimeout>01:00</displayIdleTimeout>
<displayOnWhenIncomingCall>1</displayOnWhenIncomingCall>
<loggingDisplay>1</loggingDisplay>
<autoCallSelect>0</autoCallSelect>
<logServer>x.x.x.x:9001</logServer>
<enableCdpSwPort>1</enableCdpSwPort>
<enableCdpPcPort>1</enableCdpPcPort>
<enableLldpSwPort>1</enableLldpSwPort>
<enableLldpPcPort>1</enableLldpPcPort>
<lldpAssetId>Cisco Phone</lldpAssetId>
<powerPriority>1</powerPriority>
<detectCMConnectionFailure>0</detectCMConnectionFailure>
<g722CodecSupport>2</g722CodecSupport>
<sshAccess>0</sshAccess>
<pcPort>0</pcPort>
<spanToPCPort>0</spanToPCPort>
<callHoldRingback>1</callHoldRingback>
<rtcp>1</rtcp>
<rtpcontrolprotocol>1</rtpcontrolprotocol>
<videoRtcp>1</videoRtcp>
</vendorConfig>
<userLocale>
<name>English_United_States</name>
<uid>39</uid>
<langCode>en_US</langCode>
<version>9.3(2.9902)US</version>
<winCharSet>utf-8</winCharSet>
</userLocale>
<networkLocale>United_States</networkLocale>
<networkLocaleInfo>
<name>United_States</name>
<uid>64</uid>
<version>4.0(1)</version>
</networkLocaleInfo>
<informationURL>http://x.x.x.x/shiftkey/handle_shift.php</informationURL>
<authenticationURL>http://x.x.x.x/authenticate.php</authenticationURL>
<servicesURL>http://x.x.x.x/cisco/service.php?emcc=#EMCC#</servicesURL>
<directoryURL>http://x.x.x.x/CiscoDirectory/phonebook.php</directoryURL>
<messagesURL/>
<proxyServerURL/>
<dndCallAlert>5</dndCallAlert>
<dndReminderTimer>60</dndReminderTimer>
<phonePersonalization>0</phonePersonalization>
<rollover>0</rollover>
<singleButtonBarge>1</singleButtonBarge>
<joinAcrossLines>1</joinAcrossLines>
<autoCallPickupEnable>true</autoCallPickupEnable>
<blfAudibleAlertSettingOfIdleStation>1</blfAudibleAlertSettingOfIdleStation>
<blfAudibleAlertSettingOfBusyStation>1</blfAudibleAlertSettingOfBusyStation>
<advertiseG722Codec>1</advertiseG722Codec>
<userId>dkgroot</userId>
<transportLayerProtocol>2</transportLayerProtocol>
<deviceSecurityMode>1</deviceSecurityMode>
<dscpForSCCPPhoneConfig>96</dscpForSCCPPhoneConfig>
<dscpForSCCPPhoneServices>0</dscpForSCCPPhoneServices>
<dscpForCm2Dvce>184</dscpForCm2Dvce>
<phoneServices>
<provisioning>0</provisioning>
<phoneService type="1" category="0">
<name>Missed Calls</name>
<url>Application:Cisco/MissedCalls</url>
<vendor/>
<version/>
</phoneService>
<phoneService type="1" category="0">
<name>Received Calls</name>
<url>Application:Cisco/ReceivedCalls</url>
<vendor/>
<version/>
</phoneService>
<phoneService type="1" category="0">
<name>Placed Calls</name>
<url>Application:Cisco/PlacedCalls</url>
<vendor/>
<version/>
</phoneService>
<phoneService type="1" category="0">
<name>Personal Directory</name>
<url>Application:Cisco/PersonalDirectory</url>
<vendor/>
<version/>
</phoneService>
<phoneService type="2" category="0">
<name>Voicemail</name>
<url>Application:Cisco/Voicemail</url>
<vendor/>
<version/>
</phoneService>
<phoneService type="0" category="0">
<name>Services</name>
<url>http://x.x.x.x/cisco/service.php?emmcmode=#EMCC#</url>
<vendor/>
<version/>
</phoneService>
<phoneService type="0" category="0">
<name>Login</name>
<url>http://x.x.x.x/cisco/service.php?name=#DEVICENAME#&amp;emmcmode=#EMCC#&amp;action=loginform</url>
<vendor/>
<version/>
</phoneService>
</phoneServices>
</device>

View file

@ -1,163 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<device>
<fullConfig>true</fullConfig>
<sshUserId>cisco</sshUserId>
<sshPassword>cisco</sshPassword>
<ipAddressMode>2</ipAddressMode>
<ipPreferenceModeControl>1</ipPreferenceModeControl>
<allowAutoConfig>true</allowAutoConfig>
<devicePool uuid="{1b1b9eb6-7803-11d3-bdf0-00108302ead1}">
<revertPriority>1</revertPriority>
<dateTimeSetting>
<dateTemplate>M/D/YA</dateTemplate>
<timeZone>Eastern Standard/Daylight Time</timeZone>
<ntps>
<ntp>
<name>213.109.127.195</name>
<ntpMode>Unicast</ntpMode>
</ntp>
</ntps>
</dateTimeSetting>
<callManagerGroup>
<members>
<member priority="0">
<callManager>
<name>pbxserver1</name>
<ports>
<ethernetPhonePort>2000</ethernetPhonePort>
</ports>
<processNodeName>x.x.x.x</processNodeName>
</callManager>
</member>
</members>
</callManagerGroup>
<srstInfo>
<srstOption>Disable</srstOption>
<ipAddr1>x.x.x.x</ipAddr1>
<port1>2443</port1>
<ipAddr2/>
<port2/>
<isSecure>false</isSecure>
</srstInfo>
<connectionMonitorDuration>60</connectionMonitorDuration>
</devicePool>
<versionStamp>1b1b9eb6-7803-11d3-bdf0-00108302ead1</versionStamp>
<commonProfile>
<phonePassword>1234</phonePassword>
<defaultBackground>http://x.x.x.x/Chan-SCCP-b.png</defaultBackground>
<backgroundImageAccess>true</backgroundImageAccess>
<callLogBlfEnabled>3</callLogBlfEnabled>
</commonProfile>
<vendorConfig>
<disableSpeaker>false</disableSpeaker>
<disableSpeakerAndHeadset>false</disableSpeakerAndHeadset>
<forwardingDelay>1</forwardingDelay>
<settingsAccess>1</settingsAccess>
<videoCapability>1</videoCapability>
<autoSelectLineEnable>0</autoSelectLineEnable>
<webAccess>0</webAccess>
<daysDisplayNotActive>1,7</daysDisplayNotActive>
<displayOnTime>08:30</displayOnTime>
<displayOnDuration>11:30</displayOnDuration>
<displayIdleTimeout>01:00</displayIdleTimeout>
<displayOnWhenIncomingCall>1</displayOnWhenIncomingCall>
<loggingDisplay>1</loggingDisplay>
<autoCallSelect>0</autoCallSelect>
<logServer>x.x.x.x:9001</logServer>
<enableCdpSwPort>1</enableCdpSwPort>
<enableCdpPcPort>1</enableCdpPcPort>
<enableLldpSwPort>1</enableLldpSwPort>
<enableLldpPcPort>1</enableLldpPcPort>
<lldpAssetId>Cisco Phone</lldpAssetId>
<powerPriority>1</powerPriority>
<detectCMConnectionFailure>0</detectCMConnectionFailure>
<g722CodecSupport>2</g722CodecSupport>
<sshAccess>0</sshAccess>
<pcPort>0</pcPort>
<spanToPCPort>0</spanToPCPort>
<callHoldRingback>1</callHoldRingback>
<rtcp>1</rtcp>
<rtpcontrolprotocol>1</rtpcontrolprotocol>
<videoRtcp>1</videoRtcp>
</vendorConfig>
<userLocale>
<name>English_United_States</name>
<uid>39</uid>
<langCode>en_US</langCode>
<version>9.3(2.9902)US</version>
<winCharSet>utf-8</winCharSet>
</userLocale>
<networkLocale>United_States</networkLocale>
<networkLocaleInfo>
<name>United_States</name>
<uid>64</uid>
<version>4.0(1)</version>
</networkLocaleInfo>
<informationURL>http://x.x.x.x/shiftkey/handle_shift.php</informationURL>
<authenticationURL>http://x.x.x.x/authenticate.php</authenticationURL>
<!--<servicesURL>http://x.x.x.x/cisco/service.php?emcc=#EMCC#</servicesURL>-->
<directoryURL>http://x.x.x.x/CiscoDirectory/phonebook.php</directoryURL>
<messagesURL/>
<proxyServerURL/>
<dndCallAlert>5</dndCallAlert>
<dndReminderTimer>60</dndReminderTimer>
<phonePersonalization>0</phonePersonalization>
<rollover>0</rollover>
<singleButtonBarge>1</singleButtonBarge>
<joinAcrossLines>1</joinAcrossLines>
<autoCallPickupEnable>true</autoCallPickupEnable>
<blfAudibleAlertSettingOfIdleStation>1</blfAudibleAlertSettingOfIdleStation>
<blfAudibleAlertSettingOfBusyStation>1</blfAudibleAlertSettingOfBusyStation>
<advertiseG722Codec>1</advertiseG722Codec>
<userId>dkgroot</userId>
<transportLayerProtocol>2</transportLayerProtocol>
<deviceSecurityMode>1</deviceSecurityMode>
<dscpForSCCPPhoneConfig>96</dscpForSCCPPhoneConfig>
<dscpForSCCPPhoneServices>0</dscpForSCCPPhoneServices>
<dscpForCm2Dvce>184</dscpForCm2Dvce>
<phoneServices>
<provisioning>0</provisioning>
<phoneService type="1" category="0">
<name>Missed Calls</name>
<url>Application:Cisco/MissedCalls</url>
<vendor/>
<version/>
</phoneService>
<phoneService type="1" category="0">
<name>Received Calls</name>
<url>Application:Cisco/ReceivedCalls</url>
<vendor/>
<version/>
</phoneService>
<phoneService type="1" category="0">
<name>Placed Calls</name>
<url>Application:Cisco/PlacedCalls</url>
<vendor/>
<version/>
</phoneService>
<phoneService type="1" category="0">
<name>Personal Directory</name>
<url>Application:Cisco/PersonalDirectory</url>
<vendor/>
<version/>
</phoneService>
<phoneService type="2" category="0">
<name>Voicemail</name>
<url>Application:Cisco/Voicemail</url>
<vendor/>
<version/>
</phoneService>
<phoneService type="0" category="0">
<name>Services</name>
<url>http://x.x.x.x/cisco/service.php?emmcmode=#EMCC#</url>
<vendor/>
<version/>
</phoneService>
<phoneService type="0" category="0">
<name>Login</name>
<url>http://x.x.x.x/cisco/service.php?name=#DEVICENAME#&amp;emmcmode=#EMCC#&amp;action=loginform</url>
<vendor/>
<version/>
</phoneService>
</phoneServices>
</device>

View file

@ -1,255 +0,0 @@
<device>
<fullConfig>true</fullConfig>
<deviceProtocol>SIP</deviceProtocol>
<devicePool>
<dateTimeSetting>
<dateTemplate>D/M/Y</dateTemplate>
<timeZone></timeZone>
<ntps>
<ntp>
<name></name>
<ntpMode>unicast</ntpMode>
</ntp>
</ntps>
</dateTimeSetting>
<callManagerGroup>
<members>
<member priority="0">
<callManager>
<ports>
<sipPort>5060</sipPort>
<securedSipPort>5061</securedSipPort>
</ports>
<processNodeName></processNodeName>
</callManager>
</member>
</members>
</callManagerGroup>
</devicePool>
<sipProfile>
<sipProxies>
<registerWithProxy>true</registerWithProxy>
<backupProxy>$ASTERISK</backupProxy>
<backupProxyPort>5060</backupProxyPort>
<emergencyProxy>$ASTERISK</emergencyProxy>
<emergencyProxyPort>5060</emergencyProxyPort>
<outboundProxy>$ASTERISK</outboundProxy>
<outboundProxyPort>5060</outboundProxyPort>
</sipProxies>
<sipCallFeatures>
<cnfJoinEnabled>true</cnfJoinEnabled>
<callForwardURI>x-cisco-serviceuri-cfwdall</callForwardURI>
<callPickupURI>x-cisco-serviceuri-pickup</callPickupURI>
<callPickupListURI>x-cisco-serviceuri-opickup</callPickupListURI>
<callPickupGroupURI>x-cisco-serviceuri-gpickup</callPickupGroupURI>
<meetMeServiceURI>x-cisco-serviceuri-meetme</meetMeServiceURI>
<abbreviatedDialURI>x-cisco-serviceuri-abbrdial</abbreviatedDialURI>
<rfc2543Hold>false</rfc2543Hold>
<callHoldRingback>1</callHoldRingback>
<localCfwdEnable>true</localCfwdEnable>
<semiAttendedTransfer>true</semiAttendedTransfer>
<anonymousCallBlock>3</anonymousCallBlock>
<callerIdBlocking>3</callerIdBlocking>
<dndControl>0</dndControl>
<remoteCcEnable>true</remoteCcEnable>
<retainForwardInformation>false</retainForwardInformation>
</sipCallFeatures>
<sipStack>
<sipInviteRetx>6</sipInviteRetx>
<sipRetx>10</sipRetx>
<timerInviteExpires>180</timerInviteExpires>
<timerRegisterExpires>3600</timerRegisterExpires>
<timerRegisterDelta>5</timerRegisterDelta>
<timerKeepAliveExpires>120</timerKeepAliveExpires>
<timerSubscribeExpires>120</timerSubscribeExpires>
<timerSubscribeDelta>5</timerSubscribeDelta>
<timerT1>500</timerT1>
<timerT2>4000</timerT2>
<maxRedirects>70</maxRedirects>
<remotePartyID>true</remotePartyID>
<userInfo>Phone</userInfo>
</sipStack>
<autoAnswerTimer>1</autoAnswerTimer>
<autoAnswerAltBehavior>false</autoAnswerAltBehavior>
<autoAnswerOverride>true</autoAnswerOverride>
<transferOnhookEnabled>true</transferOnhookEnabled>
<enableVad>false</enableVad>
<preferredCodec>g711alaw</preferredCodec>
<dtmfAvtPayload>101</dtmfAvtPayload>
<dtmfDbLevel>3</dtmfDbLevel>
<dtmfOutofBand>avt</dtmfOutofBand>
<alwaysUsePrimeLine>false</alwaysUsePrimeLine>
<alwaysUsePrimeLineVoiceMail>false</alwaysUsePrimeLineVoiceMail>
<kpml>0</kpml>
<phoneLabel></phoneLabel>
<stutterMsgWaiting>0</stutterMsgWaiting>
<callStats>true</callStats>
<offhookToFirstDigitTimer>15000</offhookToFirstDigitTimer>
<silentPeriodBetweenCallWaitingBursts>10</silentPeriodBetweenCallWaitingBursts>
<disableLocalSpeedDialConfig>false</disableLocalSpeedDialConfig>
<startMediaPort>16384</startMediaPort>
<stopMediaPort>32766</stopMediaPort>
<natEnabled>false</natEnabled>
<natReceivedProcessing>false</natReceivedProcessing>
<natAddress></natAddress>
<sipLines>
<line button="1" lineIndex="1">
<featureID>9</featureID>
<featureLabel></featureLabel>
<proxy>USECALLMANAGER</proxy>
<port>5060</port>
<name></name>
<displayName></displayName>
<autoAnswer>
<autoAnswerEnabled>0</autoAnswerEnabled>
</autoAnswer>
<callWaiting>3</callWaiting>
<authName></authName>
<authPassword></authPassword>
<contact></contact>
<sharedLine>false</sharedLine>
<messageWaitingLampPolicy>3</messageWaitingLampPolicy>
<messageWaitingAMWI>0</messageWaitingAMWI>
<messagesNumber></messagesNumber>
<ringSettingIdle>4</ringSettingIdle>
<ringSettingActive>5</ringSettingActive>
<forwardCallInfoDisplay>
<callerName>true</callerName>
<callerNumber>true</callerNumber>
<redirectedNumber>false</redirectedNumber>
<dialedNumber>true</dialedNumber>
</forwardCallInfoDisplay>
<maxNumCalls>5</maxNumCalls>
<busyTrigger>4</busyTrigger>
</line>
</sipLines>
<externalNumberMask></externalNumberMask>
<voipControlPort>5060</voipControlPort>
<dscpForAudio>184</dscpForAudio>
<ringSettingBusyStationPolicy>0</ringSettingBusyStationPolicy>
<dialTemplate></dialTemplate>
<softKeyFile></softKeyFile>
</sipProfile>
<MissedCallLoggingOption>1</MissedCallLoggingOption>
<commonProfile>
<phonePassword></phonePassword>
<backgroundImageAccess>true</backgroundImageAccess>
<callLogBlfEnabled>2</callLogBlfEnabled>
</commonProfile>
<vendorConfig>
<disableSpeaker>false</disableSpeaker>
<disableSpeakerAndHeadset>false</disableSpeakerAndHeadset>
<enableMuteFeature>false</enableMuteFeature>
<enableGroupListen>true</enableGroupListen>
<pcPort>0</pcPort>
<spanToPCPort>1</spanToPCPort>
<garp>0</garp>
<rtcp>1</rtcp>
<voiceVlanAccess>0</voiceVlanAccess>
<videoCapability>1</videoCapability>
<ehookEnable>0</ehookEnable>
<autoSelectLineEnable>1</autoSelectLineEnable>
<autoCallSelect>1</autoCallSelect>
<minimumRingVolume></minimumRingVolume>
<settingsAccess>1</settingsAccess>
<webProtocol>0</webProtocol>
<webAccess>0</webAccess>
<sshAccess>0</sshAccess>
<detectCMConnectionFailure>0</detectCMConnectionFailure>
<g722CodecSupport>1</g722CodecSupport>
<handsetWidebandEnable>2</handsetWidebandEnable>
<headsetWidebandEnable>2</headsetWidebandEnable>
<headsetWidebandUIControl>1</headsetWidebandUIControl>
<handsetWidebandUIControl>1</handsetWidebandUIControl>
<daysDisplayNotActive>1,7</daysDisplayNotActive>
<displayOnTime>08:00</displayOnTime>
<displayOnDuration>10:00</displayOnDuration>
<displayIdleTimeout>00:10</displayIdleTimeout>
<displayOnWhenIncomingCall>1</displayOnWhenIncomingCall>
<displayRefreshRate>0</displayRefreshRate>
<recordingTone>0</recordingTone>
<recordingToneLocalVolume>100</recordingToneLocalVolume>
<recordingToneRemoteVolume>50</recordingToneRemoteVolume>
<recordingToneDuration></recordingToneDuration>
<moreKeyReversionTimer>5</moreKeyReversionTimer>
<peerFirmwareSharing>0</peerFirmwareSharing>
<loadServer></loadServer>
<enableCdpSwPort>1</enableCdpSwPort>
<enableCdpPcPort>0</enableCdpPcPort>
<enableLldpSwPort>1</enableLldpSwPort>
<enableLldpPcPort>0</enableLldpPcPort>
</vendorConfig>
<versionStamp>d902ed5a-c1e5-4233-b1d6-a960d53d1c3a</versionStamp>
<loadInformation></loadInformation>
<phoneServices useHTTPS="false">
<provisioning>2</provisioning>
<phoneService type="1" category="0">
<name>Missed Calls</name>
<url>Application:Cisco/MissedCalls</url>
<vendor></vendor>
<version></version>
</phoneService>
<phoneService type="1" category="0">
<name>Received Calls</name>
<url>Application:Cisco/ReceivedCalls</url>
<vendor></vendor>
<version></version>
</phoneService>
<phoneService type="1" category="0">
<name>Placed Calls</name>
<url>Application:Cisco/PlacedCalls</url>
<vendor></vendor>
<version></version>
</phoneService>
<phoneService type="2" category="0">
<name>Voicemail</name>
<url>Application:Cisco/Voicemail</url>
<vendor></vendor>
<version></version>
</phoneService>
</phoneServices>
<userLocale>
<name></name>
<uid>1</uid>
<langCode></langCode>
<version>10</version>
<winCharSet>utf-8</winCharSet>
</userLocale>
<networkLocale></networkLocale>
<networkLocaleInfo>
<name></name>
<version>10</version>
</networkLocaleInfo>
<deviceSecurityMode>1</deviceSecurityMode>
<idleTimeout>0</idleTimeout>
<authenticationURL></authenticationURL>
<messagesURL></messagesURL>
<servicesURL></servicesURL>
<directoryURL></directoryURL>
<idleURL></idleURL>
<informationURL></informationURL>
<proxyServerURL></proxyServerURL>
<secureAuthenticationURL></secureAuthenticationURL>
<secureMessagesURL></secureMessagesURL>
<secureServicesURL></secureServicesURL>
<secureDirectoryURL></secureDirectoryURL>
<secureInformationURL></secureInformationURL>
<secureIdleURL></secureIdleURL>
<transportLayerProtocol>1</transportLayerProtocol>
<TLSResumptionTimer>3600</TLSResumptionTimer>
<phonePersonalization>1</phonePersonalization>
<autoCallPickupEnable>true</autoCallPickupEnable>
<blfAudibleAlertSettingOfIdleStation>0</blfAudibleAlertSettingOfIdleStation>
<blfAudibleAlertSettingOfBusyStation>0</blfAudibleAlertSettingOfBusyStation>
<dndCallAlert>1</dndCallAlert>
<dndReminderTimer>5</dndReminderTimer>
<advertiseG722Codec>1</advertiseG722Codec>
<rollover>0</rollover>
<joinAcrossLines>0</joinAcrossLines>
<capfAuthMode>0</capfAuthMode>
<capfList></capfList>
<certHash></certHash>
<encrConfig>false</encrConfig>
<sshUserId></sshUserId>
<sshPassword></sshPassword>
</device>

View file

@ -1,89 +0,0 @@
<?xml version="1.0"?>
<device>
<sshUserId>cisco</sshUserId>
<sshPassword>cisco</sshPassword>
<devicePool>
<dateTimeSetting>
<dateTemplate>D-M-YA</dateTemplate>
<timeZone>W. Europe Standard/Daylight Time</timeZone>
<ntps>
<ntp>
<name>x.x.x.x</name>
<ntpMode>Unicast</ntpMode>
</ntp>
</ntps>
</dateTimeSetting>
<callManagerGroup>
<members>
<member priority="0">
<callManager>
<ports>
<ethernetPhonePort>2000</ethernetPhonePort>
</ports>
<processNodeName>x.x.x.x</processNodeName>
</callManager>
</member>
</members>
</callManagerGroup>
<srstInfo>
<srstOption>Enable</srstOption>
<ipAddr1>x.x.x.x</ipAddr1>
<port1>2000</port1>
<ipAddr2/>
<port2>2000</port2>
<ipAddr3/>
<port3>2000</port3>
</srstInfo>
<connectionMonitorDuration>120</connectionMonitorDuration>
</devicePool>
<loadInformation>SCCP11.8-5-2S</loadInformation>
<vendorConfig>
<disableSpeaker>false</disableSpeaker>
<disableSpeakerAndHeadset>false</disableSpeakerAndHeadset>
<forwardingDelay>1</forwardingDelay>
<pcPort>0</pcPort>
<settingsAccess>1</settingsAccess>
<garp>0</garp>
<voiceVlanAccess>0</voiceVlanAccess>
<videoCapability>0</videoCapability>
<autoSelectLineEnable>0</autoSelectLineEnable>
<webAccess>0</webAccess>
<daysDisplayNotActive>1,7</daysDisplayNotActive>
<displayOnTime>08:30</displayOnTime>
<displayOnDuration>11:30</displayOnDuration>
<displayIdleTimeout>01:00</displayIdleTimeout>
</vendorConfig>
<userLocale>
<name>Netherlands</name>
<langCode>nl</langCode>
<version>4.0(1)</version>
<winCharSet>iso-8859-1</winCharSet>
</userLocale>
<networkLocale>Netherlands</networkLocale>
<networkLocaleInfo>
<name/>
<uid>64</uid>
<version>4.0(1)</version>
</networkLocaleInfo>
<deviceSecurityMode>0</deviceSecurityMode>
<idleTimeout>3600</idleTimeout>
<authenticationURL>http://x.x.x.x/cisco_menu/authentication.php</authenticationURL>
<idleURL>http://x.x.x.x/cisco_menu/idle.php</idleURL>
<informationURL>http://x.x.x.x/cisco_menu/help/help.php</informationURL>
<messagesURL/>
<proxyServerURL/>
<servicesURL>http://x.x.x.x/cisco_menu/menu.php</servicesURL>
<directoryURL>http://x.x.x.x/cisco_menu/directory/menu.php</directoryURL>
<dscpForSCCPPhoneConfig>104</dscpForSCCPPhoneConfig>
<dscpForSCCPPhoneServices>0</dscpForSCCPPhoneServices>
<dscpForCm2Dvce>184</dscpForCm2Dvce>
<transportLayerProtocol>4</transportLayerProtocol>
<capfAuthMode>0</capfAuthMode>
<capfList>
<capf>
<phonePort>3804</phonePort>
</capf>
</capfList>
<certHash/>
<encrConfig>false</encrConfig>
</device>

View file

@ -1,300 +0,0 @@
<device>
<fullConfig>true</fullConfig>
<deviceProtocol>SIP</deviceProtocol>
<devicePool>
<dateTimeSetting>
<dateTemplate>D/M/Y</dateTemplate>
<timeZone></timeZone>
<ntps>
<ntp>
<name></name>
<ntpMode>unicast</ntpMode>
</ntp>
</ntps>
</dateTimeSetting>
<callManagerGroup>
<members>
<member priority="0">
<callManager>
<ports>
<sipPort>5060</sipPort>
<securedSipPort>5061</securedSipPort>
</ports>
<processNodeName></processNodeName>
</callManager>
</member>
</members>
</callManagerGroup>
</devicePool>
<sipProfile>
<sipProxies>
<registerWithProxy>true</registerWithProxy>
</sipProxies>
<sipCallFeatures>
<cnfJoinEnabled>true</cnfJoinEnabled>
<callForwardURI>x-cisco-serviceuri-cfwdall</callForwardURI>
<callPickupURI>x-cisco-serviceuri-pickup</callPickupURI>
<callPickupListURI>x-cisco-serviceuri-opickup</callPickupListURI>
<callPickupGroupURI>x-cisco-serviceuri-gpickup</callPickupGroupURI>
<meetMeServiceURI>x-cisco-serviceuri-meetme</meetMeServiceURI>
<abbreviatedDialURI>x-cisco-serviceuri-abbrdial</abbreviatedDialURI>
<rfc2543Hold>false</rfc2543Hold>
<callHoldRingback>1</callHoldRingback>
<localCfwdEnable>true</localCfwdEnable>
<semiAttendedTransfer>true</semiAttendedTransfer>
<anonymousCallBlock>3</anonymousCallBlock>
<callerIdBlocking>3</callerIdBlocking>
<dndControl>0</dndControl>
<remoteCcEnable>true</remoteCcEnable>
<retainForwardInformation>false</retainForwardInformation>
<uriDialingDisplayPreference>1</uriDialingDisplayPreference>
</sipCallFeatures>
<sipStack>
<sipInviteRetx>6</sipInviteRetx>
<sipRetx>10</sipRetx>
<timerInviteExpires>180</timerInviteExpires>
<timerRegisterExpires>3600</timerRegisterExpires>
<timerRegisterDelta>5</timerRegisterDelta>
<timerKeepAliveExpires>120</timerKeepAliveExpires>
<timerSubscribeExpires>120</timerSubscribeExpires>
<timerSubscribeDelta>5</timerSubscribeDelta>
<timerT1>500</timerT1>
<timerT2>4000</timerT2>
<maxRedirects>70</maxRedirects>
<remotePartyID>true</remotePartyID>
<userInfo>Phone</userInfo>
</sipStack>
<autoAnswerTimer>1</autoAnswerTimer>
<autoAnswerAltBehavior>false</autoAnswerAltBehavior>
<autoAnswerOverride>true</autoAnswerOverride>
<transferOnhookEnabled>true</transferOnhookEnabled>
<enableVad>false</enableVad>
<preferredCodec>none</preferredCodec>
<dtmfAvtPayload>101</dtmfAvtPayload>
<dtmfDbLevel>3</dtmfDbLevel>
<dtmfOutofBand>avt</dtmfOutofBand>
<alwaysUsePrimeLine>false</alwaysUsePrimeLine>
<alwaysUsePrimeLineVoiceMail>false</alwaysUsePrimeLineVoiceMail>
<kpml>0</kpml>
<phoneLabel></phoneLabel>
<stutterMsgWaiting>0</stutterMsgWaiting>
<callStats>true</callStats>
<offhookToFirstDigitTimer>15000</offhookToFirstDigitTimer>
<silentPeriodBetweenCallWaitingBursts>10</silentPeriodBetweenCallWaitingBursts>
<disableLocalSpeedDialConfig>false</disableLocalSpeedDialConfig>
<startMediaPort>16384</startMediaPort>
<stopMediaPort>32766</stopMediaPort>
<natEnabled>false</natEnabled>
<natReceivedProcessing>false</natReceivedProcessing>
<natAddress></natAddress>
<sipLines>
<line button="1" lineIndex="1">
<featureID>9</featureID>
<featureLabel></featureLabel>
<proxy>USECALLMANAGER</proxy>
<port>5060</port>
<name></name>
<displayName></displayName>
<autoAnswer>
<autoAnswerEnabled>0</autoAnswerEnabled>
</autoAnswer>
<callWaiting>3</callWaiting>
<authName></authName>
<authPassword></authPassword>
<contact></contact>
<sharedLine>false</sharedLine>
<messageWaitingLampPolicy>3</messageWaitingLampPolicy>
<messageWaitingAMWI>0</messageWaitingAMWI>
<messagesNumber></messagesNumber>
<ringSettingIdle>4</ringSettingIdle>
<ringSettingActive>5</ringSettingActive>
<forwardCallInfoDisplay>
<callerName>true</callerName>
<callerNumber>true</callerNumber>
<redirectedNumber>false</redirectedNumber>
<dialedNumber>true</dialedNumber>
</forwardCallInfoDisplay>
<maxNumCalls>5</maxNumCalls>
<busyTrigger>4</busyTrigger>
</line>
</sipLines>
<externalNumberMask></externalNumberMask>
<voipControlPort>5060</voipControlPort>
<dscpForAudio>184</dscpForAudio>
<ringSettingBusyStationPolicy>0</ringSettingBusyStationPolicy>
<dialTemplate></dialTemplate>
<softKeyFile></softKeyFile>
</sipProfile>
<MissedCallLoggingOption>1</MissedCallLoggingOption>
<featurePolicyFile></featurePolicyFile>
<commonProfile>
<phonePassword></phonePassword>
<backgroundImageAccess>true</backgroundImageAccess>
<callLogBlfEnabled>2</callLogBlfEnabled>
</commonProfile>
<vendorConfig>
<defaultWallpaperFile></defaultWallpaperFile>
<disableSpeaker>false</disableSpeaker>
<disableSpeakerAndHeadset>false</disableSpeakerAndHeadset>
<enableMuteFeature>false</enableMuteFeature>
<enableGroupListen>true</enableGroupListen>
<holdResumeKey>1</holdResumeKey>
<recentsSoftKey>1</recentsSoftKey>
<dfBit>1</dfBit>
<pcPort>0</pcPort>
<spanToPCPort>1</spanToPCPort>
<garp>0</garp>
<rtcp>1</rtcp>
<videoRtcp>1</videoRtcp>
<voiceVlanAccess>0</voiceVlanAccess>
<videoCapability>1</videoCapability>
<hideVideoByDefault>0</hideVideoByDefault>
<separateMute>0</separateMute>
<ciscoCamera>1</ciscoCamera>
<usb1>1</usb1>
<usb2>1</usb2>
<usbClasses>0,1,2</usbClasses>
<sdio>1</sdio>
<wifi>1</wifi>
<bluetooth>1</bluetooth>
<bluetoothProfile>0,1</bluetoothProfile>
<btpbap>0</btpbap>
<bthfu>0</bthfu>
<ehookEnable>0</ehookEnable>
<autoSelectLineEnable>1</autoSelectLineEnable>
<autoCallSelect>1</autoCallSelect>
<incomingCallToastTimer>10</incomingCallToastTimer>
<dialToneFromReleaseKey>0</dialToneFromReleaseKey>
<joinAndDirectTransferPolicy>0</joinAndDirectTransferPolicy>
<minimumRingVolume></minimumRingVolume>
<simplifiedNewCall>0</simplifiedNewCall>
<actionableAlert>0</actionableAlert>
<showCallHistoryForSelectedLine>0</showCallHistoryForSelectedLine>
<kemOneColumn>0</kemOneColumn>
<lineMode>0</lineMode>
<allCallsOnPrimary>0</allCallsOnPrimary>
<softKeyControl>0</softKeyControl>
<settingsAccess>1</settingsAccess>
<webProtocol>0</webProtocol>
<webAccess>0</webAccess>
<webAdmin>1</webAdmin>
<adminPassword></adminPassword>
<sshAccess>0</sshAccess>
<detectCMConnectionFailure>0</detectCMConnectionFailure>
<g722CodecSupport>1</g722CodecSupport>
<handsetWidebandEnable>2</handsetWidebandEnable>
<headsetWidebandEnable>2</headsetWidebandEnable>
<headsetWidebandUIControl>1</headsetWidebandUIControl>
<handsetWidebandUIControl>1</handsetWidebandUIControl>
<daysDisplayNotActive>1,7</daysDisplayNotActive>
<displayOnTime>08:00</displayOnTime>
<displayOnDuration>10:00</displayOnDuration>
<displayIdleTimeout>00:10</displayIdleTimeout>
<displayOnWhenIncomingCall>1</displayOnWhenIncomingCall>
<displayRefreshRate>0</displayRefreshRate>
<daysBacklightNotActive>1,7</daysBacklightNotActive>
<backlightOnTime>08:00</backlightOnTime>
<backlightOnDuration>10:00</backlightOnDuration>
<backlightIdleTimeout>00:10</backlightIdleTimeout>
<backlightOnWhenIncomingCall>1</backlightOnWhenIncomingCall>
<recordingTone>0</recordingTone>
<recordingToneLocalVolume>100</recordingToneLocalVolume>
<recordingToneRemoteVolume>50</recordingToneRemoteVolume>
<recordingToneDuration></recordingToneDuration>
<moreKeyReversionTimer>5</moreKeyReversionTimer>
<peerFirmwareSharing>0</peerFirmwareSharing>
<loadServer></loadServer>
<problemReportUploadURL></problemReportUploadURL>
<enableCdpSwPort>1</enableCdpSwPort>
<enableCdpPcPort>0</enableCdpPcPort>
<enableLldpSwPort>1</enableLldpSwPort>
<enableLldpPcPort>0</enableLldpPcPort>
<cdpEnable>true</cdpEnable>
<outOfRangeAlert>0</outOfRangeAlert>
<scanningMode>2</scanningMode>
<applicationURL></applicationURL>
<appButtonTimer>0</appButtonTimer>
<appButtonPriority>0</appButtonPriority>
<specialNumbers></specialNumbers>
<sendKeyAction>0</sendKeyAction>
<powerOffWhenCharging>0</powerOffWhenCharging>
<homeScreen>0</homeScreen>
<accessContacts>1</accessContacts>
<accessFavorites>1</accessFavorites>
<accessVoicemail>1</accessVoicemail>
<accessApps>1</accessApps>
</vendorConfig>
<versionStamp>d902ed5a-c1e5-4233-b1d6-a960d53d1c3a</versionStamp>
<loadInformation></loadInformation>
<phoneServices useHTTPS="false">
<provisioning>2</provisioning>
<phoneService type="1" category="0">
<name>Missed Calls</name>
<url>Application:Cisco/MissedCalls</url>
<vendor></vendor>
<version></version>
</phoneService>
<phoneService type="1" category="0">
<name>Received Calls</name>
<url>Application:Cisco/ReceivedCalls</url>
<vendor></vendor>
<version></version>
</phoneService>
<phoneService type="1" category="0">
<name>Placed Calls</name>
<url>Application:Cisco/PlacedCalls</url>
<vendor></vendor>
<version></version>
</phoneService>
<phoneService type="2" category="0">
<name>Voicemail</name>
<url>Application:Cisco/Voicemail</url>
<vendor></vendor>
<version></version>
</phoneService>
</phoneServices>
<userLocale>
<name></name>
<uid>1</uid>
<langCode></langCode>
<version></version>
<winCharSet>utf-8</winCharSet>
</userLocale>
<networkLocale></networkLocale>
<networkLocaleInfo>
<name></name>
<version></version>
</networkLocaleInfo>
<deviceSecurityMode>1</deviceSecurityMode>
<idleTimeout>0</idleTimeout>
<authenticationURL></authenticationURL>
<messagesURL></messagesURL>
<servicesURL></servicesURL>
<directoryURL></directoryURL>
<idleURL></idleURL>
<informationURL></informationURL>
<proxyServerURL></proxyServerURL>
<secureAuthenticationURL></secureAuthenticationURL>
<secureMessagesURL></secureMessagesURL>
<secureServicesURL></secureServicesURL>
<secureDirectoryURL></secureDirectoryURL>
<secureInformationURL></secureInformationURL>
<secureIdleURL></secureIdleURL>
<transportLayerProtocol>1</transportLayerProtocol>
<TLSResumptionTimer>3600</TLSResumptionTimer>
<phonePersonalization>1</phonePersonalization>
<autoCallPickupEnable>true</autoCallPickupEnable>
<blfAudibleAlertSettingOfIdleStation>0</blfAudibleAlertSettingOfIdleStation>
<blfAudibleAlertSettingOfBusyStation>0</blfAudibleAlertSettingOfBusyStation>
<dndCallAlert>1</dndCallAlert>
<dndReminderTimer>5</dndReminderTimer>
<advertiseG722Codec>1</advertiseG722Codec>
<rollover>0</rollover>
<joinAcrossLines>0</joinAcrossLines>
<capfAuthMode>0</capfAuthMode>
<capfList></capfList>
<certHash></certHash>
<encrConfig>false</encrConfig>
<sshUserId></sshUserId>
<sshPassword></sshPassword>
</device>

View file

@ -1,89 +0,0 @@
<?xml version="1.0"?>
<device>
<sshUserId>cisco</sshUserId>
<sshPassword>cisco</sshPassword>
<devicePool>
<dateTimeSetting>
<dateTemplate>D-M-YA</dateTemplate>
<timeZone>W. Europe Standard/Daylight Time</timeZone>
<ntps>
<ntp>
<name>x.x.x.x</name>
<ntpMode>Unicast</ntpMode>
</ntp>
</ntps>
</dateTimeSetting>
<callManagerGroup>
<members>
<member priority="0">
<callManager>
<ports>
<ethernetPhonePort>2000</ethernetPhonePort>
</ports>
<processNodeName>x.x.x.x</processNodeName>
</callManager>
</member>
</members>
</callManagerGroup>
<srstInfo>
<srstOption>Enable</srstOption>
<ipAddr1>x.x.x.x</ipAddr1>
<port1>2000</port1>
<ipAddr2/>
<port2>2000</port2>
<ipAddr3/>
<port3>2000</port3>
</srstInfo>
<connectionMonitorDuration>120</connectionMonitorDuration>
</devicePool>
<loadInformation>SCCP11.8-5-2S</loadInformation>
<vendorConfig>
<disableSpeaker>false</disableSpeaker>
<disableSpeakerAndHeadset>false</disableSpeakerAndHeadset>
<forwardingDelay>1</forwardingDelay>
<pcPort>0</pcPort>
<settingsAccess>1</settingsAccess>
<garp>0</garp>
<voiceVlanAccess>0</voiceVlanAccess>
<videoCapability>0</videoCapability>
<autoSelectLineEnable>0</autoSelectLineEnable>
<webAccess>0</webAccess>
<daysDisplayNotActive>1,7</daysDisplayNotActive>
<displayOnTime>08:30</displayOnTime>
<displayOnDuration>11:30</displayOnDuration>
<displayIdleTimeout>01:00</displayIdleTimeout>
</vendorConfig>
<userLocale>
<name>Netherlands</name>
<langCode>nl</langCode>
<version>4.0(1)</version>
<winCharSet>iso-8859-1</winCharSet>
</userLocale>
<networkLocale>Netherlands</networkLocale>
<networkLocaleInfo>
<name/>
<uid>64</uid>
<version>4.0(1)</version>
</networkLocaleInfo>
<deviceSecurityMode>0</deviceSecurityMode>
<idleTimeout>3600</idleTimeout>
<authenticationURL>http://x.x.x.x/cisco_menu/authentication.php</authenticationURL>
<idleURL>http://x.x.x.x/cisco_menu/idle.php</idleURL>
<informationURL>http://x.x.x.x/cisco_menu/help/help.php</informationURL>
<messagesURL/>
<proxyServerURL/>
<servicesURL>http://x.x.x.x/cisco_menu/menu.php</servicesURL>
<directoryURL>http://x.x.x.x/cisco_menu/directory/menu.php</directoryURL>
<dscpForSCCPPhoneConfig>104</dscpForSCCPPhoneConfig>
<dscpForSCCPPhoneServices>0</dscpForSCCPPhoneServices>
<dscpForCm2Dvce>184</dscpForCm2Dvce>
<transportLayerProtocol>4</transportLayerProtocol>
<capfAuthMode>0</capfAuthMode>
<capfList>
<capf>
<phonePort>3804</phonePort>
</capf>
</capfList>
<certHash/>
<encrConfig>false</encrConfig>
</device>

View file

@ -1,201 +0,0 @@
<softKeyCfg>
<versionStamp>0200d4f8-e302-4315-b91e-9490e0b37fc5</versionStamp>
<typeSoftKey>
<softKeyDef keyID="Undefined">
<tag>0</tag>
<eventID>0</eventID>
<helpID>0</helpID>
</softKeyDef>
<softKeyDef keyID="Redial">
<tag>1</tag>
<eventID>1</eventID>
<helpID>301</helpID>
</softKeyDef>
<softKeyDef keyID="NewCall">
<tag>2</tag>
<eventID>2</eventID>
<helpID>302</helpID>
</softKeyDef>
<softKeyDef keyID="Hold">
<tag>3</tag>
<eventID>3</eventID>
<helpID>303</helpID>
</softKeyDef>
<softKeyDef keyID="Transfer">
<tag>4</tag>
<eventID>4</eventID>
<helpID>304</helpID>
</softKeyDef>
<softKeyDef keyID="CFwdAll">
<tag>5</tag>
<eventID>5</eventID>
<helpID>305</helpID>
</softKeyDef>
<softKeyDef keyID="&lt;&lt;">
<tag>8</tag>
<eventID>8</eventID>
<helpID>308</helpID>
</softKeyDef>
<softKeyDef keyID="EndCall">
<tag>9</tag>
<eventID>9</eventID>
<helpID>309</helpID>
</softKeyDef>
<softKeyDef keyID="Resume">
<tag>10</tag>
<eventID>10</eventID>
<helpID>310</helpID>
</softKeyDef>
<softKeyDef keyID="Answer">
<tag>11</tag>
<eventID>11</eventID>
<helpID>311</helpID>
</softKeyDef>
<softKeyDef keyID="Confrn">
<tag>13</tag>
<eventID>13</eventID>
<helpID>313</helpID>
</softKeyDef>
<softKeyDef keyID="Park">
<tag>14</tag>
<eventID>14</eventID>
<helpID>314</helpID>
</softKeyDef>
<softKeyDef keyID="Join">
<tag>15</tag>
<eventID>15</eventID>
<helpID>315</helpID>
</softKeyDef>
<softKeyDef keyID="MeetMe">
<tag>16</tag>
<eventID>16</eventID>
<helpID>316</helpID>
</softKeyDef>
<softKeyDef keyID="PickUp">
<tag>17</tag>
<eventID>17</eventID>
<helpID>317</helpID>
</softKeyDef>
<softKeyDef keyID="GPickUp">
<tag>18</tag>
<eventID>18</eventID>
<helpID>318</helpID>
</softKeyDef>
<softKeyDef keyID="RmLstC">
<tag>57</tag>
<eventID>19</eventID>
<helpID>319</helpID>
</softKeyDef>
<softKeyDef keyID="DND">
<tag>63</tag>
<eventID>69</eventID>
<helpID>369</helpID>
</softKeyDef>
<softKeyDef keyID="CallBack">
<tag>65</tag>
<eventID>20</eventID>
<helpID>320</helpID>
</softKeyDef>
<softKeyDef keyID="QRT">
<tag>75</tag>
<eventID>22</eventID>
<helpID>322</helpID>
</softKeyDef>
<softKeyDef keyID="MCID">
<tag>76</tag>
<eventID>27</eventID>
<helpID>327</helpID>
</softKeyDef>
<softKeyDef keyID="Select">
<tag>78</tag>
<eventID>29</eventID>
<helpID>329</helpID>
</softKeyDef>
<softKeyDef keyID="ConfList">
<tag>79</tag>
<eventID>30</eventID>
<helpID>330</helpID>
</softKeyDef>
<softKeyDef keyID="iDivert">
<tag>80</tag>
<eventID>31</eventID>
<helpID>331</helpID>
</softKeyDef>
<softKeyDef keyID="OPickUp">
<tag>91</tag>
<eventID>34</eventID>
<helpID>334</helpID>
</softKeyDef>
<softKeyDef keyID="HLog">
<tag>92</tag>
<eventID>35</eventID>
<helpID>335</helpID>
</softKeyDef>
<softKeyDef keyID="AbbrDial">
<tag>7740</tag>
<eventID>71</eventID>
<helpID>371</helpID>
</softKeyDef>
<softKeyDef keyID="Record">
<tag>7747</tag>
<eventID>74</eventID>
<helpID>374</helpID>
</softKeyDef>
</typeSoftKey>
<softKeySets>
<softKeySet id="On Hook">
<softKey keyID="Redial" />
<softKey keyID="NewCall" />
<softKey keyID="DND" />
<softKey keyID="CFwdAll" />
</softKeySet>
<softKeySet id="Off Hook">
<softKey keyID="Redial" />
<softKey keyID="EndCall" />
<softKey keyID="PickUp" />
</softKeySet>
<softKeySet id="Off Hook With Feature">
<softKey keyID="Redial" />
<softKey keyID="EndCall" />
</softKeySet>
<softKeySet id="Digits After First">
<softKey keyID="&lt;&lt;" />
<softKey keyID="EndCall" />
</softKeySet>
<softKeySet id="Ring Out">
<softKey keyID="Undefined" />
<softKey keyID="EndCall" />
</softKeySet>
<softKeySet id="Connected">
<softKey keyID="Hold" />
<softKey keyID="EndCall" />
<softKey keyID="Transfer" />
<softKey keyID="Confrn" />
<softKey keyID="ConfList" />
<softKey keyID="Park" />
</softKeySet>
<softKeySet id="Connected No Feature">
<softKey keyID="Undefined" />
<softKey keyID="EndCall" />
</softKeySet>
<softKeySet id="Connected Transfer">
<softKey keyID="Undefined" />
<softKey keyID="EndCall" />
<softKey keyID="Transfer" />
</softKeySet>
<softKeySet id="Connected Conference">
<softKey keyID="Undefined" />
<softKey keyID="EndCall" />
<softKey keyID="Confrn" />
<softKey keyID="ConfList" />
</softKeySet>
<softKeySet id="On Hold">
<softKey keyID="Resume" />
<softKey keyID="NewCall" />
</softKeySet>
<softKeySet id="Ring In">
<softKey keyID="Answer" />
<softKey keyID="iDivert" />
</softKeySet>
</softKeySets>
</softKeyCfg>

View file

@ -1,142 +0,0 @@
<typeSoftKey>
<softKeyDef keyID="Undefined">
<tag>0</tag>
<eventID>0</eventID>
<helpID>0</helpID>
</softKeyDef>
<softKeyDef keyID="Redial">
<tag>1</tag>
<eventID>1</eventID>
<helpID>301</helpID>
</softKeyDef>
<softKeyDef keyID="NewCall">
<tag>2</tag>
<eventID>2</eventID>
<helpID>302</helpID>
</softKeyDef>
<softKeyDef keyID="Hold">
<tag>3</tag>
<eventID>3</eventID>
<helpID>303</helpID>
</softKeyDef>
<softKeyDef keyID="Transfer">
<tag>4</tag>
<eventID>4</eventID>
<helpID>304</helpID>
</softKeyDef>
<softKeyDef keyID="CFwdAll">
<tag>5</tag>
<eventID>5</eventID>
<helpID>305</helpID>
</softKeyDef>
<softKeyDef keyID="&lt;&lt;">
<tag>8</tag>
<eventID>8</eventID>
<helpID>308</helpID>
</softKeyDef>
<softKeyDef keyID="EndCall">
<tag>9</tag>
<eventID>9</eventID>
<helpID>309</helpID>
</softKeyDef>
<softKeyDef keyID="Resume">
<tag>10</tag>
<eventID>10</eventID>
<helpID>310</helpID>
</softKeyDef>
<softKeyDef keyID="Answer">
<tag>11</tag>
<eventID>11</eventID>
<helpID>311</helpID>
</softKeyDef>
<softKeyDef keyID="Confrn">
<tag>13</tag>
<eventID>13</eventID>
<helpID>313</helpID>
</softKeyDef>
<softKeyDef keyID="Park">
<tag>14</tag>
<eventID>14</eventID>
<helpID>314</helpID>
</softKeyDef>
<softKeyDef keyID="Join">
<tag>15</tag>
<eventID>15</eventID>
<helpID>315</helpID>
</softKeyDef>
<softKeyDef keyID="MeetMe">
<tag>16</tag>
<eventID>16</eventID>
<helpID>316</helpID>
</softKeyDef>
<softKeyDef keyID="PickUp">
<tag>17</tag>
<eventID>17</eventID>
<helpID>317</helpID>
</softKeyDef>
<softKeyDef keyID="GPickUp">
<tag>18</tag>
<eventID>18</eventID>
<helpID>318</helpID>
</softKeyDef>
<softKeyDef keyID="RmLstC">
<tag>57</tag>
<eventID>19</eventID>
<helpID>319</helpID>
</softKeyDef>
<softKeyDef keyID="DND">
<tag>63</tag>
<eventID>69</eventID>
<helpID>369</helpID>
</softKeyDef>
<softKeyDef keyID="CallBack">
<tag>65</tag>
<eventID>20</eventID>
<helpID>320</helpID>
</softKeyDef>
<softKeyDef keyID="QRT">
<tag>75</tag>
<eventID>22</eventID>
<helpID>322</helpID>
</softKeyDef>
<softKeyDef keyID="MCID">
<tag>76</tag>
<eventID>27</eventID>
<helpID>327</helpID>
</softKeyDef>
<softKeyDef keyID="Select">
<tag>78</tag>
<eventID>29</eventID>
<helpID>329</helpID>
</softKeyDef>
<softKeyDef keyID="ConfList">
<tag>79</tag>
<eventID>30</eventID>
<helpID>330</helpID>
</softKeyDef>
<softKeyDef keyID="iDivert">
<tag>80</tag>
<eventID>31</eventID>
<helpID>331</helpID>
</softKeyDef>
<softKeyDef keyID="OPickUp">
<tag>91</tag>
<eventID>34</eventID>
<helpID>334</helpID>
</softKeyDef>
<softKeyDef keyID="HLog">
<tag>92</tag>
<eventID>35</eventID>
<helpID>335</helpID>
</softKeyDef>
<softKeyDef keyID="AbbrDial">
<tag>7740</tag>
<eventID>71</eventID>
<helpID>371</helpID>
</softKeyDef>
<softKeyDef keyID="Record">
<tag>7747</tag>
<eventID>74</eventID>
<helpID>374</helpID>
</softKeyDef>
</typeSoftKey>

View file

@ -1,24 +0,0 @@
<?xml version="1.0"?>
<Default>
<callManagerGroup>
<members>
<member priority="0">
<callManager>
<ports>
<ethernetPhonePort>2000</ethernetPhonePort>
</ports>
<processNodeName>10.0.0.3</processNodeName>
</callManager>
</member>
</members>
</callManagerGroup>
<authenticationURL>http://10.0.0.3/authentication.php</authenticationURL>
<idleURL>http://10.0.0.3/idle.php</idleURL>
<informationURL>http://10.0.0.3/help/help.php</informationURL>
<messagesURL></messagesURL>
<proxyServerURL></proxyServerURL>
<servicesURL>http://10.0.0.3/menu.php</servicesURL>
<directoryURL>http://10.0.0.3/directory.php</directoryURL>
</Default>

View file

@ -1,8 +0,0 @@
<dialTemplate>
<versionStamp>e68d54c1-0354-4b1a-aca4-adffc4b7de2f</versionStamp>
<TEMPLATE match="3.." timeout="1" />
<TEMPLATE match="..." timeout="2" />
<TEMPLATE match="......." timeout="2" />
<TEMPLATE match="0........" timeout="2" />
<TEMPLATE match="*" timeout="3" />
</dialTemplate>

View file

@ -1,9 +0,0 @@
#
# TFTPd Mapping Rules for SCCP_Manager Provision
#
# This file is maintained by Sccp_Manager, and will be overwritten by the installer
# a copy of the original can be found at sccpManagerRewrite.rules.bu
# For any changes to this file to be effective, the tftp server will have to be restarted.
#
# The rules below are provided by dkgroot/provision project https://github.com/dkgroot/provision_sccp
#

View file

@ -1,43 +0,0 @@
;=========================================================================================
;
; general definitions
;
;=========================================================================================
[general]
servername=VPBXSCCP
keepalive=60
debug=1
context=from-internal-xfer
bindaddr=0.0.0.0
port=2000
deny=0.0.0.0/0.0.0.0
permit=0.0.0.0/0.0.0.0
dateformat=D.M.Y
disallow=all
allow=alaw
allow=ulaw
firstdigittimeout=16
digittimeout=8
autoanswer_ring_time=1
autoanswer_tone=0x32
remotehangup_tone=0x32
transfer_tone=0
callwaiting_tone=0x2d
musicclass=default
language=en
echocancel=on
silencesuppression=off
private=on
directed_pickup_modeanswer=on
callanswerorder=oldestfirst
sccp_tos=0x68
sccp_cos=4
audio_tos=0xB8
audio_cos=6
video_tos=0x88
video_cos=5
hotline_enabled=yes
hotline_context=default
hotline_extension=111
devicetable=sccpdevice
linetable=sccpline

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,223 +0,0 @@
#
# TFTPd Rewrite for SCCP_Manager Custom remaping
# /firmware
# /settings
# /wallpapers
# /ringtones
# /locales
#
# 6901 firmware (java-based)
ri ^(APP6901SCCP)(.+\.sgn)$ firmware/6901/\1\2
ri ^(KNL6901SCCP)(.+\.sgn)$ firmware/6901/\1\2
ri ^(SCCP6901)(.+\.loads)$ firmware/6901/\1\2
# 6911 firmware (java-based)
ri ^(APP6911SCCP)(.+\.sgn)$ firmware/6911/\1\2
ri ^(BFS6911SCCP)(.+\.sgn)$ firmware/6911/\1\2
ri ^(KNL6911SCCP)(.+\.sgn)$ firmware/6911/\1\2
ri ^(SCCP6911)(.+\.loads)$ firmware/6911/\1\2
# 6921 firmware (java-based)
ri ^(BOOT69xx)(.+\.sgn)$ firmware/6921/\1\2
ri ^(DSP69xx)(.+\.sgn)$ firmware/6921/\1\2
ri ^(SCCP69xx)(.+\.loads)$ firmware/6921/\1\2
ri ^(SCCP69xx)(.+\.sgn)$ firmware/6921/\1\2
# 6945 firmware (java-based)
ri ^(SCCP6945)(.+\.sgn)$ firmware/6945/\1\2
ri ^(SCCP6945)(.+\.loads)$ firmware/6945/\1\2
# 69xx firmware (java-based)
ri ^(BOOT69xx)(.+\.sgn)$ firmware/69xx/\1\2
ri ^(DSP69xx)(.+\.sgn)$ firmware/69xx/\1\2
ri ^(SCCP69xx)(.+\.loads)$ firmware/69xx/\1\2
ri ^(SCCP69xx)(.+\.sgn)$ firmware/69xx/\1\2
# 7902 firmware (ancient)
ri ^(CP7902080002SCCP060817A.sbin)$ firmware/7902/\1
# 7905 firmware (ancient)
ri ^(CP7905080003SCCP070409A.sbin)$ firmware/7905/\1
ri ^(CP7905080003SCCP070409A.zup)$ firmware/7905/\1
# 7906_7911 firmware (java-based)
ri ^(apps11)(.+\.sbn)$ firmware/7906/\1\2
ri ^(cnu11)(.+\.sbn)$ firmware/7906/\1\2
ri ^(cvm11sccp)(.+\.sbn)$ firmware/7906/\1\2
ri ^(dsp11)(.+\.sbn)$ firmware/7906/\1\2
ri ^(jar11sccp)(.+\.sbn)$ firmware/7906/\1\2
ri ^(SCCP11)(.+\.loads)$ firmware/7906/\1\2
ri ^(term06)(.+\.loads)$ firmware/7906/\1\2
ri ^(term11)(.+\.loads)$ firmware/7906/\1\2
# 7910 firmware (ancient)
ri ^(P00405000700.bin)$ firmware/7910/\1
ri ^(P00405000700.sbn)$ firmware/7910/\1
# 7912 firmware (ancient)
ri ^(CP7912080004SCCP080108A.sbin)$ firmware/7912/\1
# 7915 firmware (ancient)
ri ^(B015-1-0-)(.+\.SBN)$ firmware/7915/\1\2
# 7916 firmware (ancient)
ri ^(B016-1-0-)(.+\.SBN)$ firmware/7916/\1\2
# 7920 firmware (ancient)
ri ^(cmterm_7920)(.+\.bin)$ firmware/7920/\1\2
# 7921_7925 firmware (ancient)
ri ^(APPS-1.4.3.4.SBN)$ firmware/7921/\1
ri ^(CP7921G-1.4.3.4.LOADS)$ firmware/7921/\1
ri ^(GUI-1.4.3.4.SBN)$ firmware/7921/\1
ri ^(SYS-1.4.3.4.SBN)$ firmware/7921/\1
ri ^(TNUX-1.4.3.4.SBN)$ firmware/7921/\1
ri ^(TNUXR-1.4.3.4.SBN)$ firmware/7921/\1
ri ^(WLAN-1.4.3.4.SBN)$ firmware/7921/\1
# 7926 firmware (ancient)
ri ^(APPSS-1.4.1SR1.SBN)$ firmware/7926/\1
ri ^(CP7926G-1.4.1SR1.LOADS)$ firmware/7926/\1
ri ^(EA15FW-BF3-220.SBN)$ firmware/7926/\1
ri ^(GUIS-1.4.1SR1.SBN)$ firmware/7926/\1
ri ^(JSYSS-1.4.1SR1.SBN)$ firmware/7926/\1
ri ^(JUIS-1.4.1SR1.SBN)$ firmware/7926/\1
ri ^(SYSS-1.4.1SR1.SBN)$ firmware/7926/\1
ri ^(TNUXRS-1.4.1SR1.SBN)$ firmware/7926/\1
ri ^(TNUXS-1.4.1SR1.SBN)$ firmware/7926/\1
ri ^(WLANS-1.4.1SR1.SBN)$ firmware/7926/\1
# 7931 firmware (java-based)
ri ^(apps31)(.+\.sbn)$ firmware/7931/\1\2
ri ^(cnu31)(.+\.sbn)$ firmware/7931/\1\2
ri ^(cvm31sccp)(.+\.sbn)$ firmware/7931/\1\2
ri ^(dsp31)(.+\.sbn)$ firmware/7931/\1\2
ri ^(jar31sccp)(.+\.sbn)$ firmware/7931/\1\2
ri ^(SCCP31)(.+\.loads)$ firmware/7931/\1\2
ri ^(term31)(.+\.loads)$ firmware/7931/\1\2
# 7935 firmware (ancient)
ri ^(P00503021900.bin)$ firmware/7935/\1
# 7936 firmware (ancient)
ri ^(cmterm_7936.3-3-21-0.bin)$ firmware/7936/\1
# 7937 firmware (ancient)
ri ^(apps37sccp.1-4-5-7.bin)$ firmware/7937/\1
# 7940_7960 firmware (ancient)
ri ^(P0030801SR)(.+\.bin)$ firmware/7940/\1\2
ri ^(P0030801SR)(.+\.loads)$ firmware/7940/\1\2
ri ^(P0030801SR)(.+\.sb2)$ firmware/7940/\1\2
ri ^(P0030801SR)(.+\.sbn)$ firmware/7940/\1\2
# 7941_7961 firmware (java-based)
ri ^(apps41)(.+\.sbn)$ firmware/7941/\1\2
ri ^(cnu41)(.+\.sbn)$ firmware/7941/\1\2
ri ^(cvm41sccp)(.+\.sbn)$ firmware/7941/\1\2
ri ^(dsp41)(.+\.sbn)$ firmware/7941/\1\2
ri ^(jar41sccp)(.+\.sbn)$ firmware/7941/\1\2
ri ^(SCCP41)(.+\.loads)$ firmware/7941/\1\2
ri ^(term41)(.+\.loads)$ firmware/7941/\1\2
ri ^(term61)(.+\.loads)$ firmware/7941/\1\2
# 7942_7962 firmware (java-based)
ri ^(apps42)(.+\.sbn)$ firmware/7942/\1\2
ri ^(cnu42)(.+\.sbn)$ firmware/7942/\1\2
ri ^(cvm42sccp)(.+\.sbn)$ firmware/7942/\1\2
ri ^(dsp42)(.+\.sbn)$ firmware/7942/\1\2
ri ^(jar42sccp)(.+\.sbn)$ firmware/7942/\1\2
ri ^(SCCP42)(.+\.loads)$ firmware/7942/\1\2
ri ^(term42)(.+\.loads)$ firmware/7942/\1\2
ri ^(term62)(.+\.loads)$ firmware/7942/\1\2
# 7945_7965 firmware (java-based)
ri ^(apps45)(.+\.sbn)$ firmware/7945/\1\2
ri ^(cnu45)(.+\.sbn)$ firmware/7945/\1\2
ri ^(cvm45sccp)(.+\.sbn)$ firmware/7945/\1\2
ri ^(dsp45)(.+\.sbn)$ firmware/7945/\1\2
ri ^(jar45sccp)(.+\.sbn)$ firmware/7945/\1\2
ri ^(SCCP45)(.+\.loads)$ firmware/7945/\1\2
ri ^(term45)(.+\.loads)$ firmware/7945/\1\2
ri ^(term65)(.+\.loads)$ firmware/7945/\1\2
# 7970_7971 firmware (java-based)
ri ^(apps70)(.+\.sbn)$ firmware/7970/\1\2
ri ^(cnu70)(.+\.sbn)$ firmware/7970/\1\2
ri ^(cvm70sccp)(.+\.sbn)$ firmware/7970/\1\2
ri ^(dsp70)(.+\.sbn)$ firmware/7970/\1\2
ri ^(jar70sccp)(.+\.sbn)$ firmware/7970/\1\2
ri ^(SCCP70)(.+\.loads)$ firmware/7970/\1\2
ri ^(term70)(.+\.loads)$ firmware/7970/\1\2
ri ^(term71)(.+\.loads)$ firmware/7970/\1\2
# 7975 firmware (java-based)
ri ^(apps75)(.+\.sbn)$ firmware/7975/\1\2
ri ^(cnu75)(.+\.sbn)$ firmware/7975/\1\2
ri ^(cvm75sccp)(.+\.sbn)$ firmware/7975/\1\2
ri ^(dsp75)(.+\.sbn)$ firmware/7975/\1\2
ri ^(jar75sccp)(.+\.sbn)$ firmware/7975/\1\2
ri ^(SCCP75)(.+\.loads)$ firmware/7975/\1\2
ri ^(term75)(.+\.loads)$ firmware/7975/\1\2
# 7985 firmware (ancient)
ri ^(cmterm_7985.4-1-7-0.bin)$ firmware/7985/\1
# 894x firmware (java-based)
ri ^(BOOT894x)(.+\.sgn)$ firmware/894x/\1\2
ri ^(SCCP894x)(.+\.sgn)$ firmware/894x/\1\2
ri ^(SCCP894x)(.+\.loads)$ firmware/894x/\1\2
# ata186/ata188 firmware (ancient)
ri ^(ATA030204SCCP090202A.zup)$ firmware/ata186/\1
# Sub-Directory Handling
# settings
ri ^(.+\.tlv)?$ settings/\1
ri ^\/(.+\.tlv)?$ settings/\1
ri ^((.+\.cnf.xml)(\.enc)?(\.sgn)?)$ settings/\1
ri ^\/((.+\-cnf.xml)(\.enc)?(\.sgn)?)$ settings/\1
ri ^\/((SPA504G-cfg.xml)(\.enc)?(\.sgn)?)$ settings/\1
# Keep firmware in a separate directory (optional)
#ri ^(.+\.loads)$ firmware/\1
#ri ^(.+\.sbn)$ firmware/\1
ri ^(.+)\/(.+-sccp.jar)$ locales/languages/\1/\2
ri ^(.+)\/(.+-sip.jar)$ locales/languages/\1/\2
ri ^(.+)\/(.+-dictionary.xml)$ locales/languages/\1/\2
ri ^(.+)\/(.+-dictionary-ext.xml)$ locales/languages/\1/\2
#ri ^(.+)\/(.+-tones.xml)$ locales/languages/\1/\2
ri ^(.+)\/(.+-font.xml)$ locales/languages/\1/\2
ri ^(.+)\/(.+-kate.xml)$ locales/languages/\1/\2
ri ^(.+)\/(gk.+)(\.cfg)$ locales/languages/\1/\2\3
ri ^(.+)\/(.+-tones.xml)$ locales/countries/\1/\2
# Keep ring-tones in a separate directory (optional)
ri ^([R|r]ing[L|l]ist)(\.xml|-wb\.xml)(\.sgn)?$ ringtones/ringlist.xml
ri ^(Distinctive[R|r]ing[L|l]ist)(\.xml|-wb\.xml)(\.sgn)?$ ringtones/ringlist.xml
ri ^(.+)(\.raw|\.rwb|\.pcm)(\.sgn)?$ ringtones/\1\2\3
# Rename Desktops to wallpapers (optional)
#ri ^Desktops/(.+)/(List\.xml)(\.sgn)?$ wallpapers/\1/\2\3
#ri ^Desktops/(.+)/(.+\.png)(\.sgn)?$ wallpapers/\1/\2\3
# Dialplan
ri ^(dialplan.xml)$ dialplan/\1
ri ^authorized_keys$ settings/authorized_keys
#
# Generic Rules
#
ri ^[a-z]: # Remove "drive letters"
rg \\ / # Convert backslashes to slashes
rg \# @ # Convert hash marks to @ signs
rg /../ /..no../ # Convert /../ to /..no../
# e ^ok/ # These are always ok
# r ^[^/] /tftpboot/\0 # Convert non-absolute files
# a \.pvt$ # Reject requests for private files

View file

@ -1,18 +0,0 @@
# default: off
# description: The tftp server serves files using the trivial file transfer \
# protocol. The tftp protocol is often used to boot diskless \
# workstations, download configuration files to network-aware printers, \
# and to start the installation process for some operating systems.
service tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -c -s -v /tftpboot -m -m /etc/asterisk/sccpManagerRewrite.rules
disable = no
per_source = 11
cps = 100 2
flags = IPv4
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

37
index.md Normal file
View file

@ -0,0 +1,37 @@
## Welcome to GitHub Pages
You can use the [editor on GitHub](https://github.com/chan-sccp/sccp_manager/edit/gh-pages/index.md) to maintain and preview the content for your website in Markdown files.
Whenever you commit to this repository, GitHub Pages will run [Jekyll](https://jekyllrb.com/) to rebuild the pages in your site, from the content in your Markdown files.
### Markdown
Markdown is a lightweight and easy-to-use syntax for styling your writing. It includes conventions for
```markdown
Syntax highlighted code block
# Header 1
## Header 2
### Header 3
- Bulleted
- List
1. Numbered
2. List
**Bold** and _Italic_ and `Code` text
[Link](url) and ![Image](src)
```
For more details see [GitHub Flavored Markdown](https://guides.github.com/features/mastering-markdown/).
### Jekyll Themes
Your Pages site will use the layout and styles from the Jekyll theme you have selected in your [repository settings](https://github.com/chan-sccp/sccp_manager/settings/pages). The name of this theme is saved in the Jekyll `_config.yml` configuration file.
### Support or Contact
Having trouble with Pages? Check out our [documentation](https://docs.github.com/categories/github-pages-basics/) or [contact support](https://support.github.com/contact) and well help you sort it out.

File diff suppressed because it is too large Load diff

View file

@ -1,279 +0,0 @@
<module>
<rawname>sccp_manager</rawname>
<name>SCCP Manager</name>
<version>14.5.0.4</version>
<type>setup</type>
<category>SCCP Connectivity</category>
<publisher>Steve Lad, Alex GP</publisher>
<repo>extended</repo>
<description>SCCP Phone and Extension Manager</description>
<menuitems>
<sccpsettings sort="1">Server Config</sccpsettings>
<sccp_adv sort="2">System Parameters</sccp_adv>
<sccp_phone sort="3">Phones Manager</sccp_phone>
</menuitems>
<changelog>
* Version 13.0.0.1 * - Alfa Release tested on freepbx v.13.0.192.16, v.14.0.1.5
* Version 13.0.0.2 * - Release tested
* Version 14.0.0.1 * - Alfa Release new DB structure Add User mobility
* Version 14.1.0.1 * - Migrated to chan-sccp repo
* Version 14.2.0.1 * - Retired old interface - min chan-sccp v433
* Version 14.2.0.2 * - Fix module database definition
* Version 14.2.0.5 * - Replace Modals with fpbxToast
* Version 14.2.0.8 * - Fix uninstaller and create backup
* Version 14.2.0.9 * - Bug Fix - incorrect response class for Reset Token Device
* Version 14.2.0.10 * - Bug Fix - line not assigned on device creation
* Version 14.3.0.0 * - New Minor Version - Change DB and add new settings
* Version 14.3.0.15 * - Get masterFilesList from provisoner via installer Fix Issue 39
* Version 14.3.0.16 * - Test version for freepbx upgrader.
* Version 14.3.0.17 * - Test version for freepbx upgrader.
* Version 14.3.0.18 * - Fix Issue 42
* Version 14.3.0.22 * - Fix Issue 50
* Version 14.3.0.23 * - Fix Issue 49
* Version 14.3.0.25 * - Fix Issue 55
* Version 14.3.0.26 * - Fix Issue 54
* Version 14.3.0.27 * - Standardise treatment of SIP and SCCP hardware.
* Version 14.3.0.28 * - Fix issue with RNav which caused exception with new device
* Version 14.3.0.29 * - Fix issue reloading page after saving settings and not restarting devices.
* Version 14.3.0.30 * - Fix reversion in 29. Not returning to correct page when saving device.
* Version 14.3.0.31 * - Fix rewrite rules.
* Version 14.4.0.1 * - Modify installer to avoid data loss on existing 14.3 fields. Bump Minor version to reflect this.
* Version 14.4.0.2 * - Revert error in Installer db calls - IF EXISTS is not valid in MariaDb v5 (package DB)
* Version 14.4.0.3 * - Change method of selecting phonecodepage depending on if is java phone.
* Version 14.4.0.5 * - Fix issue #59.
* Version 14.5.0.2 * - Fix issue #32.
* Version 14.5.0.4 * - Fix issue where values with spaces are truncated. Preserve softkeys accross installs
</changelog>
<location>https://github.com/chan-sccp/sccp_manager</location>
<depends>
<version>15</version>
<phpversion>7.0</phpversion>
<phpcomponent>zip</phpcomponent>
</depends>
<supported>
<version>13.0.0.2M</version>
</supported>
<info>https://github.com/chan-sccp/sccp_manager</info>
<updateurl>https://raw.githubusercontent.com/chan-sccp/sccp_manager/develop/sccpManagerUpdater.json</updateurl>
<license>GPL</license>
<md5sum></md5sum>
<database>
<table name="sccpdevice">
<field name="name" type="string" length="15" primarykey="true"/>
<field name="type" type="string" length="15" notnull="false"/>
<field name="addon" type="string" length="45" notnull="false"/>
<field name="description" type="string" length="45" notnull="false"/>
<field name="_description" type="string" length="45" notnull="false"/>
<field name="tzoffset" type="string" length="5" notnull="false"/>
<field name="imageversion" type="string" length="31" notnull="false"/>
<field name="deny" type="string" length="100" default="0.0.0.0/0.0.0.0" notnull="false"/>
<field name="permit" type="string" length="100" default="internal" notnull="false"/>
<field name="earlyrtp" type="string" notnull="false"/>
<field name="mwilamp" type="string" default="on" notnull="false"/>
<field name="mwioncall" type="string" default="on" notnull="false"/>
<field name="dndFeature" type="string" notnull="false"/>
<field name="transfer" type="string" notnull="false"/>
<field name="cfwdall" type="string" default="on" notnull="false"/>
<field name="cfwdbusy" type="string" default="on" notnull="false"/>
<field name="private" type="string" default="off"/>
<field name="privacy" type="string" default="full"/>
<field name="nat" type="string" notnull="false"/>
<field name="directrtp" type="string" notnull="false"/>
<field name="softkeyset" type="string" length="100" default="softkeyset" notnull="false"/>
<field name="audio_tos" type="string" length="11" default="0xB8" notnull="false"/>
<field name="audio_cos" type="string" length="1" default="6" notnull="false"/>
<field name="video_tos" type="string" length="11" default="0x88" notnull="false"/>
<field name="video_cos" type="string" length="1" default="5" notnull="false"/>
<field name="conf_allow" type="string" default="on"/>
<field name="conf_play_general_announce" type="string" length="3" default="on" notnull="false"/>
<field name="conf_play_part_announce" type="string" default="on"/>
<field name="conf_mute_on_entry" type="string" default="off"/>
<field name="conf_music_on_hold_class" type="string" length="80" default="default" notnull="false"/>
<field name="conf_show_conflist" type="string" default="on"/>
<field name="force_dtmfmode" type="string" default="auto"/>
<field name="setvar" type="string" length="100" notnull="false"/>
<field name="backgroundImage" type="string" length="255" notnull="false"/>
<field name="backgroundThumbnail" type="string" length="255" notnull="false"/>
<field name="ringtone" type="string" length="255" notnull="false"/>
<field name="callhistory_answered_elsewhere" type="string" notnull="false"/>
<field name="loginname" type="string" length="20" default="NULL" notnull="false"/>
<field name="_loginname" type="string" length="20" notnull="false"/>
<field name="profileid" type="integer" default="0"/>
<field name="_profileid" type="integer" notnull="false"/>
<field name="dialrules" type="string" length="255" default="NULL" notnull="false"/>
<field name="_dialrules" type="string" length="255" notnull="false"/>
<field name="useRedialMenu" type="string" length="5" default="no" notnull="false"/>
<field name="cfwdnoanswer" type="string" default="on" notnull="false"/>
<field name="park" type="string" default="on" notnull="false"/>
<field name="monitor" type="string" notnull="false"/>
<field name="transfer_on_hangup" type="string" notnull="false"/>
<field name="phonecodepage" type="string" length="50" notnull="false"/>
<field name="logserver" type="string" length="100" default="NULL" notnull="false"/>
<field name="_logserver" type="string" length="100" notnull="false"/>
<field name="daysdisplaynotactive" type="string" length="20" default="NULL" notnull="false"/>
<field name="_daysdisplaynotactive" type="string" length="20" notnull="false"/>
<field name="displayontime" type="string" length="20" default="NULL" notnull="false"/>
<field name="_displayontime" type="string" length="20" notnull="false"/>
<field name="displayonduration" type="string" length="20" default="NULL" notnull="false"/>
<field name="_displayonduration" type="string" length="20" notnull="false"/>
<field name="displayidletimeout" type="string" length="20" default="NULL" notnull="false"/>
<field name="_displayidletimeout" type="string" length="20" notnull="false"/>
<field name="settingsaccess" type="string" default="off"/>
<field name="_settingsaccess" type="string" notnull="false"/>
<field name="videocapability" type="string" default="off"/>
<field name="_videocapability" type="string" notnull="false"/>
<field name="webaccess" type="string" default="off"/>
<field name="_webaccess" type="string" notnull="false"/>
<field name="webadmin" type="string" default="off"/>
<field name="_webadmin" type="string" notnull="false"/>
<field name="pcport" type="string" default="on"/>
<field name="_pcport" type="string" notnull="false"/>
<field name="spantopcport" type="string" default="on"/>
<field name="_spantopcport" type="string" notnull="false"/>
<field name="voicevlanaccess" type="string" default="off"/>
<field name="_voicevlanaccess" type="string" notnull="false"/>
<field name="enablecdpswport" type="string" default="off"/>
<field name="_enablecdpswport" type="string" notnull="false"/>
<field name="enablecdppcport" type="string" default="off"/>
<field name="_enablecdppcport" type="string" notnull="false"/>
<field name="enablelldpswport" type="string" default="off"/>
<field name="_enablelldpswport" type="string" notnull="false"/>
<field name="enablelldppcport" type="string" default="off"/>
<field name="_enablelldppcport" type="string" notnull="false"/>
<field name="firstdigittimeout" type="string" length="20" default="NULL" notnull="false"/>
<field name="_firstdigittimeout" type="string" length="20" notnull="false"/>
<field name="digittimeout" type="string" length="20" default="NULL" notnull="false"/>
<field name="_digittimeout" type="string" length="20" notnull="false"/>
<field name="cfwdnoanswer_timeout" type="string" length="20" default="NULL" notnull="false"/>
<field name="_cfwdnoanswer_timeout" type="string" length="20" notnull="false"/>
<field name="autoanswer_ring_time" type="string" length="20" default="NULL" notnull="false"/>
<field name="_autoanswer_ring_time" type="string" length="20" notnull="false"/>
<field name="autoanswer_tone" type="string" length="20" default="NULL" notnull="false"/>
<field name="_autoanswer_tone" type="string" length="20" notnull="false"/>
<field name="remotehangup_tone" type="string" length="20" default="NULL" notnull="false"/>
<field name="_remotehangup_tone" type="string" length="20" notnull="false"/>
<field name="transfer_tone" type="string" length="20" default="NULL" notnull="false"/>
<field name="_transfer_tone" type="string" length="20" notnull="false"/>
<field name="callwaiting_tone" type="string" length="20" default="NULL" notnull="false"/>
<field name="_callwaiting_tone" type="string" length="20" notnull="false"/>
<field name="callanswerorder" type="string" default="latestfirst"/>
<field name="_callanswerorder" type="string" notnull="false"/>
<field name="sccp_tos" type="string" length="11" default="0x68"/>
<field name="_sccp_tos" type="string" length="11" notnull="false"/>
<field name="sccp_cos" type="string" length="11" default="0x4"/>
<field name="_sccp_cos" type="string" length="11" notnull="false"/>
<field name="dev_sshPassword" type="string" length="25" default="cisco"/>
<field name="_dev_sshPassword" type="string" length="25" notnull="false"/>
<field name="dev_sshUserId" type="string" length="25" default="cisco"/>
<field name="_dev_sshUserId" type="string" length="25" notnull="false"/>
<field name="phonepersonalization" type="string" length="25" default="0"/>
<field name="_phonepersonalization" type="string" length="25" notnull="false"/>
<field name="devlang" type="string" length="50" default="NULL" notnull="false"/>
<field name="_devlang" type="string" length="50" notnull="false"/>
<field name="netlang" type="string" length="50" default="NULL" notnull="false"/>
<field name="_netlang" type="string" length="50" notnull="false"/>
<field name="keepalive" type="integer" default="60" notnull="false"/>
</table>
<table name="sccpline">
<field name="id" type="integer" autoincrement="true"/>
<field name="pin" type="string" length="7" notnull="false"/>
<field name="label" type="string" length="45" notnull="false"/>
<field name="description" type="string" length="45" notnull="false"/>
<field name="context" type="string" length="45" notnull="false"/>
<field name="incominglimit" type="integer" default="6" notnull="false"/>
<field name="transfer" type="string" notnull="false"/>
<field name="mailbox" type="string" length="45" notnull="false"/>
<field name="vmnum" type="string" length="45" default="*97" notnull="false"/>
<field name="cid_name" type="string" length="45" notnull="false"/>
<field name="cid_num" type="string" length="45" notnull="false"/>
<field name="disallow" type="string" length="255" notnull="false"/>
<field name="allow" type="string" length="255" notnull="false"/>
<field name="trnsfvm" type="string" length="45" notnull="false"/>
<field name="secondary_dialtone_digits" type="string" length="45" notnull="false"/>
<field name="secondary_dialtone_tone" type="string" length="45" notnull="false"/>
<field name="musicclass" type="string" length="45" default="default" notnull="false"/>
<field name="language" type="string" length="45" notnull="false"/>
<field name="accountcode" type="string" length="45" notnull="false"/>
<field name="echocancel" type="string" default="off"/>
<field name="silencesuppression" type="string" default="off"/>
<field name="callgroup" type="string" length="45" notnull="false"/>
<field name="pickupgroup" type="string" length="45" notnull="false"/>
<field name="namedcallgroup" type="string" length="100" notnull="false"/>
<field name="namedpickupgroup" type="string" length="100" notnull="false"/>
<field name="adhocNumber" type="string" length="45" notnull="false"/>
<field name="meetme" type="string" length="5" notnull="false"/>
<field name="meetmenum" type="string" length="45" notnull="false"/>
<field name="meetmeopts" type="string" length="45" notnull="false"/>
<field name="regexten" type="string" length="45" notnull="false"/>
<field name="directed_pickup" type="string" notnull="false"/>
<field name="directed_pickup_context" type="string" length="100" notnull="false"/>
<field name="pickup_modeanswer" type="string" notnull="false"/>
<field name="amaflags" type="string" length="45" notnull="false"/>
<field name="dnd" type="string" default="reject" notnull="false"/>
<field name="videomode" type="string" default="auto" notnull="false"/>
<field name="setvar" type="string" length="50" notnull="false"/>
<field name="name" type="string" length="40" primarykey="true"/>
<field name="phonecodepage" type="string" length="50" notnull="false"/>
<field name="regcontext" type="string" length="20" default="sccpregistration" notnull="false"/>
<field name="_regcontext" type="string" length="20" notnull="false"/>
<field name="transfer_on_hangup" type="string" default="off"/>
<field name="_transfer_on_hangup" type="string" notnull="false"/>
<field name="autoselectline_enabled" type="string" default="off"/>
<field name="_autoselectline_enabled" type="string" notnull="false"/>
<field name="autocall_select" type="string" default="off"/>
<field name="_autocall_select" type="string" notnull="false"/>
<field name="backgroundImageAccess" type="string" default="off"/>
<field name="_backgroundImageAccess" type="string" notnull="false"/>
<field name="callLogBlfEnabled" type="string" default="2"/>
<field name="_callLogBlfEnabled" type="string" notnull="false"/>
<key name="id" type="unique">
<column name="id"/>
</key>
</table>
<table name="sccpbuttonconfig">
<field name="ref" type="string" length="15" default="" primarykey="true"/>
<field name="reftype" type="string" length="15" default="sccpdevice" primarykey="true"/>
<field name="instance" type="boolean" default="0" primarykey="true"/>
<field name="buttontype" type="string" length="190" default="line" primarykey="true"/>
<field name="name" type="string" length="36" notnull="false"/>
<field name="options" type="string" length="100" notnull="false"/>
<key name="ref" type="index">
<column name="ref"/>
<column name="reftype"/>
</key>
</table>
<table name="sccpdevmodel">
<field name="model" type="string" length="20" primarykey="true"/>
<field name="vendor" type="string" length="40" notnull="false"/>
<field name="dns" type="integer" default="1" notnull="false"/>
<field name="buttons" type="integer" default="0" notnull="false"/>
<field name="loadimage" type="string" length="40" notnull="false"/>
<field name="loadinformationid" type="string" length="30" notnull="false"/>
<field name="enabled" type="integer" default="0" notnull="false"/>
<field name="nametemplate" type="string" length="50" notnull="false"/>
<key name="model" type="index">
<column name="model"/>
</key>
</table>
<table name="sccpuser">
<field name="name" type="string" length="20" primarykey="true"/>
<field name="pin" type="string" length="7" notnull="false"/>
<field name="password" type="string" length="7" notnull="false"/>
<field name="description" type="string" length="45" notnull="false"/>
<field name="roaminglogin" type="string" default="off" notnull="false"/>
<field name="devicegroup" type="string" length="7"/>
<field name="auto_logout" type="string" default="off" notnull="false"/>
<field name="homedevice" type="string" length="20" notnull="false"/>
<key name="name" type="unique">
<column name="name"/>
</key>
</table>
<table name="sccpsettings">
<field name="keyword" type="string" length="50" primarykey="true"/>
<field name="data" type="string" length="255" notnull="false"/>
<field name="seq" type="boolean" primarykey="true"/>
<field name="type" type="boolean" primarykey="true"/>
<field name="systemdefault" type="string" length="255" notnull="false"/>
</table>
</database>
</module>

View file

@ -1,46 +0,0 @@
<div class="container-fluid">
<h1><?php echo $display_info?></h1>
<div class="row">
<div class="col-sm-12">
<div class="fpbx-container">
<div class="display no-border">
<div class="nav-container">
<div class="scroller scroller-left"><i class="glyphicon glyphicon-chevron-left"></i></div>
<div class="scroller scroller-right"><i class="glyphicon glyphicon-chevron-right"></i></div>
<div class="wrapper">
<ul class="nav nav-tabs list" role="tablist">
<?php foreach ($display_page as $key => $page) { ?>
<li data-name="<?php echo $key?>" class="change-tab <?php echo $key == 'general' ? 'active' : ''?>"><a href="#<?php echo $key?>" aria-controls="<?php echo $key?>" role="tab" data-toggle="tab"><?php echo $page['name']?></a></li>
<?php } ?>
</ul>
</div>
</div>
<div class="tab-content display">
<?php foreach ($display_page as $key => $page) { ?>
<div id="<?php echo $key?>" class="tab-pane <?php echo $key == 'general' ? 'active' : ''?>">
<?php echo $page['content']?>
</div>
<?php } ?>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Modal alerts-->
<div class="modal" id="hwalert" tabindex="-1" role="dialog" aria-labelledby="lhwalert">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="myModalLabel">Modal title</h4>
</div>
<div class="modal-body">
...
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>

View file

@ -1,27 +0,0 @@
<?php /* $Id:$ */
if (!defined('FREEPBX_IS_AUTH')) {
die('No direct script access allowed');
}
// License for all code of this FreePBX module can be found in the license file inside the module directory
// Copyright 2015 Sangoma Technologies.
//
// vim: set ai ts=4 sw=4 ft=php:
// SccpSettings page. Re-written for usage with chan_sccp
// AGPL v3 Licened
// Note that BEFORE THIS IS CALLED, the Sipsettings configPageinit
// function is called. This is where you do any changes. The page.foo.php
// is only for DISPLAYING things. MVC is a cool idea, ya know?
//
$spage = FreePBX::create()->Sccp_manager;
if (empty($spage->class_error)) {
$display_page = $spage->advServerShowPage();
$display_info = _("SCCP Advance Server Configuration");
} else {
$display_page = $spage->infoServerShowPage();
$display_info = _("SCCP Server Configuration");
}
// standardise code to reduce base
include('page.html.php');
?>

View file

@ -1,27 +0,0 @@
<?php /* $Id:$ */
if (!defined('FREEPBX_IS_AUTH')) {
die('No direct script access allowed');
}
// License for all code of this FreePBX module can be found in the license file inside the module directory
// Copyright 2015 Sangoma Technologies.
//
// vim: set ai ts=4 sw=4 ft=php:
// SccpSettings page. Re-written for usage with chan_sccp
// AGPL v3 Licened
// Note that BEFORE THIS IS CALLED, the Sipsettings configPageinit
// function is called. This is where you do any changes. The page.foo.php
// is only for DISPLAYING things. MVC is a cool idea, ya know?
//
$spage = FreePBX::create()->Sccp_manager;
if (empty($spage->class_error)) {
$display_page = $spage->phoneShowPage();
$display_info = _("SCCP Phone Manager");
} else {
$display_page = $spage->infoServerShowPage();
$display_info = _("SCCP Server Configuration");
}
// standardise code to reduce base
include('page.html.php');
?>

View file

@ -1,18 +0,0 @@
<?php /* $Id:$ */
if (!defined('FREEPBX_IS_AUTH')) {
die('No direct script access allowed');
}
// License for all code of this FreePBX module can be found in the license file inside the module directory
// Copyright 2015 Sangoma Technologies.
// vim: set ai ts=4 sw=4 ft=php:
// SccpSettings page. Re-written for usage with chan_sccp
// AGPL v3 Licened
//
// Initialise page before to avoid double calls and improve performance
$display_page = FreePBX::create()->Sccp_manager->settingsShowPage();
$display_info = _("SCCP Server Settings");
// standardise code to reduce base
include('page.html.php');
?>

View file

@ -1,482 +0,0 @@
<?php
// vim: set ai ts=4 sw=4 ft=php:
// Version for SCCP Manager 13.0.X
//
/* This is the driver for Sccp_manager in FreePBX.
It is loaded via an include, written by the installer, at
modules/core/functions.inc/drivers
and provides the following required methods. it provides the interface between
FreePBX extensions and sccp_manager lines
*
* getInfo
* addDevice
* delDevice
* getDevice - Called by core to read sccpline returning fields in data_fld
* getDefaultDeviceSettings -
* getDeviceDisplay - Called by functionsInc to load sccp tab using values from Device and getDevice.
*
*/
//
namespace FreePBX\modules\Core\Drivers;
class Sccp extends \FreePBX\modules\Core\Driver {
// This is a map between sccpline fields and FreePBX fields.
// TODO: List needs to be extended. Missing fields, not necessarily all required              
/* adhocNumber
              meetme
                meetmenum
               meetmeopts
                 regexten
          directed_pickup
  directed_pickup_context
        pickup_modeanswer
                 amaflags
setvar
            phonecodepage
                  trnsfvm
                    vmnum
*/
private $data_fld = array("pin"=>'pin', "label" => 'label', "accountcode" => 'account',
"context" =>'context',"incominglimit"=>'incominglimit',
"callgroup"=>'callgroup',"pickupgroup"=>'pickupgroup',
"transfer" => 'transfer', "echocancel" => 'echocancel',
"language" => 'language', "description" => 'callerid',
"cid_num" => 'cid_num', "cid_name" => 'label', "mailbox" => 'mailbox',
"musicclass" => 'musicclass', "allow" => 'allow',"disallow" => 'disallow',
"videomode" => 'videomode', 'pickup_modeanswer' => 'pickup_modeanswer',
"dnd" => 'dnd', "silencesuppression" => 'silencesuppression',
"secondary_dialtone_digits" => 'secondary_dialtone_digits',
"secondary_dialtone_tone" => 'secondary_dialtone_tone',
'namedcallgroup'=>'namedcallgroup', 'namedpickupgroup' => 'namedpickupgroup',
'directed_pickup' => 'directed_pickup'
);
// These are gui defaults used by freePBX for the elements in the SCCP tab in add/edit phone.
private $guiDefaults =array(
'gui_checkset' => array( "elemname" => "",
"prompttext" => "", //ok
"helptext" => "",
"currentvalue" => "",
"valarray" => array(),
"jsonclick" => '',
"jsvalidation" => "", //ok
"failvalidationmsg" => "", //ok
"canbeempty" => true,
"maxchars" => 0,
"disable" => false, //ok
"inputgroup" => false,
"class" => "",
"cblabel" => 'Enable',
"disabled_value" => 'DEFAULT',
"check_enables" => 'true',
"cbdisable" => false,
"cbclass" => '')
);
private $line_defaults = array();
public function __construct($parent_class = null) {
$this->freepbx = $parent_class;
$this->database = $parent_class->Database();
// Get system defaults [systemdefault] and sitedefaults [data] from sccpsettings.
$stmt = $this->database->prepare("SELECT * FROM sccpsettings");
$stmt->execute();
$raw_settings = $stmt->fetchAll(\PDO::FETCH_ASSOC);
foreach ($raw_settings as $key => $valueArray) {
$sccpDefaults[$valueArray['keyword']] = $valueArray['systemdefault'];
$siteDefaults[$valueArray['keyword']] = $valueArray['data'];
}
// This will produce an array where site defaults take precedence over system defaults
$this->line_defaults = array_intersect_key($siteDefaults,$sccpDefaults);
// If have no site codecs, use system defaults - must have a codec!
if (empty($this->line_defaults['allow'])) {
$this->line_defaults['allow'] = $sccpDefaults['allow'];
}
if (empty($this->line_defaults['disallow'])) {
$this->line_defaults['disallow'] = $sccpDefaults['disallow'];
}
unset($raw_settings, $siteDefaults, $sccpDefaults);
}
public function getInfo() {
return array(
"rawName" => "sccp",
"hardware" => "sccp_custom",
"prettyName" => _("Sccp Custom Driver"),
"shortName" => "SCCP",
"description" => _("Sccp Device"),
"Version" => "11.5",
"about" => "Sccp class Base ver: 11.5, Sccp ver: default"
);
}
public function addDevice($id, $settings) {
// This is actually save line and is used by add and edit.
$add_fld = array ("name"=>'label',"outboundcid"=>'cid_num',"langcode"=>'language',"extdisplay"=>'description','devinfo_mailbox'=>'mailbox');
$settings['cid_num']['value'] = '';
$settings['cid_name']['value'] = '';
$settings['mailbox']['value']= '';
// Add $_REQUEST values to settings
if (isset($_REQUEST)){
foreach($add_fld as $key => $val) {
if (!empty($_REQUEST[$key])){
$settings[$val]['value'] = $_REQUEST[$key];
}
}
}
$allow_codec = array();
foreach($settings as $key => $val) {
if (strncmp($key,'codec_',6) === 0 ) {
$allow_codec[] = str_replace('codec_','',$key);
}
}
$settings['allow']['value'] = implode(";", $allow_codec);
// Reset to line defaults if no value selected
if (empty($settings['allow']['value'])) {
$settings['allow']['value'] = $this->line_defaults['allow'];
}
// If set, parse outboundcid content into cid_num and cid_name sccpline fields
if (!empty($settings['cid_num']['value'])) {
$outboundcid = $settings['cid_num']['value'];
if (preg_match('/"(.*)"\s?<(.*)>/', $outboundcid, $matches)) {
$settings['cid_num']['value'] = $matches[2];
$settings['cid_name']['value'] = $matches[1];
} else if (is_integer($outboundcid)) {
$settings['cid_num']['value'] = $outboundcid;
}
}
if ($this->line_defaults['dndFeature'] == 'off') {
$settings['dnd']['value'] = 'off';
}
if (!empty($_REQUEST['vm']) && ($_REQUEST['vm'] =='enabled')){ // mailbox
if (empty($settings['mailbox']['value'])) {
$settings['mailbox']['value']= $id;
}
}
// only store values that have been set; if need to display a default, must show in page.
$sqlSet = "name='{$id}'";
foreach($this->data_fld as $key => $val) {
if (!empty($settings[$val]['value'])) {
$sqlSet .= ", {$key}='{$settings[$val]['value']}'";
}
}
$stmt = "INSERT INTO sccpline SET {$sqlSet} ON DUPLICATE KEY UPDATE {$sqlSet}";
$sth = $this->database->prepare($stmt);
$sth->execute();
/*
If called from SCCP Phone, redirect to SCCP Phone page on submit.
This was last function in add so should be safe.
Prefer to add in Hooks, but is not followed even if set for $currentComponent
Do nothing if called from QuickCreateExtension when display is not set
*/
if (isset($_REQUEST['display'])) {
redirect("config.php?display=sccp_phone", false);
}
// Have changed something so need to reload the device
// TODO: are we reloading the device or reloading Asterisk
$this->reload_line($id);
return true;
}
public function delDevice($id) {
//Required by FreePBX.
// Delete associated default line buttons or will leave orphans
foreach (array($id) as $openId) {
$sth = $this->database->prepare("DELETE FROM sccpbuttonconfig WHERE name LIKE :openID AND buttontype = 'line'");
$openId = "{$openId}%";
$sth->bindParam(':openID', $openId);
$sth->execute();
}
$sth = $this->database->prepare("DELETE FROM sccpline WHERE name = ?");
$sth->execute(array($id));
return true;
}
public function getDevice($id) {
// FreePBX required method
$sql = "SELECT name AS id, name AS name ";
foreach($this->data_fld as $key => $val) {
$sql .= ", {$key} AS {$val}";
}
$sql .= " FROM sccpline WHERE name = '{$id}'";
$sth = $this->database->prepare($sql);
$tech = array();
try {
$sth->execute(array($id));
$tech = $sth->fetch(\PDO::FETCH_ASSOC);
$tech['dial']="SCCP/{$id}";
} catch(\Exception $e) {}
return $tech;
}
public function getDefaultDeviceSettings($id, $displayname, &$flag) {
// FreePBX required method
$settings = array();
$settingsFields = array('mailbox', 'incominglimit', 'context', 'directed_pickup_context', 'callgroup', 'pickupgroup', 'namedcallgroup',
'namedpickupgroup', 'adhocNumber', 'secondary_dialtone_digits', 'secondary_dialtone_tone', 'directed_pickup', 'pickup_modeanswer',
'transfer', 'echocancel', 'dnd', 'silencesuppression', 'musicclass', 'pin', 'allow', 'disallow');
foreach ($settingsFields as $key) {
$settings[$key] = array('value' => $this->line_defaults[$key], 'flag' => $flag++);
}
return array('dial' => 'SCCP', 'settings' => $settings);
}
public function getDeviceDisplay($display, $deviceInfo, $currentComponent, $primarySection) {
global $amp_conf;
$activeCodecs = array();
// load xml data to get help from same source as rest of module
$xml_vars = $amp_conf['AMPWEBROOT'] . '/admin/modules/sccp_manager/conf/sccpgeneral.xml.v433';
$this->xml_data = simplexml_load_file($xml_vars);
// load metainfo from chan-sccp - help information if not in xml. Only load first time as static data.
if (empty($this->sccpHelpInfo)) {
$sysConfiguration = \FreePbx::sccp_manager()->aminterface->getSCCPConfigMetaData('general');
foreach ($sysConfiguration['Options'] as $key => $valueArray) {
foreach ($valueArray['Description'] as $descKey => $descValue) {
$this->sccpHelpInfo[$valueArray['Name']] .= $descValue . '<br>';
}
}
unset($sysConfiguration);
}
$section = _("SCCP Extension Details");
$section_с = _("SCCP Codec Details");
$gn_category = "sccp";
//add sccp category
$currentComponent->addTabTranslation('sccp',_('SCCP'));
// get site and system defaults
$systemCodecs = array_fill_keys(explode(';',$this->line_defaults['allow']),true);
$siteAudioCodecs = array_intersect_key($systemCodecs, $this->freepbx->Codecs->getAudio());
$siteVideoCodecs = array_intersect_key($systemCodecs, $this->freepbx->Codecs->getVideo());
if (empty($deviceInfo['allow'])) {
// No allowed codecs so reset to site defaults
foreach ($systemCodecs as $lineCodec => $dummyVal) {
$activeCodecs[] = "devinfo_codec_{$lineCodec}";
}
} else {
// have allowed codecs for this line
foreach (explode(';',$deviceInfo['allow']) as $lineCodec) {
$activeCodecs[] = "devinfo_codec_{$lineCodec}";
}
}
// Fill Audio codecs information
foreach ($siteAudioCodecs as $key => $value) {
$audioCodecButtons[] = array('value' => "devinfo_codec_{$key}", 'text' => $key);
}
// Fill Video codecs information
foreach ($siteVideoCodecs as $key => $value) {
$videoCodecButtons[] = array('value' => "devinfo_codec_{$key}", 'text' => $key);
}
$tmparr['disallow'] = array('prompttext' => _('Disallowed Codecs'),
'value' => $this->line_defaults['disallow'],
'tt' => 'Codecs that are disallowed. Default and recommended value is all',
'level' => 1,
'section' => $section_с,
'category' => $gn_category
);
$el = array(
"elemname" => "devinfo_sccp_codec",
"prompttext" => _('Line Audio Codec:'),
"helptext" => _("Line Audio Codec. Uncheck all Audio and Video codecs to return to site defaults"),
"currentvalue" => $activeCodecs,
"valarray" => $audioCodecButtons,
"class" => $section_с,
"disable" => 0
);
// Override defaults with $el
$currentComponent->addguielem($section_с, new \gui_checkset(array_merge($this->guiDefaults['gui_checkset'],$el)), $gn_category);
unset($el);
$el = array(
"elemname" => "devinfo_sccp_vcodec",
"prompttext" => _('Line Video Codec:'),
"helptext" => _("Line Video Codec"),
"currentvalue" => $activeCodecs,
"valarray" => $videoCodecButtons,
"class" => $section_с,
"disable" => 0
);
$currentComponent->addguielem($section_с, new \gui_checkset(array_merge($this->guiDefaults['gui_checkset'],$el)), $gn_category);
$pageGroup = $this->xml_data->xpath('//page_group[@name="sccp_extension_config"]');
$elements = $pageGroup[0]->children();
foreach ($elements as $child) {
if (empty($child->help)) {
$child->help = 'Help is not available.';
$child->meta_help = '1';
}
switch ($child['type']) {
case 'IE':
$elementID = (string)$child->input[0]->name;
if (!empty($metainfo[$elementID])) {
if ($child->meta_help == '1' || $child->help == 'Help!') {
$child->help = $metainfo[$shortId];
}
}
$tmparr[$elementID] = array('prompttext' => _((string)$child->label),
'value' => $this->line_defaults[$elementID],
'tt' => (string)$child->help,
'level' => 1,
'section' => $section,
'category' => $gn_category
);
break;
case 'IS':
$select = array();
foreach ($child->xpath('button') as $value) {
$select[] = array('value' => strtolower((string)$value[@value]), 'text' => (string)$value);
}
$hideButton = false;
if (($this->line_defaults['dndFeature'] == 'off') && ($child['id'] == 5)) {
$hideButton = true;
}
$tmparr[(string)$child->name] = array('prompttext' => _((string)$child->label),
'value' => $this->line_defaults[(string)$child->name],
'tt' => (string)$child->help,
'select' => $select,
'level' => 1,
'disable' => $hideButton,
'hidden' => $hideButton,
'type' => 'radio',
'section' => $section,
'category' => $gn_category
);
unset($select);
break;
case 'SLD':
$select = array(
array( 'value' => '0x21', 'text' => 'Inside Dial Tone'),
array( 'value' => '0x22', 'text' => 'Outside Dial Tone'),
array( 'value' => '0x23', 'text' => 'Line Busy Tone'),
array( 'value' => '0x24', 'text' => 'Alerting Tone'),
array( 'value' => '0x25', 'text' => 'Reorder Tone'),
array( 'value' => '0x26', 'text' => 'Recorder Warning Tone'),
array( 'value' => '0x27', 'text' => 'Recorder Detected Tone'),
array( 'value' => '0x28', 'text' => 'Reverting Tone'),
array( 'value' => '0x29', 'text' => 'Receiver OffHook Tone'),
array( 'value' => '0x2A', 'text' => 'Partial Dial Tone'),
array( 'value' => '0x2B', 'text' => 'No Such Number Tone'),
array( 'value' => '0x2C', 'text' => 'Busy Verification Tone'),
array( 'value' => '0x2D', 'text' => 'Call Waiting Tone'),
array( 'value' => '0x2E', 'text' => 'Confirmation Tone'),
array( 'value' => '0x2F', 'text' => 'Camp On Indication Tone'),
array( 'value' => '0x30', 'text' => 'Recall Dial Tone'),
array( 'value' => '0x31', 'text' => 'Zip Zip'),
array( 'value' => '0x32', 'text' => 'Zip'),
array( 'value' => '0x33', 'text' => 'Beep Bonk'),
array( 'value' => '0x34', 'text' => 'Music Tone'),
array( 'value' => '0x35', 'text' => 'Hold Tone'),
array( 'value' => '0x36', 'text' => 'Test Tone'),
array( 'value' => '0x37', 'text' => 'DT Monitor Warning Tone'),
array( 'value' => '0x40', 'text' => 'Add Call Waiting'),
array( 'value' => '0x41', 'text' => 'Priority Call Wait'),
array( 'value' => '0x42', 'text' => 'Recall Dial'),
array( 'value' => '0x43', 'text' => 'Barg In'),
array( 'value' => '0x44', 'text' => 'Distinct Alert'),
array( 'value' => '0x45', 'text' => 'Priority Alert'),
array( 'value' => '0x46', 'text' => 'Reminder Ring'),
array( 'value' => '0x47', 'text' => 'Precedence RingBank'),
array( 'value' => '0x48', 'text' => 'Pre-EmptionTone'),
array( 'value' => '0x67', 'text' => '2105 HZ'),
array( 'value' => '0x68', 'text' => '2600 HZ'),
array( 'value' => '0x69', 'text' => '440 HZ'),
array( 'value' => '0x6A', 'text' => '300 HZ'),
array( 'value' => '0x77', 'text' => 'MLPP Pala'),
array( 'value' => '0x78', 'text' => 'MLPP Ica'),
array( 'value' => '0x79', 'text' => 'MLPP Vca'),
array( 'value' => '0x7A', 'text' => 'MLPP Bpa'),
array( 'value' => '0x7B', 'text' => 'MLPP Bnea'),
array( 'value' => '0x7C', 'text' => 'MLPP Upa')
);
$tmparr[(string)$child->name] = array('prompttext' => _((string)$child->label),
'value' => $this->line_defaults[(string)$child->name],
'tt' => (string)$child->help,
'select' => $select,
'level' => 1,
'type' => 'select',
'section' => $section,
'category' => $gn_category
);
unset($select);
break;
case 'SLG':
$elementID = (string)$child->name;
$named_group = \FreePbx::sccp_manager()->dbinterface->getNamedGroup($elementID);
if (!empty($named_group[$elementID])) {
foreach ($named_group[$elementID] as $val) {
$select[] = array('value' => $val, 'text' => $val);
}
}
// Disable and hide list elements if there are no valid values
$tmparr[(string)$child->name] = array('prompttext' => _((string)$child->label),
'value' => $this->line_defaults[(string)$child->name],
'tt' => (string)$child->help,
'select' => $select,
'level' => 1,
'disable' => empty($named_group[$elementID][0]),
'hidden' => empty($named_group[$elementID][0]),
'section' => $section,
'category' => $gn_category
);
unset($select);
break;
case 'SLM':
if (function_exists('music_list')){
foreach (music_list() as $value) {
$select[] = array('value' => $value, 'text' => _($value));
}
} else {
$select[] = array('value' => 'default', 'text' => _('default'));
}
$tmparr[(string)$child->name] = array('prompttext' => _((string)$child->label),
'value' => $this->line_defaults[(string)$child->name],
'tt' => (string)$child->help,
'select' => $select,
'level' => 1,
'type' => 'select',
'section' => $section,
'category' => $gn_category
);
unset($select);
break;
}
}
$select[] = array('value' => 'off', 'text' => 'Off');
$select[] = array('value' => 'user', 'text' => 'User');
$select[] = array('value' => 'auto', 'text' => 'Auto');
$tt = _("Automatic or Manual video mode. Valid values are 'auto', 'user' or 'off'. When set to 'auto', video will automatically start if both parties have a compatible code enabled. In 'user' mode the user needs to press the vidmode softkey before video will be tried. Default:'auto'");
$tmparr['videomode'] = array('prompttext' => _('Video Mode '), 'value' => 'auto', 'tt' => $tt, 'select' => $select, 'level' => 1, 'type' => 'radio', 'section' => $section_с, 'category' => $gn_category);
unset($select);
return $tmparr;
}
public function reload_line($id) {
global $astman;
// TODO: Change to use amInterfaceClasses
$result = $astman->Command('sccp reload line ' . $id);
return $result;
}
public function getDeviceHeaders() {
return array(
'secret' => array('identifier' => _('Secret'), 'description' => sprintf(_('Secret [Enter "%s" to regenerate]'),"REGEN")),
);
}
}

View file

@ -1,208 +0,0 @@
<?php
/**
*
* Core Comsnd Interface
*
* https://www.voip-info.org/asterisk-manager-example-php/
*/
/* !TODO!: Re-Indent this file. -TODO-: What do you mean? coreaccessinterface ?? */
namespace FreePBX\modules\Sccp_manager\aminterface;
// ************************************************************************** Event *********************************************
abstract class Event extends IncomingMessage
{
protected $_events;
public function getName()
{
return $this->getKey('Event');
}
public function __construct($rawContent)
{
parent::__construct($rawContent);
$this->_events = array();
$this->_completed = false;
}
}
class UnknownEvent extends Event
{
public function __construct($rawContent = '')
{
}
}
class TableStart_Event extends Event
{
public function getTableName()
{
return $this->getKey('TableName');
}
}
class TableEnd_Event extends Event
{
public function getTableName()
{
return $this->getKey('TableName');
}
}
class SCCPSoftKeySetEntry_Event extends Event
{
// This is a list of tables, each table is an entry
protected $_data;
}
class ExtensionStatus_Event extends Event
{
// this is a list of tables, each table is an entry
public function getPrivilege()
{
return $this->getKey('Privilege');
}
public function getExtension()
{
return $this->getKey('Exten');
}
public function getContext()
{
return $this->getKey('Context');
}
public function getHint()
{
return $this->getKey('Hint');
}
public function getStatus()
{
return $this->getKey('Status');
}
}
class SCCPDeviceEntry_Event extends Event
{
// This is a list of tables, each table is an entry
}
class SCCPShowDevice_Event extends Event
{
// This is a list of tables
public function getCapabilities()
{
// TODO unused method - to be deleted?
$ret = array();
$codecs = explode(';', substr($this->getKey('Capabilities'), 1, -1));
foreach ($codecs as $codec) {
$codec_parts = explode(" ", $codec);
$ret[] = array("name" => $codec_parts[0], "value" => substr($codec_parts[1], 1, -1));
}
return $ret;
}
public function getCodecsPreference()
{
// TODO unused method - to be deleted?
$ret = array();
$codecs = explode(';', substr($this->getKey('CodecsPreference'), 1, -1));
foreach ($codecs as $codec) {
$codec_parts = explode(" ", $codec);
$ret[] = array("name" => $codec_parts[0], "value" => substr($codec_parts[1], 1, -1));
}
return $ret;
}
}
class SCCPDeviceButtonEntry_Event extends Event
{
}
class SCCPDeviceFeatureEntry_Event extends Event
{
// Returned by SCCPShowDevice
}
class SCCPVariableEntry_Event extends Event
{
// Returned by SCCPShowDevice
}
class SCCPDeviceLineEntry_Event extends Event
{
}
class SCCPDeviceStatisticsEntry_Event extends Event
{
}
class SCCPDeviceSpeeddialEntry_Event extends Event
{
}
abstract class ClosingEvent extends Event
{
public function __construct($message) {
parent::__construct($message);
$this->_completed = true;
}
public function getListItems() {
return intval($this->getKey('ListItems'));
}
}
class ResponseComplete_Event extends ClosingEvent
{
// dummy event to avoid unnecessary testing
public function listCorrectlyReceived($_message, $_eventCount){
return true;
}
}
class SCCPShowDeviceComplete_Event extends ClosingEvent
{
public function listCorrectlyReceived($_message, $_eventCount){
// Have end of list event. Check with number of lines received and send true if match.
// Remove 9 for the start and end events, and then 4.
if ($this->getKey('listitems') === substr_count( $_message, "\n") -13) {
return true;
}
return false;
}
}
class SCCPShowDevicesComplete_Event extends ClosingEvent
{
public function listCorrectlyReceived($_message, $_eventCount) {
// Have end of list event. Check with number of events received and send true if match.
// Remove 9 for the lines in the list start and end, and the 2 blank lines.
if ($this->getKey('listitems') === substr_count( $_message, "\n") -11) {
return true;
}
return false;
}
}
class ExtensionStateListComplete_Event extends ClosingEvent
{
public function listCorrectlyReceived($_message, $_eventCount){
// Have end of list event. Check with number of events received and send true if match.
// Remove 1 as the closing event is included in the count.
if ($this->getKey('listitems') === $_eventCount -1) {
return true;
}
return false;
}
}
class SCCPShowSoftKeySetsComplete_Event extends ClosingEvent
{
public function listCorrectlyReceived($_message, $_eventCount){
// Have the end of list event. Check the number of lines received and
// return true if match. Remove 8 for the complete event.
if ($this->getKey('listitems') === substr_count( $_message, "\n") -11) {
return true;
}
return false;
}
}

View file

@ -1,428 +0,0 @@
<?php
/**
*
* Core Comsnd Interface
*
* https://www.voip-info.org/asterisk-manager-example-php/
*/
/* !TODO!: Re-Indent this file. -TODO-: What do you mean? coreaccessinterface ?? */
namespace FreePBX\modules\Sccp_manager\aminterface;
class AMIException extends \Exception
{
}
abstract class Message
{
const EOL = "\r\n";
const EOM = "\r\n\r\n";
protected $lines;
protected $variables;
protected $keys;
protected $createdDate;
private $_responseHandler;
public function __construct()
{
$this->lines = array();
$this->variables = array();
$this->keys = array();
$this->createdDate = time();
}
public function _ToDebug($level, $msg)
{
}
public function getResponseHandler()
{
if (strlen($this->_responseHandler) > 0) {
// throw new AMIException('Hier:' . $this->_responseHandler);
return (string) $this->_responseHandler;
} else {
return "";
}
}
public function setResponseHandler($responseHandler)
{
if (0 == strlen($responseHandler)) {
return;
}
$className = '\\FreePBX\\modules\\Sccp_manager\\aminterface\\' . $responseHandler . '_Response';
if (class_exists($className, true)) {
$this->_responseHandler = $responseHandler;
} else {
return;
}
}
public function setVariable($key, $value)
{
$key = strtolower($key);
$this->variables[$key] = $value;
/* print_r('<br>----Set Value -------<br>');
print_r($key);
print_r($value);
*/
}
public function getVariable($key)
{
$key = strtolower($key);
if (!isset($this->variables[$key])) {
return null;
}
return $this->variables[$key];
}
protected function setKey($key, $value)
{
$key = strtolower((string) $key);
$this->keys[$key] = (string) $value;
/*
print_r('<br>----Set Key -------<br>');
print_r($key);
print_r($value);
*
*/
}
public function getKey($key)
{
$key = strtolower($key);
if (!isset($this->keys[$key])) {
return null;
}
//return (string)$this->keys[$key];
return $this->keys[$key];
}
public function getVariables()
{
return $this->variables;
}
public function getActionID()
{
return $this->getKey('ActionID');
}
public function getKeys()
{
return $this->keys;
}
private function serializeVariable($key, $value)
{
return "Variable: $key=$value";
}
protected function setSanitizedKey($key, $value)
{
$key = strtolower((string) $key);
$_string_key = array('actionid', 'descr');
if (array_search($key, $_string_key) !== false) {
$this->keys[$key] = (string) $this->sanitizeInput($value, 'string');
} else {
$this->keys[$key] = $this->sanitizeInput($value);
}
}
protected function sanitizeInput($value, $prefered_type = '')
{
if ($prefered_type == '') {
if (!isset($value) || $value === null || strlen($value) == 0) {
return null;
} elseif (is_numeric($value)) {
$prefered_type = 'numeric';
} elseif (is_string($value)) {
$prefered_type = 'string';
} else {
throw new AMIException("Don't know how to convert: '" . $value . "'\n");
}
}
if ($prefered_type !== '') {
switch ($prefered_type) {
case 'string':
if (!isset($value) || $value === null || strlen($value) == 0) {
return '';
}
if (filter_var($value, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE)) {
return (boolean) $value;
} elseif (filter_var($value, FILTER_SANITIZE_STRING, FILTER_NULL_ON_FAILURE)) {
return (string) $value;
} elseif (filter_var($value, FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_NULL_ON_FAILURE)) {
return (string) htmlspecialchars($value, ENT_QUOTES);
} else {
throw new AMIException("Incoming String is not sanitary. Skipping: '" . $value . "'\n");
}
break;
case 'numeric':
if (!isset($value) || $value === null || strlen($value) == 0) {
return 0;
}
if (filter_var($value, FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX | FILTER_FLAG_ALLOW_OCTAL)) {
return intval($value, 0);
} elseif (filter_var($value, FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_FRACTION | FILTER_FLAG_ALLOW_THOUSAND | FILTER_FLAG_ALLOW_SCIENTIFIC)) {
return (float) $value;
} else {
return (double) $value;
}
default:
throw new AMIException("Don't know how to convert: '" . $value . "'\n");
break;
}
}
}
protected function finishMessage($message)
{
return $message . self::EOL . self::EOL;
}
public function serialize()
{
$result = array();
foreach ($this->getKeys() as $k => $v) {
$result[] = $k . ': ' . $v;
}
foreach ($this->getVariables() as $k => $v) {
if (is_array($v)) {
foreach ($v as $singleValue) {
$result[] = $this->serializeVariable($k, $singleValue);
}
} else {
$result[] = $this->serializeVariable($k, $v);
}
}
$mStr = $this->finishMessage(implode(self::EOL, $result));
return $mStr;
}
public function setActionID($actionID)
{
if (0 == strlen($actionID)) {
throw new AMIException('ActionID cannot be empty.');
return;
}
if (strlen($actionID) > 69) {
throw new AMIException('ActionID can be at most 69 characters long.');
return;
}
$this->setKey('ActionID', $actionID);
}
public function __sleep()
{
return array('lines', 'variables', 'keys', 'createdDate');
}
}
abstract class IncomingMessage extends Message
{
protected $rawContent;
public function getEventList()
{
return $this->getKey('EventList');
}
public function getRawContent()
{
return $this->rawContent;
}
public function isComplete()
{
return $this->_completed;
}
public function __sleep()
{
$ret = parent::__sleep();
$ret[] = 'rawContent';
return $ret;
}
public function __construct($rawContent)
{
parent::__construct();
$this->rawContent = $rawContent;
$lines = explode(Message::EOL, $rawContent);
foreach ($lines as $line) {
$content = explode(':', $line);
$name = strtolower(trim($content[0]));
unset($content[0]);
$value = isset($content[1]) ? trim(implode(':', $content)) : '';
try {
$this->setSanitizedKey($name, $value);
} catch (AMIException $e) {
throw new AMIException("Error: '" . $e . "'\n Dump RawContent:\n" . $this->rawContent . "\n");
}
}
}
}
// namespace FreePBX\modules\Sccp_manager\aminterface\Message;
class LoginAction extends ActionMessage
{
/**
* Constructor.
*
* @param string $user AMI username.
* @param string $password AMI password.
*
* @return void
*/
public function __construct($user, $password)
{
parent::__construct('Login');
$this->setKey('Username', $user);
$this->setKey('Secret', $password);
$this->setKey('Events', 'off'); // &----
$this->setResponseHandler('Login');
}
}
abstract class ActionMessage extends Message
{
public function __construct($what)
{
parent::__construct();
$this->setKey('Action', $what);
$this->setKey('ActionID', microtime(true));
}
}
class CommandAction extends ActionMessage
{
public function __construct($command)
{
parent::__construct('Command');
$this->setKey('Command', $command);
$this->setResponseHandler("Command");
}
}
class ReloadAction extends ActionMessage
{
public function __construct($module = false)
{
parent::__construct('Reload');
if ($module !== false) {
$this->setKey('Module', $module);
$this->setResponseHandler("Generic");
}
}
}
class ExtensionStateListAction extends ActionMessage
{
public function __construct()
{
parent::__construct('ExtensionStateList');
$this->setKey('Segment', 'general');
$this->setKey('ResultFormat', 'command');
$this->setResponseHandler("ExtensionStateList");
}
}
class SCCPShowGlobalsAction extends ActionMessage
{
public function __construct()
{
parent::__construct('SCCPShowGlobals');
}
}
class SCCPShowSoftkeySetsAction extends ActionMessage
{
public function __construct()
{
parent::__construct('SCCPShowSoftkeySets');
$this->setKey('Segment', 'general');
$this->setKey('ResultFormat', 'command');
$this->setResponseHandler("SCCPShowSoftkeySets");
}
}
class SCCPShowDeviceAction extends ActionMessage
{
public function __construct($devicename)
{
parent::__construct('SCCPShowDevice');
$this->setKey('Segment', 'general');
$this->setKey('ResultFormat', 'command');
$this->setKey('DeviceName', $devicename);
$this->setResponseHandler("SCCPShowDevice");
}
}
class SCCPShowDevicesAction extends ActionMessage
{
public function __construct()
{
parent::__construct('SCCPShowDevices');
$this->setKey('Segment', 'general');
$this->setKey('ResultFormat', 'command');
$this->setResponseHandler("SCCPShowDevices");
}
}
class SCCPTokenAckAction extends ActionMessage
{
public function __construct($DeviceName)
{
parent::__construct('SCCPTokenAck');
$this->setKey('DeviceId', $DeviceName);
$this->setResponseHandler("Generic");
}
}
class SCCPDeviceRestartAction extends ActionMessage
{
public function __construct($DeviceName, $Type = "restart")
{
parent::__construct('SCCPDeviceRestart');
$this->setResponseHandler("Generic");
if (empty($Type)) {
$Type = "restart";
}
$this->setKey('DeviceName', $DeviceName);
if (in_array(strtolower($Type), array('restart', 'full', 'reset'))) {
$this->setKey('Type', $Type);
} else {
throw new Exception('Param2 has to be one of \'restart\', \'full\', \'reset\'.');
}
}
}
class SCCPConfigMetaDataAction extends ActionMessage
{
public function __construct($segment = false)
{
parent::__construct('SCCPConfigMetaData');
if ($segment != false) {
$this->setKey('Segment', $segment);
}
$this->setResponseHandler("SCCPJSON");
}
}

View file

@ -1,429 +0,0 @@
<?php
/*
*
* Response class definitions
*
*/
namespace FreePBX\modules\Sccp_manager\aminterface;
// ************************************************************************** Response *********************************************
abstract class Response extends IncomingMessage
{
protected $_events;
protected $_completed;
protected $keys;
public function __construct($rawContent)
{
parent::__construct($rawContent);
$this->_events = array();
// this logic is false - even if we have an error, we will not get anymore data, so is completed.
$this->_completed = $this->isSuccess();
}
public function __sleep()
{
$ret = parent::__sleep();
$ret[] = '_completed';
$ret[] = '_events';
return $ret;
}
public function getEvents()
{
return $this->_events;
}
public function getClosingEvent() {
return $this->_events['ClosingEvent'];
}
public function removeClosingEvent() {
unset($this->_events['ClosingEvent']);
}
public function getCountOfEvents() {
return count($this->_events);
}
public function isSuccess()
{
// returns true if response message does not contain error
return stristr($this->getKey('Response'), 'Error') === false;
}
public function isList()
{
if ($this->getKey('EventList') === 'start' ) {
return true;
}
}
public function getMessage()
{
return $this->getKey('Message');
}
public function setActionId($actionId)
{
$this->setKey('ActionId', $actionId);
}
public function getVariable($_rawContent, $_fields = '')
{
$lines = explode(Message::EOL, $_rawContent);
foreach ($_fields as $key => $value) {
foreach ($lines as $data) {
$_pst = strpos($data, $value);
if ($_pst !== false) {
$this->setKey($key, substr($data, $_pst + strlen($value)));
}
}
}
}
}
class GenericResponse extends Response
{
}
//****************************************************************************
// There are two types of Response messages returned by AMI
// Self contained responses which include any data requested;
// List Responses which contain the data in event messages that follow
// the response message.Response and Event
// Following are the self contained Response classes.
//****************************************************************************
class Generic_Response extends Response
{
public function __construct($rawContent)
{
// Only used for self contained responses.
parent::__construct($rawContent);
// add dummy closing event
$this->_events['ClosingEvent'] = new ResponseComplete_Event($rawContent);
$this->_completed = true;
$this->eventListIsCompleted = true;
}
}
class Login_Response extends Generic_Response
{
}
class Command_Response extends Generic_Response
{
private $_temptable;
public function __construct($rawContent)
{
$this->_temptable = array();
parent::__construct($rawContent);
$lines = explode(Message::EOL, $rawContent);
foreach ($lines as $line) {
$content = explode(':', $line);
if (is_array($content)) {
switch (strtolower($content[0])) {
case 'actionid':
$this->_temptable['ActionID'] = trim($content[1]);
break;
case 'response':
$this->_temptable['Response'] = trim($content[1]);
break;
case 'privilege':
$this->_temptable['Privilege'] = trim($content[1]);
break;
case 'output':
// included for backward compatibility with earlier versions of chan_sccp_b. AMI api does not precede command output with Output
$this->_temptable['Output'] = explode(PHP_EOL,str_replace(PHP_EOL.'--END COMMAND--', '',trim($content[1])));
break;
default:
$this->_temptable['Output'] = explode(PHP_EOL,str_replace(PHP_EOL.'--END COMMAND--', '', trim($line)));
break;
}
}
}
}
public function getResult()
{
return $this->_temptable;
}
}
class SCCPJSON_Response extends Generic_Response
{
public function __construct($rawContent)
{
parent::__construct($rawContent);
$this->getVariable($rawContent, array("DataType" => "DataType:", "JSONRAW" => "JSON:"));
if (null !== $this->getKey('JSONRAW')) {
$this->setKey('Response', 'Success');
}
}
public function getResult()
{
if (($json = json_decode($this->getKey('JSON'), true)) != false) {
return $json;
}
}
}
//***************************************************************************//
// Following are the Response classes where the data is contained in a series.
// of event messages.
class SCCPGeneric_Response extends Response
{
protected $_tables;
private $_temptable;
public function __construct($rawContent)
{
parent::__construct($rawContent);
// Confirm that there is a list following. This overrides any setting
// made in one of the parent constructs.
$this->_completed = !$this->isList();
}
public function addEvent($event)
{
// Start of list is handled by the isList function in the Constructor
// which also defines the list end event
if ( empty($thisSetEventEntryType)) {
// This is empty as soon as we have received a TableStart.
// The next message is the first of the data sets
// We use this variable in the switch to add set entries
if (strpos($event->getName(), 'Entry')) {
$thisSetEventEntryType = $event->getName();
} else {
$thisSetEventEntryType = 'undefinedAsThisIsNotASet';
}
}
// Unknown events will cause an exception.
// All event classes must be defined within Event.class.
if (get_class($event) === 'FreePBX\modules\Sccp_manager\aminterface\UnknownEvent') {
$this->_events[] = $event;
return;
}
switch ( $event->getName()) {
case $thisSetEventEntryType :
$this->_temptable['Entries'][] = $event;
break;
case 'TableStart':
//initialise
$this->_temptable = array();
$this->_temptable['Name'] = $event->getTableName();
$this->_temptable['Entries'] = array();
$thisSetEventEntryType = '';
break;
case 'TableEnd':
//Close
if (!is_array($this->_tables)) {
$this->_tables = array();
}
$this->_tables[$event->getTableName()] = $this->_temptable;
$this->_temptable = array();
$thisSetEventEntryType = 'undefinedAsThisIsNotASet';
// Finished the table. Now check to see if everything was received
// If counts do not match return false and table will not be
//loaded
if ($event->getKey('TableEntries') != count($this->_tables[$event->getTableName()]['Entries'])) {
return false;
}
break;
//case $eventListEndEvent;
case $this->getKey('eventListEndEvent');
// Have the list end event. The correct number of entries is verified in the event constructor
$this->_events['ClosingEvent'] = $event;
$this->eventListEndEvent = null;
//return $this->_completed = true;
break;
default:
// add regular list event
$this->_events[] = $event;
}
}
protected function ConvertTableData( $_tablename, array $_fkey, array $_fields)
{
$result = array();
$_rawtable = $this->Table2Array($_tablename);
// Check that there is actually data to be converted
if (empty($_rawtable)) { return $result;}
foreach ($_rawtable as $_row) {
$all_key_ok = true;
// No need to test if $_fkey is array as array required
foreach ($_fkey as $_fid) {
if (empty($_row[$_fid])) {
$all_key_ok = false;
} else {
$set_name[$_fid] = $_row[$_fid];
}
}
$Data = &$result;
if ($all_key_ok) {
foreach ($set_name as $value_id) {
$Data = &$Data[$value_id];
}
// Label converter in case labels and keys are different
foreach ($_fields as $value_key => $value_id) {
$Data[$value_id] = $_row[$value_key];
}
}
}
return $result;
}
protected function ConvertEventData(array $_fkey, array $_fields)
{
$result = array();
foreach ($this->_events as $_row) {
$all_key_ok = true;
$tmp_result = $_row->getKeys();
$set_name = array();
// No need to test if $_fkey is arrray as array required
foreach ($_fkey as $_fid) {
if (empty($tmp_result[$_fid])) {
$all_key_ok = false;
} else {
$set_name[$_fid] = $tmp_result[$_fid];
}
}
$Data = &$result;
if ($all_key_ok) {
foreach ($set_name as $value_id) {
$Data = &$Data[$value_id];
}
// Label converter in case labels and keys are different - not actually required.
foreach ($_fields as $value_id) {
$Data[$value_id] = $tmp_result[$value_id];
}
}
}
return $result;
}
public function Table2Array( $tablename )
{
$result =array();
if (empty($tablename) || !is_array($this->_tables)) {
return $result;
}
foreach ($this->_tables[$tablename]['Entries'] as $trow) {
$result[]= $trow->getKeys();
}
return $result;
}
public function getResult()
{
return $this->getMessage();
}
}
class SCCPShowSoftkeySets_Response extends SCCPGeneric_Response
{
public function __construct($rawContent)
{
parent::__construct($rawContent);
$this->setKey('eventlistendevent', 'SCCPShowSoftKeySetsComplete');
}
public function getResult()
{
return $this->ConvertTableData(
'SoftKeySets',
array('set','mode'),
array('description'=>'description','label'=>'label','lblid'=>'lblid')
);
}
}
class SCCPShowDevices_Response extends SCCPGeneric_Response
{
public function __construct($rawContent)
{
parent::__construct($rawContent);
$this->setKey('eventlistendevent', 'SCCPShowDevicesComplete');
}
public function getResult()
{
return $this->ConvertTableData(
'Devices',
array('mac'),
array('mac'=>'name','address'=>'address','descr'=>'descr','regstate'=>'status',
'token'=>'token','act'=>'act', 'lines'=>'lines','nat'=>'nat','regtime'=>'regtime')
);
}
}
class SCCPShowDevice_Response extends SCCPGeneric_Response
{
public function __construct($rawContent)
{
parent::__construct($rawContent);
$this->setKey('eventlistendevent', 'SCCPShowDeviceComplete');
}
public function getResult()
{
// This object has a list of events _events, and a list of tables _tables.
$result = array();
foreach ($this->_events as $trow) {
$result = array_merge($result, $trow->getKeys());
}
// Now handle label changes so that keys from AMI correspond to db keys in _tables
$result['Buttons'] = $this->ConvertTableData(
'Buttons',
array('id'),
array('id'=>'id','channelobjecttype'=>'channelobjecttype','inst'=>'inst',
'typestr'=>'typestr', 'type'=>'type', 'pendupdt'=>'pendupdt', 'penddel'=>'penddel', 'default'=>'default'
)
);
$result['SpeeddialButtons'] = $this->ConvertTableData(
'SpeeddialButtons',
array('id'),
array('id'=>'id','channelobjecttype'=>'channelobjecttype','name'=>'name','number'=>'number','hint'=>'hint')
);
$result['CallStatistics'] = $this->ConvertTableData(
'CallStatistics',
array('type'),
array('type'=>'type','channelobjecttype'=>'channelobjecttype','calls'=>'calls','pcktsnt'=>'pcktsnt','pcktrcvd'=>'pcktrcvd',
'lost'=>'lost','jitter'=>'jitter','latency'=>'latency', 'quality'=>'quality','avgqual'=>'avgqual','meanqual'=>'meanqual',
'maxqual'=>'maxqual', 'rconceal'=>'rconceal', 'sconceal'=>'sconceal'
)
);
$result['SCCP_Vendor'] = array('vendor' => strtok($result['skinnyphonetype'], ' '), 'model' => strtok('('),
'model_id' => strtok(')'), 'vendor_addon' => strtok($result['configphonetype'], ' '),
'model_addon' => strtok(' '));
if (empty($result['SCCP_Vendor']['vendor']) || $result['SCCP_Vendor']['vendor'] == 'Undefined') {
$result['SCCP_Vendor'] = array('vendor' => 'Undefined', 'model' => $result['configphonetype'],
'model_id' => '', 'vendor_addon' => $result['SCCP_Vendor']['vendor_addon'],
'model_addon' => $result['SCCP_Vendor']['model_addon']
);
}
$result['MAC_Address'] =$result['macaddress'];
return $result;
}
}
class ExtensionStateList_Response extends SCCPGeneric_Response
{
public function __construct($rawContent)
{
parent::__construct($rawContent);
$this->setKey('eventlistendevent', 'ExtensionStateListComplete');
}
public function getResult()
{
$result = $this->ConvertEventData(array('exten','context'), array('exten','context','hint','status','statustext'));
return $result;
}
}

View file

@ -1,524 +0,0 @@
<?php
/**
*
* Core Comsnd Interface
*
* https://www.voip-info.org/asterisk-manager-example-php/
*/
namespace FreePBX\modules\Sccp_manager;
class aminterface
{
var $_socket;
var $_error;
var $_config;
var $_test;
private $_connect_state;
private $_lastActionClass;
private $_lastActionId;
private $_lastRequestedResponseHandler;
private $_ProcessingMessage;
private $_DumpMessage;
private $debug_level = 1;
private $_incomingRawMessage;
private $eventListEndEvent;
public function load_subspace($parent_class = null)
{
$driverNamespace = "\\FreePBX\\Modules\\Sccp_manager\\aminterface";
$drivers = array('Message' => 'Message.class.php',
'Response' => 'Response.class.php',
'Event' => 'Event.class.php'
);
foreach ($drivers as $key => $value) {
$class = $driverNamespace . "\\" . $key;
$driver = __DIR__ . "/amInterfaceClasses/" . $value;
if (!class_exists($class, false)) {
if (file_exists($driver)) {
include(__DIR__ . "/amInterfaceClasses/" . $value);
} else {
throw new \Exception("Class required but file not found " . $driver);
}
}
}
}
public function __construct($parent_class = null)
{
global $amp_conf;
$this->paren_class = $parent_class;
$this->_socket = false;
$this->_connect_state = false;
$this->_error = array();
$this->_config = array('host' => 'localhost',
'user' => '',
'pass' => '',
'port' => '5038',
'tsoket' => 'tcp://',
'timeout' => 30,
'enabled' => true
);
$this->_eventListeners = array();
$this->_incomingMsgObjectList = array();
$this->_lastActionId = false;
$this->_incomingRawMessage = array();
$this->eventListEndEvent = '';
$fld_conf = array('user' => 'AMPMGRUSER', 'pass' => 'AMPMGRPASS');
if (isset($amp_conf['AMPMGRUSER'])) {
foreach ($fld_conf as $key => $value) {
if (isset($amp_conf[$value])) {
$this->_config[$key] = $amp_conf[$value];
}
}
}
if ($this->_config['enabled']) {
$this->load_subspace();
}
if ($this->_config['enabled']) {
// Ami is not hard disabled in __construct line 63.
if ($this->open()) {
// Can open a connection. Now check compatibility with chan-sccp.
// will return true if compatible.
if (!$this->get_compatible_sccp(true)[1]) {
// Close the open socket as will not use
$this->close();
}
}
}
}
public function info()
{
$Ver = '13.0.4';
if ($this->_config['enabled']){
return array('Version' => $Ver,
'about' => 'AMI data ver: ' . $Ver, 'test' => get_declared_classes());
} else {
return array('Version' => $Ver,
'about' => 'Disabled AMI ver: ' . $Ver);
}
}
/*
* Opens a socket connection to ami.
*/
public function open()
{
$cString = $this->_config['tsoket'] . $this->_config['host'] . ':' . $this->_config['port'];
$this->_context = stream_context_create();
$errno = 0;
$errstr = '';
$this->_ProcessingMessage = '';
$this->_socket = @stream_socket_client(
$cString,
$errno,
$errstr,
$this->_config['timeout'],
STREAM_CLIENT_CONNECT,
$this->_context
);
if ($this->_socket === false) {
$this->_errorException('Error connecting to ami: ' . $errstr . $cString);
return false;
}
$msg = new aminterface\LoginAction($this->_config['user'], $this->_config['pass']);
$response = $this->send($msg);
if ($response != false) {
if (!$response->isSuccess()) {
$this->_errorException('Could not connect: ' . $response->getMessage());
return false;
} else {
@stream_set_blocking($this->_socket, 0);
$this->_connect_state = true;
$this->_ProcessingMessage = '';
}
}
return true;
}
/*
* Closes the connection to ami.
*/
public function close()
{
$this->_connect_state = false;
$this->_ProcessingMessage = '';
@stream_socket_shutdown($this->_socket, STREAM_SHUT_RDWR);
}
/*
* Send action message to ami, and wait for Response
*/
public function send($message)
{
$_incomingRawMessage = array();
$messageToSend = $message->serialize();
$length = strlen($messageToSend);
$this->_DumpMessage = '';
$this->_lastActionId = $message->getActionID();
$this->_lastRequestedResponseHandler = $message->getResponseHandler();
$this->_lastActionClass = $message;
$this->_incomingRawMessage[$this->_lastActionId] = '';
$this->eventListIsCompleted = array();
if (@fwrite($this->_socket, $messageToSend) < $length) {
$this->_errorException('Could not send message');
return false;
}
// Have sent a message and now have to wait for and read the reply
// The below infinite loop waits for $this->completed to be true.
// The loop calls readBuffer, which calls GetMessages, which calls Process
// This loop then continues until we have _thisComplete as an object variable
$this->eventListIsCompleted[$this->_lastActionId] = false;
while (true) {
stream_set_timeout($this->_socket, 1);
$this->readBuffer();
$info = stream_get_meta_data($this->_socket);
if ($info['timed_out'] == true) {
$this->_errorException("Read waittime: " . ($this->socket_param['timeout']) . " exceeded (timeout).\n");
return false;
}
if ($this->eventListIsCompleted[$this->_lastActionId]) {
$response = $this->_incomingMsgObjectList[$this->_lastActionId];
// need to test that the list was successfully completed here
$allReceived = $response->getClosingEvent()
->listCorrectlyReceived($this->_incomingRawMessage[$this->_lastActionId],
$response->getCountOfEvents());
// now tidy up removing any temp variables or objects
$response->removeClosingEvent();
unset($_incomingRawMessage[$this->_lastActionId]);
unset($this->_incomingMsgObjectList[$this->_lastActionId]);
unset($this->_lastActionId);
if ($allReceived) {
return $response;
}
// Something is missing from the events list received via AMI, or
// the control parameter at the end of the list has changed.
// This will cause an exception as returning a boolean instead of a Response
// Maybe should handle better, but
// need to break out of the loop as nothing more coming.
try {
throw new \invalidArgumentException("Counts do not match on returned AMI Result");
} catch ( \invalidArgumentException $e) {
echo substr(strrchr(get_class($response), '\\'), 1), " ", $e->getMessage(), "\n";
}
return $response;
}
}
}
protected function readBuffer ()
{
$read = @fread($this->_socket, 65535);
// AMI never returns EOF
if ($read === false ) {
$this->_errorException('Error reading');
}
// Do not return empty Messages
while ($read == "" ) {
$read = @fread($this->_socket, 65535);
}
// Add read to the rest of buffer from previous read
$this->_ProcessingMessage .= $read;
$this->getMessages();
}
protected function getMessages()
{
$msgs = array();
// Extract any complete messages and leave remainder for next read
while (($marker = strpos($this->_ProcessingMessage, aminterface\Message::EOM))) {
$msg = substr($this->_ProcessingMessage, 0, $marker);
$this->_ProcessingMessage = substr(
$this->_ProcessingMessage,
$marker + strlen(aminterface\Message::EOM)
);
$msgs[] = $msg;
}
$this->process($msgs);
}
public function process(array $msgs)
{
foreach ($msgs as $aMsg) {
// 2 types of message; Response or Event. Response only incudes data
// for JSON response and Command response. All other responses expect
// data in an event list - these events need to be attached to the response.
$resPos = strpos($aMsg, 'Response: '); // Have a Response message. This may not be 0.
$evePos = strpos($aMsg, 'Event: '); // Have an Event Message. This should always be 0.
// Add the incoming message to a string that can be checked
// against the completed message event when it is received.
$this->_incomingRawMessage[$this->_lastActionId] .= "\r\n\r\n" . $aMsg;
if (($resPos !== false) && (($resPos < $evePos) || $evePos === false)) {
$response = $this->_responseObjFromMsg($aMsg); // resp Ok
$this->eventListEndEvent = $response->getKey('eventlistendevent');
$this->_incomingMsgObjectList[$this->_lastActionId] = $response;
$this->eventListIsCompleted[$this->_lastActionId] = $response->isComplete();
} elseif ($evePos === 0) { // Event must be at the start of the msg.
$event = $this->_eventObjFromMsg($aMsg); // Event Ok
$this->eventListIsCompleted[$this->_lastActionId] = $event->isComplete();
$this->_incomingMsgObjectList[$this->_lastActionId]->addEvent($event);
} else {
// broken ami most probably through changes in chan_sccp_b.
// AMI is sending a message which is neither a response nor an event.
$this->_msgToDebug(1, 'resp broken ami');
$bMsg = 'Event: ResponseEvent' . "\r\n";
$bMsg .= 'ActionId: ' . $this->_lastActionId . "\r\n" . $aMsg;
$event = $this->_eventObjFromMsg($bMsg);
$this->_incomingMsgObjectList[$this->_lastActionId]->addEvent($event);
}
}
}
private function _msgToDebug($level, $msg)
{
if ($level > $this->debug_level) {
return;
}
print_r('<br> level: '.$level.' ');
print_r($msg);
print_r('<br>');
}
private function _responseObjFromMsg($message)
{
$_className = false;
$responseClass = '\\FreePBX\\modules\\Sccp_manager\\aminterface\\Generic_Response';
if ($this->_lastRequestedResponseHandler != false) {
$_className = '\\FreePBX\\modules\\Sccp_manager\\aminterface\\' . $this->_lastRequestedResponseHandler . '_Response';
}
if ($_className) {
if (class_exists($_className, true)) {
$responseClass = $_className;
} elseif ($responseHandler != false) {
$this->_errorException('Response Class ' . $_className . ' requested via responseHandler, could not be found');
}
}
$response = new $responseClass($message);
$actionId = $response->getActionID();
if ($actionId === null) {
$response->setActionId($this->_lastActionId);
}
return $response;
}
public function _eventObjFromMsg($message)
{
$eventType = explode(aminterface\Message::EOL,$message,2);
$name = trim(explode(':',$eventType[0],2)[1]);
$className = '\\FreePBX\\modules\\Sccp_manager\\aminterface\\' . $name . '_Event';
if (class_exists($className, true) === false) {
$className = '\\FreePBX\\modules\\Sccp_manager\\aminterface\\UnknownEvent';
}
return new $className($message);
}
protected function dispatch($message)
{
print_r("<br>------------dispatch----------<br>");
print_r($message);
return false;
die();
foreach ($this->_eventListeners as $data) {
$listener = $data[0];
$predicate = $data[1];
print_r($data);
if (is_callable($predicate) && !call_user_func($predicate, $message)) {
continue;
}
if ($listener instanceof \Closure) {
$listener($message);
} elseif (is_array($listener)) {
$listener[0]->$listener[1]($message);
} else {
$listener->handle($message);
}
}
print_r("<br>------------E dispatch----------<br>");
}
//-------------------Adaptive Function ------------------------------------------------------------
function core_list_hints()
{
$result = array();
if ($this->_connect_state) {
$_action = new \FreePBX\modules\Sccp_manager\aminterface\ExtensionStateListAction();
$_response = $this->send($_action);
$_res = $_response->getResult();
foreach ($_res as $key => $value) {
foreach ($value as $key2 => $value2) {
$result[$key2] = '@' . $key2;
}
}
}
return $result;
}
function core_list_all_hints()
{
$result = array();
if ($this->_connect_state) {
$_action = new \FreePBX\modules\Sccp_manager\aminterface\ExtensionStateListAction();
$_res = $this->send($_action)->getResult();
foreach ($_res as $key => $value) {
foreach ($value as $key2 => $value2) {
$result[$key.'@'.$key2] = $key.'@'.$key2;
}
}
}
return $result;
}
// --------------------- SCCP Comands
function sccp_list_keysets()
{
$result = array();
if ($this->_connect_state) {
$_action = new \FreePBX\modules\Sccp_manager\aminterface\SCCPShowSoftkeySetsAction();
$_res = $this->send($_action)->getResult();
foreach ($_res as $key => $value) {
$result[$key] = $key;
}
}
return $result;
}
function sccp_get_active_device()
{
$result = array();
if ($this->_connect_state) {
$_action = new \FreePBX\modules\Sccp_manager\aminterface\SCCPShowDevicesAction();
$result = (array)$this->send($_action)->getResult();
}
return $result;
}
function sccp_getdevice_info($devicename)
{
$result = array();
if ($this->_connect_state) {
$_action = new \FreePBX\modules\Sccp_manager\aminterface\SCCPShowDeviceAction($devicename);
$result = $this->send($_action)->getResult();
$result['MAC_Address'] = $result['macaddress'];
}
return $result;
}
function sccpDeviceReset($devicename, $action = '')
{
if ($this->_connect_state) {
if ($action == 'tokenack') {
$_action = new \FreePBX\modules\Sccp_manager\aminterface\SCCPTokenAckAction($devicename);
} else {
$_action = new \FreePBX\modules\Sccp_manager\aminterface\SCCPDeviceRestartAction($devicename, $action);
}
$_response = $this->send($_action);
$result['data'] = 'Device: '.$devicename.' Result: '.$_response->getMessage();
$result['Response']=$_response->getKey('Response');
}
return $result;
}
//------------------- Core Comands ----
function core_sccp_reload()
{
$result = array();
if ($this->_connect_state) {
$_action = new \FreePBX\modules\Sccp_manager\aminterface\ReloadAction('chan_sccp');
$result = ['Response' => $this->send($_action)->getMessage(), 'data' => ''];
}
return $result;
}
function getSCCPConfigMetaData($segment = '') {
if ($this->_connect_state) {
$_action = new \FreePBX\modules\Sccp_manager\aminterface\SCCPConfigMetaDataAction($segment);
$metadata = $this->send($_action)->getResult();
}
return $metadata;
}
function getSCCPVersion()
{
//Initialise result array
$result = array( 'RevisionHash' => '', 'vCode' => 0, 'RevisionNum' => 0, 'buildInfo' => '', 'Version' => 0);
$metadata = $this->getSCCPConfigMetaData();
if (isset($metadata['Version'])) {
$result['Version'] = $metadata['Version'];
$version_parts = array_map('intval',explode('.', $metadata['Version']));
if ($version_parts[0] === 4) {
switch ($version_parts[1]) {
case 1:
$result['vCode'] = 410;
break;
case 2:
$result['vCode'] = 420;
break;
case 3:
$result['vCode'] = 430;
if($version_parts[2] >= 3){
$result['vCode'] = 433;
}
break;
default:
$result['vCode'] = 400;
break;
}
}
if (array_key_exists("RevisionHash", $metadata)) {
$result['RevisionHash'] = $metadata["RevisionHash"];
}
if (isset($metadata['RevisionNum'])) {
if ($metadata['RevisionNum'] >= 11063) { // new method, RevisionNum is incremental
$result['vCode'] = 433;
}
$result['RevisionNum'] = $metadata["RevisionNum"];
}
if (isset($metadata['ConfigureEnabled'])) {
$result['buildInfo'] = $metadata['ConfigureEnabled'];
}
}
return $result;
}
function getRealTimeStatus()
{
// Initialise array with default values to eliminate testing later
$result = array();
$cmd_res = array();
$cmd_res = ['sccp' => ['message' => 'legacy value', 'realm' => '', 'status' => 'ERROR']];
if ($this->_connect_state) {
$_action = new \FreePBX\modules\Sccp_manager\aminterface\CommandAction('realtime mysql status');
$result = $this->send($_action)->getResult();
}
if (is_array($result['Output'])) {
foreach ($result['Output'] as $aline) {
if (strlen($aline) > 3) {
$temp_strings = explode(' ', $aline);
$cmd_res_key = $temp_strings[0];
foreach ($temp_strings as $test_string) {
if (strpos($test_string, '@')) {
$this_realm = $test_string;
break;
}
}
$cmd_res[$cmd_res_key] = array('message' => $aline, 'realm' => $this_realm, 'status' => strpos($aline, 'connected') ? 'OK' : 'ERROR');
}
}
}
return $cmd_res;
}
public function get_compatible_sccp($revNumComp=false) {
// only called with args from installer to get revision and compatibility
$res = $this->getSCCPVersion();
if ($res['RevisionNum'] < 11063) {
$this->useAmiInterface = false;
}
if ($revNumComp) {
return array($res['vCode'], true);
}
return $res['vCode'];
}
}

View file

@ -1,450 +0,0 @@
<?php
/**
*
* Core Comsnd Interface
*
*
*/
namespace FreePBX\modules\Sccp_manager;
class dbinterface
{
private $val_null = 'NONE'; /// REPLACE to null Field
public function __construct($parent_class = null)
{
$this->paren_class = $parent_class;
$this->db = \FreePBX::Database();
}
public function info()
{
$Ver = '14.0.0.1'; // This should be updated
return array('Version' => $Ver,
'about' => 'Data access interface ver: ' . $Ver);
}
/*
* Core Access Function
*/
public function get_db_SccpTableByID($dataid, $data = array(), $indexField = '')
{
$result = array();
$raw = $this->getSccpDeviceTableData($dataid, $data);
if (empty($raw) || empty($indexField)) {
return $raw;
}
foreach ($raw as $value) {
$id = $value[$indexField];
$result[$id] = $value;
}
return $result;
}
public function getSccpDeviceTableData(string $dataid, $data = array())
{
// $stmt is a single row fetch, $stmts is a fetchAll while stmtU is fetchAll UNIQUE
$stmt = '';
$stmts = '';
$stmtU = '';
switch ($dataid) {
case 'extGrid':
// only called by getExtensionGrid from hardware.extension.php view
$stmts = $this->db->prepare("SELECT sccpline.name, sccpline.label, sccpbuttonconfig.ref AS mac, '-|-' AS line_status
FROM sccpline LEFT JOIN sccpbuttonconfig
ON sccpline.name = TRIM(TRAILING '!silent' FROM sccpbuttonconfig.name) ORDER BY sccpline.name");
break;
case 'SccpExtension':
if (empty($data['name'])) {
$stmtU = $this->db->prepare('SELECT name, sccpline.* FROM sccpline ORDER BY name');
} else {
$stmts = $this->db->prepare('SELECT * FROM sccpline WHERE name = :name');
$stmts->bindParam(':name', $data['name'],\PDO::PARAM_STR);
}
break;
case 'phoneGrid':
switch ($data['type']) {
case "cisco-sip":
$stmts = $this->db->prepare("SELECT name, type, button, addon, description, 'not connected' AS status, '- -' AS address, 'N' AS new_hw
FROM sccpdeviceconfig WHERE type LIKE '%-sip' ORDER BY name");
break;
case "sccp": // Fall through to default intentionally
default:
$stmts = $this->db->prepare("SELECT name, type, button, addon, description, 'not connected' AS status, '- -' AS address, 'N' AS new_hw
FROM sccpdeviceconfig WHERE type not LIKE '%-sip' ORDER BY name");
break;
}
break;
case 'SccpDevice':
if (empty($data['fields'])) {
$fld = 'name, name as mac, type, button, addon, description';
} else {
switch ($data['fields']) {
case "all":
$fld ='*';
break;
case "sip_ext":
$fld ='button as sip_lines, description as description, addon';
break;
default:
$fld = $data['fields'];
break;
}
}
if (!empty($data['name'])) { //either filter by name or by type
$stmt = $this->db->prepare('SELECT ' . $fld . ' FROM sccpdeviceconfig WHERE name = :name ORDER BY name');
$stmt->bindParam(':name', $data['name'],\PDO::PARAM_STR);
} elseif (!empty($data['type'])) {
switch ($data['type']) {
case "cisco-sip":
$stmts = $this->db->prepare("SELECT {$fld} FROM sccpdeviceconfig WHERE TYPE LIKE '%-sip' ORDER BY name");
break;
case "cisco": // Fall through to default intentionally
default:
$stmts = $this->db->prepare("SELECT {$fld} FROM sccpdeviceconfig WHERE TYPE not LIKE '%-sip' ORDER BY name");
break;
}
} else { //no filter and no name provided - return all
$stmts = $this->db->prepare("SELECT {$fld} FROM sccpdeviceconfig ORDER BY name");
}
break;
case 'get_columns_sccpdevice':
$stmtU = $this->db->prepare('DESCRIBE sccpdevice');
break;
case 'get_columns_sccpuser':
$stmts = $this->db->prepare('DESCRIBE sccpuser');
break;
case 'get_columns_sccpline':
$stmtU = $this->db->prepare('DESCRIBE sccpline');
break;
case 'get_sccpdevice_byid':
$stmt = $this->db->prepare('SELECT t1.*, types.dns, types.buttons, types.loadimage, types.nametemplate as nametemplate,
addon.buttons as addon_buttons FROM sccpdevice AS t1
LEFT JOIN sccpdevmodel as types ON t1.type=types.model
LEFT JOIN sccpdevmodel as addon ON t1.addon=addon.model WHERE name = :name');
$stmt->bindParam(':name', $data['id'],\PDO::PARAM_STR);
break;
case 'get_sccpuser':
$stmt = $this->db->prepare('SELECT * FROM sccpuser WHERE name = :name');
$stmt->bindParam(':name', $data['id'],\PDO::PARAM_STR);
break;
case 'getAssignedExtensions':
// all extensions that are designed as default lines
$stmtU = $this->db->prepare("SELECT DISTINCT name, name FROM sccpbuttonconfig WHERE buttontype = 'line' AND instance =1");
break;
case 'getDefaultLine':
$stmt = $this->db->prepare("SELECT name FROM sccpbuttonconfig WHERE ref = '{$data['id']}' and instance =1 and buttontype = 'line'");
break;
case 'get_sccpdevice_buttons':
$sql = '';
if (!empty($data['buttontype'])) {
$sql .= 'buttontype = :buttontype';
}
if (!empty($data['id'])) {
$sql .= (empty($sql)) ? 'ref = :ref' : ' and ref = :ref';
}
if (!empty($sql)) {
$stmts = $this->db->prepare("SELECT * FROM sccpbuttonconfig WHERE {$sql} ORDER BY instance");
// Now bind labels - only bind label if it exists or bind will create exception.
// can only bind once have prepared, so need to test again.
if (!empty($data['buttontype'])) {
$stmts->bindParam(':buttontype', $data['buttontype'],\PDO::PARAM_STR);
}
if (!empty($data['id'])) {
$stmts->bindParam(':ref', $data['id'],\PDO::PARAM_STR);
}
} else {
$raw_settings = array();
}
break;
// No default case so will give exception of $raw_settings undefined if the
// dataid is not in the switch.
}
if (!empty($stmt)) {
$stmt->execute();
$raw_settings = $stmt->fetch(\PDO::FETCH_ASSOC);
} elseif (!empty($stmts)) {
$stmts->execute();
$raw_settings = $stmts->fetchAll(\PDO::FETCH_ASSOC);
} elseif (!empty($stmtU)) {
//returns an assoc array indexed on first field
$stmtU->execute();
$raw_settings = $stmtU->fetchAll(\PDO::FETCH_ASSOC|\PDO::FETCH_UNIQUE);
}
return $raw_settings;
}
public function get_db_SccpSetting()
{
$stmt = $this->db->prepare('SELECT keyword, sccpsettings.* FROM sccpsettings ORDER BY type, seq');
$stmt->execute();
$settingsFromDb = $stmt->fetchAll(\PDO::FETCH_ASSOC|\PDO::FETCH_UNIQUE);
return $settingsFromDb;
}
public function get_db_sysvalues()
{
$stmt = $this->db->prepare('SHOW VARIABLES LIKE \'%group_concat%\'');
$stmt->execute();
return $stmt->fetch(\PDO::FETCH_ASSOC);
}
/*
* Get Sccp Device Model information
*/
function getDb_model_info($get = 'all', $format_list = 'all', $filter = array())
{
$sel_inf = '*, 0 as validate';
if ($format_list === 'model') {
$sel_inf = "model, vendor, dns, buttons, '-;-' as validate";
}
switch ($get) {
case 'byciscoid':
if (!empty($filter)) {
if (!empty($filter['model'])) {
if (!strpos($filter['model'], 'loadInformation')) {
$filter['model'] = 'loadInformation' . $filter['model'];
}
$stmt = $this->db->prepare("SELECT {$sel_inf} FROM sccpdevmodel WHERE (loadinformationid = :model ) ORDER BY model");
$stmt->bindParam(':model', $filter['model'], \PDO::PARAM_STR);
} else {
$stmt = $this->db->prepare("SELECT {$sel_inf} FROM sccpdevmodel ORDER BY model");
}
break;
}
break;
case 'byid':
if (!empty($filter)) {
if (!empty($filter['model'])) {
$stmt = $this->db->prepare("SELECT {$sel_inf} FROM sccpdevmodel WHERE model = :model ORDER BY model");
$stmt->bindParam(':model', $filter['model'],\PDO::PARAM_STR);
} else {
$stmt = $this->db->prepare("SELECT {$sel_inf} FROM sccpdevmodel ORDER BY model");
}
break;
}
break;
case 'extension':
$stmt = $this->db->prepare("SELECT {$sel_inf} FROM sccpdevmodel WHERE (dns = 0) and (enabled = 1) ORDER BY model");
break;
case 'enabled':
//$stmt = $db->prepare('SELECT ' . {$sel_inf} . ' FROM sccpdevmodel WHERE enabled = 1 ORDER BY model'); //previously this fell through to phones.
//break; // above includes expansion modules but was not original behaviour so commented out. Falls through to phones.
case 'phones':
$stmt = $this->db->prepare("SELECT {$sel_inf} FROM sccpdevmodel WHERE (dns != 0) and (enabled = 1) ORDER BY model");
break;
case 'ciscophones':
$stmt = $this->db->prepare("SELECT {$sel_inf} FROM sccpdevmodel WHERE (dns > 0) and (enabled = 1) AND vendor NOT LIKE '%-sip' ORDER BY model");
break;
case 'sipphones':
$stmt = $this->db->prepare("SELECT {$sel_inf} FROM sccpdevmodel WHERE (dns > 0) and (enabled = 1) AND vendor LIKE '%-sip' ORDER BY model");
break;
case 'all': // Fall through to default
default:
$stmt = $this->db->prepare("SELECT {$sel_inf} FROM sccpdevmodel ORDER BY model");
break;
}
$stmt->execute();
return $stmt->fetchAll(\PDO::FETCH_ASSOC);
}
function write($table_name = "", $save_value = array(), $mode = 'update', $key_fld = "", $hwid = "")
{
// mode clear - Empty table before update
// mode update - update / replace record
$result = false;
switch ($table_name) {
case 'sccpsettings':
if ($mode == 'replace') { // Change mode name to be more transparent
$this->db->prepare('TRUNCATE sccpsettings')->execute();
$stmt = $this->db->prepare('INSERT INTO sccpsettings (keyword, data, seq, type, systemdefault) VALUES (:keyword,:data,:seq,:type,:systemdefault)');
} else {
$stmt = $this->db->prepare('REPLACE INTO sccpsettings (keyword, seq, type, data, systemdefault) VALUES (:keyword,:seq,:type,:data,:systemdefault)');
}
foreach ($save_value as $key => $dataArr) {
if (empty($dataArr)) {
continue;
}
$stmt->bindParam(':keyword',$dataArr['keyword'],\PDO::PARAM_STR);
$stmt->bindParam(':data',$dataArr['data'],\PDO::PARAM_STR);
$stmt->bindParam(':seq',$dataArr['seq'],\PDO::PARAM_INT);
$stmt->bindParam(':type',$dataArr['type'],\PDO::PARAM_INT);
$stmt->bindParam(':systemdefault',$dataArr['systemdefault'],\PDO::PARAM_STR);
$result = $stmt->execute();
}
break;
case 'sccpdevmodel': // Fall through to next intentionally
case 'sccpdevice': // Fall through to next intentionally
case 'sccpuser':
$sql_key = "";
$sql_var = "";
foreach ($save_value as $key_v => $data) {
if (!empty($sql_var)) {
$sql_var .= ', ';
}
if ($data === $this->val_null) {
$sql_var .= $key_v . '= NULL';
} else {
$sql_var .= $key_v . ' = \'' . $data . '\''; //quote data as normally is string
}
if ($key_v === $key_fld) {
$sql_key = $key_v . ' = \'' . $data . '\''; //quote data as normally is string
}
}
if (!empty($sql_var)) {
switch ($mode) {
case 'delete':
$stmt = $this->db->prepare("DELETE FROM {$table_name} WHERE {$sql_key}");
break;
case 'update':
$stmt = $this->db->prepare("UPDATE {$table_name} SET {$sql_var} WHERE {$sql_key}");
break;
case 'replace':
$stmt = $this->db->prepare("REPLACE INTO {$table_name} SET {$sql_var}");
break;
// no default mode - must be explicit.
}
}
$result = $stmt->execute();
break;
case 'sccpbuttons':
switch ($mode) {
case 'delete':
$sql = 'DELETE FROM sccpbuttonconfig WHERE ref = :hwid';
$stmt = $this->db->prepare($sql);
$stmt->bindParam(':hwid', $hwid,\PDO::PARAM_STR);
$result = $stmt->execute();
break;
case 'replace':
foreach ($save_value as $button_array) {
$stmt = $this->db->prepare('UPDATE sccpbuttonconfig SET name =:name WHERE ref = :ref AND reftype =:reftype AND instance = :instance AND buttontype = :buttontype AND options = :options');
$stmt->bindParam(':ref', $button_array['ref'],\PDO::PARAM_STR);
$stmt->bindParam(':reftype', $button_array['reftype'],\PDO::PARAM_STR);
$stmt->bindParam(':instance', $button_array['instance'],\PDO::PARAM_INT);
$stmt->bindParam(':buttontype', $button_array['buttontype'],\PDO::PARAM_STR);
$stmt->bindParam(':name', $button_array['name'],\PDO::PARAM_STR);
$stmt->bindParam(':options', $button_array['options'],\PDO::PARAM_STR);
$result= $stmt->execute();
}
break;
case 'add':
foreach ($save_value as $button_array) {
$stmt = $this->db->prepare("INSERT INTO sccpbuttonconfig SET ref = :ref, reftype = :reftype, instance = :instance, buttontype = :buttontype, name = :name, options = :options");
$stmt->bindParam(':ref', $button_array['ref'],\PDO::PARAM_STR);
$stmt->bindParam(':reftype', $button_array['reftype'],\PDO::PARAM_STR);
$stmt->bindParam(':instance', $button_array['instance'],\PDO::PARAM_INT);
$stmt->bindParam(':buttontype', $button_array['buttontype'],\PDO::PARAM_STR);
$stmt->bindParam(':name', $button_array['name'],\PDO::PARAM_STR);
$stmt->bindParam(':options', $button_array['options'],\PDO::PARAM_STR);
$result = $stmt->execute();
}
break;
case 'clear';
// Clear is equivalent of delete + insert. Mode is used in order to activate trigger.
$this->write('sccpbuttons', '', $mode = 'delete','', $hwid);
$this->write('sccpbuttons', $save_value, $mode = 'add','', $hwid);
break;
// No default case - must be specific in request.
}
}
return $result;
}
//******** Get SIP settings *******
public function getSipTableData(string $dataid, $line='') {
global $db;
$tech = array();
switch ($dataid) {
case "DeviceById":
// TODO: This needs to be rewritten
$stmt = $this->db->prepare("SELECT keyword,data FROM sip WHERE id = '${line}'");
$stmt->execute();
$tech = $stmt->fetchAll(\PDO::FETCH_COLUMN | \PDO::FETCH_GROUP);
foreach ($tech as &$value) {
$value = $value[0];
}
return $tech;
case "extensionList";
$stmt = $this->db->prepare("SELECT id as name, data as label FROM sip WHERE keyword = 'callerid' order by name");
$stmt->execute();
$result = $stmt->fetchAll(\PDO::FETCH_ASSOC);
/*
foreach ($result as $value) {
if (empty($tech[$value['id']]['id'])) {
$tech[$value['id']]['id']= $value['id'];
}
$tech[$value['id']][$value['keyword']]=$value['data'];
}
*/
return $result;
}
}
/*
* Maybe Replace by SccpTables ??!
*
*/
public function dump_sccp_tables($data_path, $database, $user, $pass)
{
$filename = $data_path.'/sccp_backup_'.date('G_a_m_d_y').'.sql';
$result = exec('mysqldump '.$database.' --password='.$pass.' --user='.$user.' --single-transaction >'.$filename, $output);
return $filename;
}
public function updateTableDefaults($table, $field, $value) {
$stmt = $this->db->prepare("ALTER TABLE {$table} ALTER COLUMN {$field} SET DEFAULT '{$value}'");
$stmt->execute();
}
/*
* Check Table structure
*/
public function validate()
{
$result = 0;
$check_fields = [
'431' => ['private'=> "enum('on','off')"],
'433' => ['directed_pickup'=>'']
];
$stmt = $this->db->prepare('DESCRIBE sccpdevice');
$stmt->execute();
foreach ($stmt->fetchAll(\PDO::FETCH_ASSOC) as $value) {
$id_result[$value['Field']] = $value['Type'];
}
foreach ($check_fields as $key => $value) {
if (!empty(array_intersect_assoc($value, $id_result))) {
$result = $key;
} else {
// no match but maybe checking against an empty string so just need to check key does not exist
foreach ($value as $skey => $svalue) {
if (empty($svalue) && (!isset($id_result[$skey]))) {
$result = $key;
}
}
}
}
return $result;
}
public function getNamedGroup($callGroup) {
$sql = "SELECT {$callGroup} FROM sccpline GROUP BY {$callGroup}";
$sth = $this->db->prepare($sql);
$result = array();
$tech = array();
try {
$sth->execute();
$result = $sth->fetchAll();
foreach($result as $val) {
$tech[$callGroup][] = $val[0];
}
} catch(\Exception $e) {}
return $tech;
}
}

View file

@ -1,455 +0,0 @@
<?php
namespace FreePBX\modules\Sccp_manager;
class extconfigs
{
public function __construct($parent_class = null)
{
$this->paren_class = $parent_class;
}
public function info() {
$Ver = '13.2.0';
return array('Version' => $Ver,
'about' => 'Default Settings and Enums ver: ' . $Ver);
}
public function getExtConfig($id = '', $index = '') {
$result = array();
switch ($id) {
case 'keyset':
$result = $this->keysetdefault;
break;
case 'sccp_lang':
if (empty($index)) {
return $this->cisco_language; // return language array
} elseif (!empty($this->cisco_language[$index])) {
return $this->cisco_language[$index]; // return the matched value
}
break;
case 'sccpDefaults':
$result = $this->sccpDefaults;
break;
case 'sccp_timezone': // Sccp manager: 1303; server_info: 122
$result = array();
if (empty($index)) {
return array('offset' => '00', 'daylight' => '', 'cisco_code' => 'Greenwich Standard Time');
}
//See if DST is used in this TZ. Test if DST setting is different at
//various future intervals. If dst changes, this TZ uses dst
$usesDaylight = false;
$haveDstNow = date('I');
$futureDateArray = array(2,4,6,8);
foreach ($futureDateArray as $numMonths) {
$futureDate = (new \DateTime(null,new \DateTimeZone($index)))->modify("+{$numMonths} months");
if ($futureDate->format('I') != $haveDstNow) {
$usesDaylight = true;
break;
};
}
$thisTzOffset = (new \DateTime(null, new \DateTimeZone($index)))->getOffset();
// Now look for a match in cisco_tz_array based on offset and DST
// First correct offset if we have DST now as cisco offsets are
// based on non dst offsets
$tmpOffset = $thisTzOffset / 60;
if ($haveDstNow) {
$tmpOffset = $tmpOffset - 60;
}
foreach ($this->cisco_timezone as $key => $value) {
if (($value['offset'] == $tmpOffset) and ( $value['daylight'] == $usesDaylight )) {
// This code may not be the one typically used, but it has the correct values.
$cisco_code = $key . ' Standard' . (($usesDaylight) ? '/Daylight' : '') . ' Time';
$this->sccpvalues['tzoffset']['data'] = $tmpOffset;
return array('offset' => $tmpOffset, 'daylight' => ($usesDaylight) ? 'Daylight' : '', 'cisco_code' => $cisco_code);
break;
}
}
return array('offset' => '00', 'daylight' => '', 'cisco_code' => 'Greenwich Standard Time');
break;
default:
return array('noId');
break;
}
if (empty($index)) {
return $result;
} else {
if (isset($result[$index])) {
return $result[$index];
} else {
return array();
}
}
}
private function get_cisco_time_zone($tzc)
{
$tzdata = $this->cisco_timezone[$tzc];
$cisco_code = $tzc . ' Standard' . (($tzdata['daylight']) ? '/Daylight' : '') . ' Time';
return array('offset' => $tzdata['offset'], 'daylight' => $tzdata['daylight'], 'cisco_code' => $cisco_code);
}
private $sccpDefaults = array(
'servername' => 'VPBXSCCP',
'bindaddr' => '0.0.0.0', "port" => '2000', # chan_sccp also supports ipv6
'deny' => '0.0.0.0/0.0.0.0',
'permit' => '0.0.0.0/0.0.0.0', # !TODO!: please change this to 'internal' which would mean:
'dateformat' => 'D.M.Y',
'disallow' => 'all', "allow" => 'alaw;ulaw',
'hotline_enabled' => 'off',
'hotline_context' => 'default', # !TODO!: Should this not be from-internal on FreePBX ?
'hotline_extension' => '*60', # !TODO!: Is this a good default extension to dial for hotline ?
'hotline_label' => 'hotline',
'devicetable' => 'sccpdevice',
'linetable' => 'sccpline',
'displayconfig' => 'sccpgeneral',
'_dev_sshPassword' => 'cisco',
'_dev_sshUserId' => 'cisco',
'dev_deviceProtocol' => 'SCCP',
'dev_idleTimeout' => '60',
'ntp_config_enabled' => 'off',
'ntp_server' => 'pool.ntp.org',
'ntp_server_mode' => 'unicast',
'devlang' => 'English_United_States',
'dev_authenticationURL' => '',
'dev_informationURL' => '',
'dev_messagesURL' => '',
'dev_servicesURL' => '',
'dev_directoryURL' => '',
'dev_idleURL' => '',
'dev_secureauthenticationURL' => '',
'dev_secureinformationURL' => '',
'dev_securemessagesURL' => '',
'dev_secureservicesURL' => '',
'dev_securedirectoryURL' => '',
'dev_secureidleURL' => '',
'dev_proxyServerURL' => ''
);
private $keysetdefault = array('onhook' => 'redial,newcall,cfwdall,cfwdbusy,cfwdnoanswer,pickup,gpickup,dnd,private',
'connected' => 'hold,endcall,park,vidmode,select,cfwdall,cfwdbusy,idivert,monitor',
'onhold' => 'resume,newcall,endcall,transfer,conflist,select,dirtrfr,idivert,meetme',
'ringin' => 'answer,endcall,transvm,idivert',
'offhook' => 'redial,endcall,private,cfwdall,cfwdbusy,cfwdnoanswer,pickup,gpickup,meetme,barg',
'conntrans' => 'hold,endcall,transfer,conf,park,select,dirtrfr,monitor,vidmode,meetme,cfwdal',
'digitsfoll' => 'back,endcall,dial',
'connconf' => 'conflist,newcall,endcall,hold,vidmode,monitor',
'ringout' => 'empty,endcall,transfer',
'offhookfeat' => 'resume,newcall,endcall',
'onhint' => 'redial,newcall,pickup,gpickup',
'onstealable' => 'redial,newcall,barge,intrcpt,cfwdall,pickup,gpickup,dnd',
'holdconf' => 'resume,newcall,endcall,join',
'uriaction' => 'default');
// Cisco Language Code / Directory
//
private $cisco_language = array('ar_SA' => array('code' => 'ar', 'language' => 'Arabic', 'locale' => 'Arabic_Saudi_Arabia', 'codepage' => 'ISO8859-1'),
'bg_BG' => array('code' => 'bg', 'language' => 'Bulgarian', 'locale' => 'Bulgarian_Bulgaria', 'codepage' => 'ISO8859-1'),
'cz_CZ' => array('code' => 'cz', 'language' => 'Czech', 'locale' => 'Czech_Czech_Republic', 'codepage' => 'ISO8859-1'),
'da_DK' => array('code' => 'da', 'language' => 'Danish', 'locale' => 'Danish_Denmark', 'codepage' => 'ISO8859-1'),
'de_DE' => array('code' => 'de', 'language' => 'German', 'locale' => 'German_Germany', 'codepage' => 'ISO8859-1'),
'el_GR' => array('code' => 'el', 'language' => 'Greek', 'locale' => 'Greek_Greece', 'codepage' => 'ISO8859-1'),
'en_AU' => array('code' => 'en', 'language' => 'English', 'locale' => 'AU_English_United_States', 'codepage' => 'ISO8859-1'),
'en_GB' => array('code' => 'en', 'language' => 'English', 'locale' => 'English_United_Kingdom', 'codepage' => 'ISO8859-1'),
'en_US' => array('code' => 'en', 'language' => 'English', 'locale' => 'English_United_States', 'codepage' => 'ISO8859-1'),
'es_ES' => array('code' => 'es', 'language' => 'Spanish', 'locale' => 'Spanish_Spain', 'codepage' => 'ISO8859-1'),
'et_EE' => array('code' => 'et', 'language' => 'Estonian', 'locale' => 'Estonian_Estonia', 'codepage' => 'ISO8859-1'),
'fi_FI' => array('code' => 'fi', 'language' => 'Finnish', 'locale' => 'Finnish_Finland', 'codepage' => 'ISO8859-1'),
'fr_CA' => array('code' => 'fr', 'language' => 'French', 'locale' => 'French_Canada', 'codepage' => 'ISO8859-1'),
'fr_FR' => array('code' => 'fr', 'language' => 'French', 'locale' => 'French_France', 'codepage' => 'ISO8859-1'),
'he_IL' => array('code' => 'he', 'language' => 'Hebrew', 'locale' => 'Hebrew_Israel', 'codepage' => 'ISO8859-1'),
'hr_HR' => array('code' => 'hr', 'language' => 'Croatian', 'locale' => 'Croatian_Croatia', 'codepage' => 'ISO8859-1'),
'hu_HU' => array('code' => 'hu', 'language' => 'Hungarian', 'locale' => 'Hungarian_Hungary', 'codepage' => 'ISO8859-1'),
'it_IT' => array('code' => 'it', 'language' => 'Italian', 'locale' => 'Italian_Italy', 'codepage' => 'ISO8859-1'),
'ja_JP' => array('code' => 'ja', 'language' => 'Japanese', 'locale' => 'Japanese_Japan', 'codepage' => 'ISO8859-1'),
'ko_KO' => array('code' => 'ko', 'language' => 'Korean', 'locale' => 'Korean_Korea_Republic', 'codepage' => 'ISO8859-1'),
'lt_LT' => array('code' => 'lt', 'language' => 'Lithuanian', 'locale' => 'Lithuanian_Lithuania', 'codepage' => 'ISO8859-1'),
'lv_LV' => array('code' => 'lv', 'language' => 'Latvian', 'locale' => 'Latvian_Latvia', 'codepage' => 'ISO8859-1'),
'nl_NL' => array('code' => 'nl', 'language' => 'Dutch', 'locale' => 'Dutch_Netherlands', 'codepage' => 'ISO8859-1'),
'no_NO' => array('code' => 'no', 'language' => 'Norwegian', 'locale' => 'Norwegian_Norway', 'codepage' => 'ISO8859-1'),
'pl_PL' => array('code' => 'pl', 'language' => 'Polish', 'locale' => 'Polish_Poland', 'codepage' => 'ISO8859-1'),
'pt_BR' => array('code' => 'pt', 'language' => 'Portuguese', 'locale' => 'Portuguese_Brazil', 'codepage' => 'ISO8859-1'),
'pt_PT' => array('code' => 'pt', 'language' => 'Portuguese', 'locale' => 'Portuguese_Portugal', 'codepage' => 'ISO8859-1'),
'ro_RO' => array('code' => 'ro', 'language' => 'Romanian', 'locale' => 'Romanian_Romania', 'codepage' => 'ISO8859-1'),
'sk_SK' => array('code' => 'sk', 'language' => 'Slovakian', 'locale' => 'Slovak_Slovakia', 'codepage' => 'ISO8859-1'),
'sl_SL' => array('code' => 'sl', 'language' => 'Slovenian', 'locale' => 'Slovenian_Slovenia', 'codepage' => 'ISO8859-1'),
'sr_ME' => array('code' => 'sr', 'language' => 'Serbian', 'locale' => 'Serbian_Republic_of_Montenegro', 'codepage' => 'ISO8859-1'),
'sr_RS' => array('code' => 'rs', 'language' => 'Serbian', 'locale' => 'Serbian_Republic_of_Serbia', 'codepage' => 'ISO8859-1'),
'sv_SE' => array('code' => 'sv', 'language' => 'Swedish', 'locale' => 'Swedish_Sweden', 'codepage' => 'ISO8859-1'),
'th_TH' => array('code' => 'th', 'language' => 'Thailand', 'locale' => 'Thai_Thailand', 'codepage' => 'ISO8859-1'),
'tr_TR' => array('code' => 'tr', 'language' => 'Turkish', 'locale' => 'Turkish_Turkey', 'codepage' => 'ISO8859-1'),
'zh_CN' => array('code' => 'cn', 'language' => 'Chinese', 'locale' => 'Chinese_China', 'codepage' => 'ISO8859-1'),
'zh_TW' => array('code' => 'zh', 'language' => 'Chinese', 'locale' => 'Chinese_Taiwan', 'codepage' => 'ISO8859-1')
);
private $cisco_timezone = array(
'Dateline' => array('offset' => '-720', 'daylight' => false),
'Samoa' => array('offset' => '-660', 'daylight' => false),
'Hawaiian' => array('offset' => '-600', 'daylight' => false),
'Alaskan' => array('offset' => '-540', 'daylight' => true),
'Pacific' => array('offset' => '-480', 'daylight' => true),
'Mountain' => array('offset' => '-420', 'daylight' => true),
'US Mountain' => array('offset' => '-420', 'daylight' => false),
'Central' => array('offset' => '-360', 'daylight' => true),
'Mexico' => array('offset' => '-360', 'daylight' => true),
'Canada Central' => array('offset' => '-360', 'daylight' => false),
'SA Pacific' => array('offset' => '-300', 'daylight' => false),
'Eastern' => array('offset' => '-300', 'daylight' => true),
'US Eastern' => array('offset' => '-300', 'daylight' => false),
'Atlantic' => array('offset' => '-240', 'daylight' => true),
'SA Western' => array('offset' => '-240', 'daylight' => false),
'Pacific SA' => array('offset' => '-240', 'daylight' => false),
'Newfoundland' => array('offset' => '-210', 'daylight' => true),
'E. South America' => array('offset' => '-180', 'daylight' => true),
'SA Eastern' => array('offset' => '-180', 'daylight' => false),
'Pacific SA' => array('offset' => '-180', 'daylight' => true),
'Mid-Atlantic' => array('offset' => '-120', 'daylight' => true),
'Azores' => array('offset' => '-060', 'daylight' => true),
'GMT' => array('offset' => '00', 'daylight' => true),
'Greenwich' => array('offset' => '00', 'daylight' => false),
'W. Europe' => array('offset' => '60', 'daylight' => true),
'Central Europe' => array('offset' => '120', 'daylight' => true),
'South Africa' => array('offset' => '120', 'daylight' => false),
'Saudi Arabia' => array('offset' => '180', 'daylight' => false),
'Iran' => array('offset' => '210', 'daylight' => true),
'Caucasus' => array('offset' => '240', 'daylight' => true),
'Arabian' => array('offset' => '240', 'daylight' => false),
'Afghanistan' => array('offset' => '270', 'daylight' => false),
'West Asia' => array('offset' => '300', 'daylight' => false),
'India' => array('offset' => '330', 'daylight' => false),
'Central Asia' => array('offset' => '360', 'daylight' => false),
'SE Asia' => array('offset' => '420', 'daylight' => false),
'China' => array('offset' => '480', 'daylight' => false),
'Tokyo' => array('offset' => '540', 'daylight' => false),
'Cen. Australia' => array('offset' => '570', 'daylight' => true),
'AUS Central' => array('offset' => '570', 'daylight' => false),
'E. Australia' => array('offset' => '600', 'daylight' => false),
'AUS Eastern' => array('offset' => '600', 'daylight' => true),
'West Pacific' => array('offset' => '600', 'daylight' => false),
'Tasmania' => array('offset' => '600', 'daylight' => true),
'Central Pacific' => array('offset' => '660', 'daylight' => false),
'Fiji' => array('offset' => '720', 'daylight' => false),
'New Zealand' => array('offset' => '720', 'daylight' => true)
);
public function updateTftpStructure($settingsFromDb) {
global $amp_conf;
$adv_config = array('tftproot' => $settingsFromDb['tftp_path']['data'],
'firmware' => 'firmware',
'settings' => 'settings',
'locales' => 'locales',
'languages' => 'languages',
'templates' => 'templates',
'dialplan' => 'dialplan',
'softkey' => 'softkey',
'ringtones' => 'ringtones',
'wallpapers' => 'wallpapers',
'countries' => 'countries'
);
$adv_tree = array('pro' => array('templates' => 'tftproot',
'firmware' => 'tftproot',
'settings' => 'tftproot',
'locales' => 'tftproot',
'languages' => 'locales',
'templates' => 'tftproot',
'dialplan' => 'tftproot',
'softkey' => 'tftproot',
'ringtones' => 'tftproot',
'wallpapers' => 'tftproot',
'countries' => 'locales'
),
'def' => array('templates' => 'tftproot',
'firmware' => '',
'settings' => '',
'locales' => '',
'languages' => 'tftproot',
'dialplan' => '',
'softkey' => '',
'ringtones' => '',
'wallpapers' => '',
'countries' => ''
)
);
$base_tree = array('tftp_templates_path' => 'templates',
'tftp_firmware_path' => 'firmware',
'tftp_store_path' => 'settings',
'tftp_lang_path' => 'languages',
'tftp_dialplan_path' => 'dialplan',
'tftp_softkey_path' => 'softkey',
'tftp_ringtones_path' => 'ringtones',
'tftp_wallpapers_path' => 'wallpapers',
'tftp_countries_path' => 'countries'
);
$baseConfig = array();
if (empty($settingsFromDb['tftp_rewrite_path']['data'])) {
$settingsFromDb['tftp_rewrite_path']['data'] = $settingsFromDb['tftp_path']['data'];
} else {
// Have a setting in sccpsettings. It should start with $tftp_path
// If not we will replace it with $tftp_path. Avoids issues with legacy values
if (!strpos($settingsFromDb['tftp_rewrite_path']["data"],$settingsFromDb['tftp_path']['data'])) {
$settingsFromDb['tftp_rewrite_path']['data'] = $settingsFromDb['tftp_path']['data'];
}
}
$adv_ini = "{$settingsFromDb['tftp_rewrite_path']["data"]}/index.cnf";
$adv_tree_mode = 'def';
switch ($settingsFromDb['tftp_rewrite']['data']) {
case 'pro':
$adv_tree_mode = 'pro';
if (!empty($adv_ini) && file_exists($adv_ini)) {
$adv_ini_array = parse_ini_file($adv_ini);
$adv_config = array_merge($adv_config, $adv_ini_array);
}
// rewrite adv_ini to reflect the new $adv_config
if (file_exists($adv_ini)){
rename($adv_ini, "{$adv_ini}.old");
}
$indexFile = fopen($adv_ini,'w');
fwrite($indexFile, "[main]\n");
foreach ($adv_config as $advKey => $advVal) {
fwrite($indexFile, "{$advKey} = {$advVal}\n");
}
fclose($indexFile);
$settingsFromDb['tftp_rewrite']['data'] = 'pro';
break;
case 'on':
case 'internal':
case 'off':
default:
// not defined so set here to off
$settingsFromDb['tftp_rewrite']['data'] = 'off';
}
foreach ($adv_tree[$adv_tree_mode] as $key => $value) {
if (!empty($adv_config[$key])) {
if (!empty($value)) {
if (substr($adv_config[$key], 0, 1) != "/") {
$adv_config[$key] = $adv_config[$value] . '/' . $adv_config[$key];
}
} else {
$adv_config[$key] = $adv_config['tftproot'];
}
}
}
foreach ($base_tree as $key => $value) {
$baseConfig[$key] = $adv_config[$value];
if (!is_dir($baseConfig[$key])) {
if (!mkdir($baseConfig[$key], 0755, true)) {
die_freepbx(_("Error creating dir: $baseConfig[$key]"));
}
}
}
// Set up tftproot/settings so that can test if mapping is Enabled and configured.
if (!is_dir("{$settingsFromDb['tftp_path']['data']}/settings")) {
if (!mkdir("{$settingsFromDb['tftp_path']['data']}/settings", 0755, true)) {
die_freepbx(_("Error creating dir: {$settingsFromDb['tftp_path']['data']}/settings"));
}
}
// TODO: Need to add index.cnf, after setting defaults correctly
if (!file_exists("{$baseConfig['tftp_templates_path']}/XMLDefault.cnf.xml_template")) {
$src_path = $amp_conf['AMPWEBROOT'] . '/admin/modules/sccp_manager/conf/';
$dst_path = "{$baseConfig["tftp_templates_path"]}/";
foreach (glob("{$src_path}*.*_template") as $filename) {
copy($filename, $dst_path . basename($filename));
}
}
foreach ($baseConfig as $baseKey => $baseValue) {
$settingsFromDb[$baseKey] = array('keyword' => $baseKey, 'seq' => 20, 'type' => 0, 'data' => $baseValue, 'systemdefault' => '');
}
return $settingsFromDb;
}
public function validate_RealTime( $connector )
{
// This method only checks that asterisk is correctly configured for Realtime
// It is preventative and does not change anything for Sccp_manager
global $amp_conf;
$res = array();
/* if (empty($connector)) {
$connector = 'sccp';
}
$cnf_int = \FreePBX::Config();
$cnf_wr = \FreePBX::WriteConfig();
*/
$cnf_read = \FreePBX::LoadConfig();
// We are running inside FreePBX so must use the same database
$def_config = array('sccpdevice' => 'mysql,' . $amp_conf['AMPDBNAME'] . ',sccpdeviceconfig', 'sccpline' => 'mysql,' . $amp_conf['AMPDBNAME'] . ',sccplineconfig');
$backup_ext = array('_custom.conf', '.conf', '_additional.conf');
$def_bd_config = array('dbhost' => $amp_conf['AMPDBHOST'], 'dbname' => $amp_conf['AMPDBNAME'],
'dbuser' => $amp_conf['AMPDBUSER'], 'dbpass' => $amp_conf['AMPDBPASS'],
'dbport' => '3306', 'dbsock' => '/var/lib/mysql/mysql.sock'
);
$dir = $amp_conf['ASTETCDIR'];
$res_conf_sql = ini_get('pdo_mysql.default_socket');
$res_conf = '';
$ext_conf = '';
foreach ($backup_ext as $fext) {
if (file_exists($dir . '/extconfig' . $fext)) {
$ext_conf = $cnf_read->getConfig('extconfig' . $fext);
if (!empty($ext_conf['settings']['sccpdevice'])) {
if ($ext_conf['settings']['sccpdevice'] === $def_config['sccpdevice']) {
$res['sccpdevice'] = 'OK';
$res['extconfigfile'] = 'extconfig' . $fext;
} else {
$res['sccpdevice'] .= ' Error in line sccpdevice ';
}
}
if (!empty($ext_conf['settings']['sccpline'])) {
if ($ext_conf['settings']['sccpline'] === $def_config['sccpline']) {
$res['sccpline'] = 'OK';
} else {
$res['sccpline'] .= ' Error in line sccpline ';
}
}
}
}
$res['extconfig'] = 'OK';
if (empty($res['sccpdevice'])) {
$res['extconfig'] = ' Option "Sccpdevice" is not configured ';
}
if (empty($res['sccpline'])) {
$res['extconfig'] = ' Option "Sccpline" is not configured ';
}
if (empty($res['extconfigfile'])) {
$res['extconfig'] = 'File extconfig.conf does not exist';
}
if (!empty($res_conf_sql)) {
if (file_exists($res_conf_sql)) {
$def_bd_config['dbsock'] = $res_conf_sql;
}
}
// Check for mysql config files - should only be one depending on version
$mySqlConfigFiles = [ 'res_mysql.conf', 'res_config_mysql.conf' ];
foreach ($mySqlConfigFiles as $sqlConfigFile) {
if (file_exists( $dir . '/' . $sqlConfigFile )) {
$res_conf = $cnf_read->getConfig($sqlConfigFile);
if (empty($res_conf[$connector])) {
$res['mysqlconfig'] = 'Config not found in file: ' . $sqlConfigFile;
} else {
if ($res_conf[$connector]['dbsock'] != $def_bd_config['dbsock']) {
$res['mysqlconfig'] = 'Mysql Socket Error in file: ' . $sqlConfigFile;
}
}
if (empty($res['mysqlconfig'])) {
$res['mysqlconfig'] = 'OK';
}
}
}
if (empty($res['mysqlconfig'])) {
$res['mysqlconfig'] = 'Realtime Error: neither res_config_mysql.conf nor res_mysql.conf found in the path : ' . $dir;
}
return $res;
}
}

File diff suppressed because it is too large Load diff

View file

@ -1,835 +0,0 @@
<?php
/**
*
* Core Comsnd Interface
*
*
*/
/* !TODO!: -TODO-: Would you like to use my XSD file to check if the provided template file is a correct cisco cnf.xml file ?
* !TODO!: -TODO-: I just don't understand how to use it here.. To check the incoming pattern ? To check the result of my script ?
* !TODO!: -TODO-: The most correct variant is to generate xml based on XSD template.
*/
namespace FreePBX\modules\Sccp_manager;
class xmlinterface
{
use \FreePBX\modules\Sccp_Manager\sccpManTraits\helperFunctions;
private $val_null = 'NONE'; /// REPLACE to null Field
public function __construct($parent_class = null)
{
$this->paren_class = $parent_class;
$this->langCodeArray = array(
'Arabic_Saudi_Arabia' => 'ar',
'Bulgarian_Bulgaria' => 'bg',
'Czech_Czech_Republic' => 'cz',
'Danish_Denmark' => 'da',
'German_Germany' => 'de',
'Greek_Greece' => 'el',
'AU_English_United_States' => 'en',
'English_United_Kingdom' => 'en',
'English_United_States' => 'en',
'Spanish_Spain' => 'es',
'Estonian_Estonia' => 'et',
'Finnish_Finland' => 'fi',
'French_Canada' => 'fr',
'French_France' => 'fr',
'Hebrew_Israel' => 'he',
'Croatian_Croatia' => 'hr',
'Hungarian_Hungary' => 'hu',
'Italian_Italy' => 'it',
'Japanese_Japan' => 'ja',
'Korean_Korea_Republic' => 'ko',
'Lithuanian_Lithuania' => 'lt',
'Latvian_Latvia' => 'lv',
'Dutch_Netherlands' => 'nl',
'Norwegian_Norway' => 'no',
'Polish_Poland' => 'pl',
'Portuguese_Brazil' => 'pt',
'Portuguese_Portugal' => 'pt',
'Romanian_Romania' => 'ro',
'Russian_Russian_Federation' => 'ru',
'Slovak_Slovakia' => 'sk',
'Slovenian_Slovenia' => 'sl',
'Serbian_Republic_of_Montenegro' => 'sr',
'Serbian_Republic_of_Serbia' => 'rs',
'Swedish_Sweden' => 'sv',
'Thai_Thailand' => 'th',
'Turkish_Turkey' => 'tr',
'Chinese_China' => 'cn',
'Chinese_Taiwan' => 'zh'
);
}
public function info()
{
$Ver = '13.0.6';
return array('Version' => $Ver,
'about' => 'Create XML data interface ver: ' . $Ver);
}
function create_default_XML($store_path = '', $data_values = array(), $model_information = array(), $lang_info = array())
{
$data_path = $data_values['tftp_path'];
if (empty($store_path) || empty($data_path) || empty($data_values)) {
return;
}
$def_xml_fields = array('authenticationURL', 'informationURL', 'messagesURL', 'servicesURL', 'directoryURL',
'secureauthenticationURL', 'secureinformationURL', 'securemessagesURL', 'secureservicesURL', 'securedirectoryURL', 'secureidleURL',
'proxyServerURL', 'idleTimeout', 'idleURL');
$def_xml_locale = array('userLocale', 'networkLocaleInfo', 'networkLocale');
$xml_name = $store_path . '/XMLDefault.cnf.xml';
$xml_template = $data_values['tftp_path'] . '/templates/XMLDefault.cnf.xml_template';
if (file_exists($xml_template)) {
$xml_work = simplexml_load_file($xml_template);
$xnode = &$xml_work->callManagerGroup->members;
$bind_tmp = $this->get_server_sccp_bind($data_values);
//error_log("bind_tmp:".print_r($bind_tmp, true), 0);
$ifc = 0;
foreach ($bind_tmp as $bind_value) {
$xnode_obj = clone $xnode->member;
$xnode_obj['priority'] = $ifc;
$xnode_obj->callManager->name = $data_values['servername'];
$xnode_obj->callManager->ports->ethernetPhonePort = $bind_value['port'];
$xnode_obj->callManager->processNodeName = $bind_value['ip'];
if ($ifc === 0) {
$this->replaceSimpleXmlNode($xnode->member, $xnode_obj);
} else {
$this->appendSimpleXmlNode($xnode->member, $xnode_obj);
}
$ifc++;
}
$this->replaceSimpleXmlNode($xml_work->callManagerGroup->members, $xnode);
foreach ($def_xml_fields as $value) {
if (!empty($data_values['dev_' . $value])) {
$xml_work->$value = trim($data_values['dev_' . $value]);
} else {
$node = $xml_work->$value;
if (!empty($node)) {
unset($node[0][0]);
}
}
}
foreach ($def_xml_locale as $key) {
if (!empty($xml_work->$key)) {
$xnode = &$xml_work->$key;
switch ($key) {
case 'userLocale':
case 'networkLocaleInfo':
if ($key == 'networkLocaleInfo') {
$lang = $data_values['netlang'];
} else {
$lang = $data_values['devlang'];
}
if (isset($lang_info[$lang])) {
$xnode->name = $lang_info[$lang]['locale'];
$xnode->langCode = $lang_info[$lang]['code'];
} else {
$xnode->name = '';
$xnode->langCode = '';
}
break;
case 'networkLocale':
$lang = $data_values['netlang'];
if (isset($lang_info[$lang])) {
$xnode = $lang_info[$lang]['language'];
} else {
$xnode = '';
}
break;
}
}
}
foreach ($model_information as $var) {
if (!empty($var['loadinformationid'])) {
$node = $xml_work->addChild($var['loadinformationid'], $var['loadimage']);
$node->addAttribute('model', $var['vendor'] . ' ' . $var['model']);
}
}
$this->saveXml($xml_work, $xml_name); // Save XMLDefault1.cnf.xml
}
}
function create_SEP_XML($store_path, $data_values, $dev_config, $dev_id, $lang_info = array())
{
// TODO: $data_values are system wide defaults, $dev_config are specific device values.
// Need to merge the two arrays so that device specific values override system values
$data_values = array_merge($data_values, $dev_config);
$var_xml_general_fields = array('authenticationurl' => 'dev_authenticationURL', 'informationurl' => 'dev_informationURL', 'messagesurl' => 'dev_messagesURL',
'servicesurl' => 'dev_servicesURL', 'directoryurl' => 'dev_directoryURL', 'idleurl' => 'dev_idleURL',
'secureauthenticationurl' => 'dev_secureauthenticationURL',
'secureinformationurl' => 'dev_secureinformationURL', 'securemessagesurl'=>'dev_securemessagesURL',
'secureservicesurl'=>'dev_secureservicesURL', 'securedirectoryurl'=>'dev_securedirectoryURL', 'secureidleurl' => 'dev_secureidleURL',
'proxyserverurl' => 'dev_proxyServerURL', 'idletimeout' => 'dev_idleTimeout',
'sshuserid' => 'dev_sshUserId', 'sshpassword' => 'dev_sshPassword', 'deviceprotocol' => 'dev_deviceProtocol',
'phonepersonalization' => 'phonepersonalization'
);
$var_xml_general_vars = array('capfAuthMode' => 'null', 'capfList' => 'null', 'mobility' => 'null',
'phoneServices' => 'null', 'certHash' => 'null',
'deviceSecurityMode' => '1');
$data_path = $dev_config['tftp_templates_path'];
if (empty($data_path)) {
die('Create_SEP_XML tftp_templates_path not defined');
}
$store_path = $dev_config['tftp_store_path'];
if (empty($store_path)) {
die('Create_SEP_XML tftp_store_path not defined');
}
if (!empty($dev_config['nametemplate'])) {
$xml_template = "{$data_path}/{$dev_config['nametemplate']}";
} else {
$xml_template = "{$data_path}/templates/SEP0000000000.cnf.xml_79df_template";
}
$xml_name = "{$store_path}/{$dev_id}.cnf.xml";
if (!file_exists($xml_template)) {
die('Error Hardware template :' . $xml_template . ' not found');
}
$xml_work = simplexml_load_file($xml_template);
foreach ($var_xml_general_vars as $key => $data) {
if (isset($xml_work->$key)) {
if ($data != 'null') {
$xml_work->$key = $data;
} else {
$node = $xml_work->$key;
unset($node[0][0]);
}
}
}
foreach ($xml_work as $key => $data) {
// Set System global Values
$key_l = strtolower($key);
if (!empty($var_xml_general_fields[$key_l])) {
$xml_work->$key = $data_values[$var_xml_general_fields[$key_l]];
}
// Set section Values
$xml_node = $xml_work->$key;
switch ($key_l) {
case 'devicepool':
$xml_node = $xml_work->$key;
foreach ($xml_work->$key->children() as $dkey => $ddata) {
switch (strtolower($dkey)) {
case 'datetimesetting':
$xnode = &$xml_node->$dkey;
$tz_id = $data_values['ntp_timezone'];
$TZdata = $data_values['ntp_timezone_id'];
if (empty($TZdata)) {
$TZdata = array('offset' => '0', 'daylight' => '', 'cisco_code' => 'Greenwich Standard Time');
}
$xnode->name = $tz_id;
$xnode->dateTemplate = $data_values['dateformat'];
$xnode->timeZone = $TZdata['cisco_code'];
// $xnode->timeZone = $tz_id.' Standard'.((empty($TZdata['daylight']))? '': '/'.$TZdata['daylight']).' Time';
if ($data_values['ntp_config_enabled'] == 'on') {
$xnode->ntps->ntp->name = $data_values['ntp_server'];
$xnode->ntps->ntp->ntpMode = $data_values['ntp_server_mode'];
} else {
$xnode->ntps = null;
}
// Ntp Config
break;
case 'srstinfo':
if ($data_values['srst_Option'] == 'user') {
break;
}
$xnode = &$xml_node->$dkey;
$xnode->name = $data_values['srst_Name'];
$xnode->srstOption = $data_values['srst_Option'];
$xnode->userModifiable = $data_values['srst_userModifiable'];
$xnode->isSecure = $data_values['srst_isSecure'];
// srst addresses are now stored as json;
$srst_addrs = $this->convertCsvToArray($data_values['srst_ip']);
//Now have an array of srst addresses - maybe empty
foreach ($srst_addrs as $netKey => $netValue) {
$nodeName = "ipAddr${netKey}";
$xnode->$nodeName = $netValue['ip'];
$nodeName = "port${netKey}";
$xnode->$nodeName = $netValue['port'];
}
break;
case 'connectionmonitorduration':
$xml_node->$dkey = strval(intval(intval($data_values['keepalive']) * 0.75));
break;
case 'callmanagergroup':
$xnode = &$xml_node->$dkey->members;
$bind_tmp = $this->get_server_sccp_bind($data_values);
$ifc = 0;
foreach ($bind_tmp as $bind_value) {
$xnode_obj = clone $xnode->member;
$xnode_obj['priority'] = $ifc;
$xnode_obj->callManager->name = $data_values['servername'];
if (!is_null($xnode_obj->callManager->description)) {
$xnode_obj->callManager->description = $data_values['servername'];
}
$xnode_obj->callManager->ports->ethernetPhonePort = $bind_value['port'];
$xnode_obj->callManager->processNodeName = $bind_value['ip'];
if (!empty($xnode_obj->callManager->ports->mgcpPorts)) {
unset($xnode_obj->callManager->ports->mgcpPorts);
}
if ($ifc === 0) {
$this->replaceSimpleXmlNode($xnode->member, $xnode_obj);
} else {
$this->appendSimpleXmlNode($xnode->member, $xnode_obj);
}
$ifc++;
}
}
}
$this->replaceSimpleXmlNode($xml_work->$key, $xml_node);
break;
case 'vendorconfig':
$xml_node = $xml_work->$key;
foreach ($xml_work->$key->children() as $dkey => $ddata) {
if (isset($data_values[strtolower($dkey)])) {
$vtmp_data = $data_values[strtolower($dkey)];
if (!empty($vtmp_data)) {
switch ($vtmp_data) {
case 'off':
$xml_node->$dkey = 1;
break;
case 'on':
$xml_node->$dkey = 0;
break;
default:
$xml_node->$dkey = $vtmp_data;
break;
}
}
}
}
$this->replaceSimpleXmlNode($xml_work->$key, $xml_node);
break;
case 'versionstamp':
$xml_work->$key = time();
break;
case 'loadinformation':
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"] : '';
}
if (!empty($dev_config['addon'])) {
$xnode = $xml_work->addChild('addOnModules');
$ti = 1;
$hw_addon = explode(';', $dev_config['addon']);
foreach ($hw_addon as $add_key) {
if (!empty($dev_config['addon_info'][$dev_config['addon']])) {
$add_val = $dev_config['addon_info'][$dev_config['addon']];
$xnode_obj = $xnode->addChild('addOnModule');
$xnode_obj->addAttribute('idx', $ti);
$xnode_obj->addChild('loadInformation', $add_val);
$ti++;
}
}
}
break;
case 'commonprofile':
$xml_node->phonePassword = $data_values['dev_sshPassword'];
$xml_node->backgroundImageAccess = (($data_values['backgroundImageAccess'] == 'on') || ($data_values['backgroundImageAccess'] == 'true') ) ? 'true' : 'false';
$xml_node->callLogBlfEnabled = $data_values['callLogBlfEnabled'];
break;
case 'userlocale':
// Device language
$lang = $data_values['devlang'];
if (!empty($dev_config['devlang'])) {
$lang = $dev_config['devlang'];
}
$xml_node->winCharSet = $dev_config['phonecodepage'];
$xml_node->name = $dev_config['devlang'];
$xml_node->langCode = 'en';
if (isset($this->langCodeArray[$dev_config['devlang']])) {
$xml_node->langCode = $this->langCodeArray[$dev_config['devlang']];
}
$this->replaceSimpleXmlNode($xml_work->$key, $xml_node);
break;
case 'networklocale':
$lang = $data_values['netlang'];
if (!empty($dev_config['netlang'])) {
$lang = $dev_config['netlang'];
}
if (isset($lang)) {
$xml_work->$key = $lang;
$this->replaceSimpleXmlNode($xml_work->$key, $xml_node);
} else {
$xml_work->$key = '';
}
break;
case 'networklocaleinfo':
$lang = $data_values['netlang'];
if (!empty($dev_config['netlang'])) {
$lang = $dev_config['netlang'];
}
if (isset($lang)) {
$xml_node->name = $lang;
$this->replaceSimpleXmlNode($xml_work->$key, $xml_node);
} else {
$xml_work->$key = '';
}
break;
default:
break;
}
}
$this->saveXml($xml_work, $xml_name); // Save
return time();
}
private function get_server_sccp_bind($data_values = array())
{
$res = array();
if ($data_values['bindaddr'] !== '0.0.0.0') {
$rkey = $data_values['bindaddr'];
$res[$rkey] = array('ip' => $data_values['bindaddr'], 'port' => $data_values['port']);
return $res;
}
$ip_fill = true;
if (!empty($data_values['ccm_address'])) {
// ccm_address is json from sccpsettings
$ccm_address = $this->convertCsvToArray($data_values['ccm_address'], true);
// This is a sanitised list of ipaddresses and ports
foreach ($ccm_address as $netValue) {
$res[$netValue['ip']] = $netValue;
}
}
if ($ip_fill) {
foreach ($data_values['server_if_list'] as $value) {
if (!empty($value['ip'])) {
if (!in_array($value['ip'], array('0.0.0.0', '127.0.0.1'), true)) {
$rkey = $value['ip'];
$res[$rkey] = array('ip' => $rkey, 'port' => $data_values['port']);
}
}
}
}
if (!empty($data_values['externhost'])) {
$rkey = $data_values['externhost'];
if (!in_array($rkey, array('0.0.0.0', '127.0.0.1', 'localhost'), true)) {
$res[$rkey] = array('ip' => $rkey, 'port' => $data_values['port']);
}
} else {
if (!empty($data_values['externip'])) {
$rkey = $data_values['externip'];
if (!in_array($rkey, array('0.0.0.0', '127.0.0.1'), true)) {
$res[$rkey] = array('ip' => $rkey, 'port' => $data_values['port']);
}
}
}
return $res;
}
function create_SEP_SIP_XML($store_path = '', $data_values = array(), $dev_config = array(), $dev_id = '', $lang_info = array())
{
$var_xml_general_fields = array('authenticationURL' => 'dev_authenticationURL', 'informationURL' => 'dev_informationURL', 'messagesURL' => 'dev_messagesURL',
'servicesURL' => 'dev_servicesURL', 'directoryURL' => 'dev_directoryURL', 'proxyServerURL' => 'dev_proxyServerURL', 'idleTimeout' => 'dev_idleTimeout',
'idleURL' => 'dev_idleURL', 'sshUserId' => 'dev_sshUserId', 'sshPassword' => 'dev_sshPassword',
'phonePersonalization' => 'phonepersonalization'
);
$var_xml_sipProfile = array('phoneLabel' => 'description',
'transferOnhookEnabled' => 'transferOnhookEnabled', 'enableVad' => 'enableVad', 'voipControlPort' => 'sipport'
);
$var_xml_sipline = array('name' => 'account', 'featureLabel' => 'account', 'displayName' => 'callerid', 'contact' => 'account',
'authName' => 'account', 'authPassword' => 'secret');
$var_xml_general_vars = array('capfAuthMode' => 'null', 'capfList' => 'null', 'mobility' => 'null',
'phoneServices' => 'null', 'certHash' => 'null', 'deviceProtocol' => 'SIP',
'deviceSecurityMode' => '1');
// $var_hw_config = $this->dbinterface->getSccpDeviceTableData("get_sccpdevice_byid", array('id' => $dev_id));
if (empty($dev_config)) {
return false;
}
$data_path = $dev_config['tftp_path'];
if (empty($store_path) || empty($data_path) || empty($data_values) || empty($dev_id)) {
return;
}
if (!empty($dev_config['nametemplate'])) {
$xml_template = $data_path . '/templates/' . $dev_config['nametemplate'];
if (!file_exists($xml_template)) {
$xml_template = $data_path . '/templates/SEP0000000000.cnf.xml_79df_sip_template';
}
} else {
$xml_template = $data_path . '/templates/SEP0000000000.cnf.xml_79df_sip_template';
}
$xml_name = $store_path . '/' . $dev_id . '.cnf.xml';
$sip_bind = $data_values['sbind'];
$bind_proto = 'tcp';
$bind_ip_def = '';
foreach ($sip_bind as $key => $value) {
if (empty($bind_ip_def)) {
$bind_ip_def = $key;
$bind_proto = (isset($value['tcp'])) ? 'tcp' : 'udp';
}
}
if (file_exists($xml_template)) {
$xml_work = simplexml_load_file($xml_template);
foreach ($var_xml_general_vars as $key => $data) {
if (isset($xml_work->$key)) {
if ($data != 'null') {
$xml_work->$key = $data;
} else {
$node = $xml_work->$key;
unset($node[0][0]);
}
}
}
foreach ($xml_work as $key => $data) {
// Set System global Values
if (!empty($var_xml_general_fields[$key])) {
$xml_work->$key = $data_values[$var_xml_general_fields[$key]];
}
// Set section Values
$xml_node = $xml_work->$key;
switch ($key) {
case 'devicePool':
$xml_node = $xml_work->$key;
foreach ($xml_work->$key->children() as $dkey => $ddata) {
switch ($dkey) {
case 'dateTimeSetting':
$xnode = &$xml_node->$dkey;
$tz_id = $data_values['ntp_timezone'];
$TZdata = $data_values['ntp_timezone_id'];
if (empty($TZdata)) {
$TZdata = array('offset' => '0', 'daylight' => '', 'cisco_code' => 'Greenwich Standard Time');
}
$xnode->dateTemplate = $data_values['dateformat'];
$xnode->timeZone = $TZdata['cisco_code'];
if ($data_values['ntp_config_enabled'] == 'on') {
$xnode->ntps->ntp->name = $data_values['ntp_server'];
$xnode->ntps->ntp->ntpMode = $data_values['ntp_server_mode'];
} else {
$xnode->ntps = null;
}
// Ntp Config
break;
case 'callManagerGroup':
$xnode = &$xml_node->$dkey->members;
$ifc = 0;
foreach ($sip_bind as $bind_ip => $bind_value) {
$xnode_obj = clone $xnode->member;
$xnode_obj['priority'] = $ifc;
$xnode_obj->callManager->name = $data_values['servername'];
$xnode_obj->callManager->ports->sipPort = $bind_value[$bind_proto];
// $xnode_obj->callManager->ports->securedSipPort = $bind_value['tlsport'];
$xnode_obj->callManager->processNodeName = $bind_ip;
if ($ifc === 0) {
$this->replaceSimpleXmlNode($xnode->member, $xnode_obj);
} else {
$this->appendSimpleXmlNode($xnode->member, $xnode_obj);
}
$ifc++;
}
}
}
$this->replaceSimpleXmlNode($xml_work->$key, $xml_node);
break;
case 'sipProfile':
$xml_node = $xml_work->$key;
foreach ($xml_work->$key->children() as $dkey => $ddata) {
if (!empty($var_xml_sipProfile[$dkey])) {
if (!empty($data_values[$var_xml_sipProfile[$dkey]])) {
$xml_node->$dkey = $data_values[$var_xml_sipProfile[$dkey]];
} else {
$xml_node->$dkey = null;
}
}
switch ($dkey) {
case 'sipProxies':
$xnode = &$xml_node->$dkey;
$xnode->backupProxy = $bind_ip_def;
$xnode->backupProxyPort = $sip_bind[$bind_ip_def][$bind_proto];
$xnode->emergencyProxy = $bind_proto;
$xnode->emergencyProxyPort = $sip_bind[$bind_ip_def][$bind_proto];
$xnode->outboundProxy = $bind_proto;
$xnode->outboundProxyPort = $sip_bind[$bind_ip_def][$bind_proto];
$xnode->registerWithProxy = "true";
break;
case 'sipLines':
$xnode = &$xml_node->$dkey;
$ifc = 0;
if (!empty($data_values['siplines'])) {
foreach ($data_values['siplines'] as $spkey => $spvalue) {
// if $spvalue[]
$xnode_obj = clone $xnode->line;
$xnode_obj['button'] = $ifc + 1;
$xnode_obj['lineIndex'] = $ifc + 1;
//$xnode_obj->proxy = $data_values['bindaddr'];
$xnode_obj->featureID = "9";
if ($xnode_obj->proxy != 'USECALLMANAGER') {
$xnode_obj->proxy = $bind_proto;
$xnode_obj->port = $sip_bind[$bind_ip_def][$bind_proto];
}
foreach ($var_xml_sipline as $line_key => $line_val) {
$xnode_obj->$line_key = $spvalue[$line_val];
}
if ($ifc === 0) {
$this->replaceSimpleXmlNode($xnode->line, $xnode_obj);
} else {
$this->appendSimpleXmlNode($xnode->line, $xnode_obj);
}
$ifc++;
}
}
if (!empty($data_values['speeddial'])) {
foreach ($data_values['speeddial'] as $spkey => $spvalue) {
$xmlstr = '<line button="' . ($ifc + 1) . '"> <featureID>22</featureID>'
. '<featureLabel>' . $spvalue["name"] . '</featureLabel>'
. '<speedDialNumber>' . $spvalue["dial"] . '</speedDialNumber>'
. '<contact>' . $spvalue["dial"] . '</contact> <retrievalPrefix /></line>';
$xnode_obj = simplexml_load_string($xmlstr);
$this->appendSimpleXmlNode($xnode->line, $xnode_obj);
$ifc++;
}
}
break;
case 'softKeyFile':
case 'dialTemplate': // Доработать !
$xml_ext_file = '';
$template_path = (($dkey == 'softKeyFile') ? $dev_config['tftp_softkey_path'] : $dev_config['tftp_dialplan_path']);
$tmp_key = ($dkey == 'softKeyFile') ? 'softkeyset' : '_dialrules';
if (!empty($dev_config[$tmp_key])) {
$xml_ext_file = (($dkey == 'softKeyFile') ? 'softkey' . $dev_config[$tmp_key] . '.xml' : $dev_config[$tmp_key] . '.xml');
}
if (empty($xml_ext_file) || !file_exists($template_path . '/' . $xml_ext_file)) {
$xml_ext_file = (($dkey == 'softKeyFile') ? 'softkeydefault.xml' : 'dialplan.xml');
}
if (file_exists($template_path . '/' . $xml_ext_file)) {
$xml_node->$dkey = $xml_ext_file;
} else {
$xml_node->$dkey = null;
}
break;
}
}
$this->replaceSimpleXmlNode($xml_work->$key, $xml_node);
break;
case 'versionStamp':
$xml_work->$key = time();
break;
case 'loadInformation':
// 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"] : '';
}
if (!empty($dev_config['addon'])) {
$xnode = $xml_work->addChild('addOnModules');
$ti = 1;
$hw_addon = explode(';', $dev_config['addon']);
foreach ($hw_addon as $add_key) {
if (!empty($dev_config['addon_info'][$dev_config['addon']])) {
$add_val = $dev_config['addon_info'][$dev_config['addon']];
$xnode_obj = $xnode->addChild('addOnModule');
$xnode_obj->addAttribute('idx', $ti);
$xnode_obj->addChild('loadInformation', $add_val);
$ti++;
}
}
}
break;
case 'commonProfile':
$xml_node->phonePassword = $data_values['dev_sshPassword'];
$xml_node->backgroundImageAccess = (($data_values['backgroundImageAccess'] == 'on') || ($data_values['backgroundImageAccess'] == 'true') ) ? 'true' : 'false';
$xml_node->callLogBlfEnabled = $data_values['callLogBlfEnabled'];
break;
case 'userlocale':
// Device language
$lang = $data_values['devlang'];
if (!empty($dev_config['devlang'])) {
$lang = $dev_config['devlang'];
}
$xml_node->winCharSet = $dev_config['phonecodepage'];
$xml_node->name = $dev_config['devlang'];
$xml_node->langCode = 'en';
if (isset($this->langCodeArray['devlang'])) {
$xml_node->langCode = $this->langCodeArray['devlang'];
}
$this->replaceSimpleXmlNode($xml_work->$key, $xml_node);
break;
case 'networklocale':
$lang = $data_values['netlang'];
if (!empty($dev_config['netlang'])) {
$lang = $dev_config['netlang'];
}
if (isset($lang)) {
$xml_work->$key = $lang;
$this->replaceSimpleXmlNode($xml_work->$key, $xml_node);
} else {
$xml_work->$key = '';
}
break;
case 'networklocaleinfo':
$lang = $data_values['netlang'];
if (!empty($dev_config['netlang'])) {
$lang = $dev_config['netlang'];
}
if (isset($lang)) {
$xml_node->name = $lang;
$this->replaceSimpleXmlNode($xml_work->$key, $xml_node);
} else {
$xml_work->$key = '';
}
break;
default:
break;
}
}
$this->saveXml($xml_work, $xml_name); // Save
} else {
die('Error Hardware template :' . $xml_template . ' not found');
}
return time();
}
function saveDialPlan($confDir, $get_settings)
{
$xmlstr = "<DIALTEMPLATE>\n";
$xmlstr .= "<versionStamp>" . time() . "</versionStamp>\n";
$dialFelds = array('match', 'timeout', 'rewrite', 'tone'); //str -to lo !
$hdr_prefix = 'sccp_dial_';
$hdr_arprefix = 'sccp_dial-ar_';
$save_data = array();
$integer_msg = _("%s must be a non-negative integer");
$errors = array();
foreach ($get_settings[$hdr_arprefix . 'dialtemplate'] as $key => $value) {
$xmlstr .= '<TEMPLATE';
if (!empty($value['match'])) {
foreach ($dialFelds as $fld) {
if (isset($value[$fld])) {
if ($value[$fld] == 'empty' || $value[$fld] == '') {
} else {
$xmlstr .= ' ' . $fld . '="' . (string) $value[$fld] . '"';
}
}
}
} else {
$errors = array('Fields need to match !!');
}
$xmlstr .= "/>\n";
}
$xmlstr .= '</DIALTEMPLATE>';
if (!empty($get_settings['idtemplate'])) {
if ($get_settings['idtemplate'] == '*new*') {
if (!empty($get_settings[$hdr_prefix . 'dialtemplate_name'])) {
$put_file = (string) $get_settings[$hdr_prefix . 'dialtemplate_name'];
} else {
$errors = array('Fields Dial Plan Name is requered !!');
}
} else {
$put_file = (string) $get_settings['idtemplate'];
}
} else {
$errors = array('Fields Dial Plan Name is required !!');
}
if (empty($errors)) {
$put_file = str_replace(array("\n", "\r", "\t", "/", "\\", ".", ","), '', $put_file);
$file = $confDir . '/dial' . $put_file . '.xml';
file_put_contents($file, $xmlstr);
}
return $errors;
}
function create_xmlSoftkeyset($config, $confDir, $name)
{
if (empty($config[$name])) {
if ($name == 'default') {
$typeSoft = $confDir["tftp_templates_path"] . '/SIPDefaultSoftKey.xml_template';
if (file_exists($typeSoft)) {
$file = $confDir["tftp_softkey_path"] . '/softkey' . $name . '.xml';
if (!copy($typeSoft, $file)) {
return array('error' => 'Access error' . $name);
}
}
return array();
} else {
return array('error' => 'Invalid softkey Name' . $name);
}
}
$errors = array();
$xmlstr = "<softKeyCfg>\n";
$xmlstr .= "<versionStamp>" . time() . "</versionStamp>\n";
$typeSoft = $confDir["tftp_templates_path"] . '/SIPTypeSoftKey.xml_template';
$read_soft = "";
if (file_exists($typeSoft)) {
$f_read = fopen($typeSoft, 'r');
while (!feof($f_read)) {
$read_soft .= fread($f_read, 8192);
}
fclose($f_read);
}
$xmlstr .= $read_soft;
$xmlstr .= " <softKeySets>\n";
foreach ($config[$name] as $key => $value) {
$xmlstr .= ' <softKeySet id="' . $key . '">' . "\n";
foreach (explode(",", $value) as $keyvalue) {
$xmlstr .= ' <softKey keyID="' . $keyvalue . '" />' . "\n";
}
$xmlstr .= " </softKeySet>\n";
}
$xmlstr .= " </softKeySets>\n";
$xmlstr .= '</softKeyCfg>';
if (empty($errors)) {
$file = $confDir["tftp_softkey_path"] . '/softkey' . $name . '.xml';
file_put_contents($file, $xmlstr);
}
return $errors;
}
private function replaceSimpleXmlNode($xml, $element = SimpleXMLElement)
{
$dom = dom_import_simplexml($xml);
$import = $dom->ownerDocument->importNode(
dom_import_simplexml($element),
true
);
$dom->parentNode->replaceChild($import, $dom);
}
private function appendSimpleXmlNode($xml, $element = SimpleXMLElement)
{
$dom = dom_import_simplexml($xml);
$import = $dom->ownerDocument->importNode(
dom_import_simplexml($element),
true
);
$dom->parentNode->appendChild($import->cloneNode(true));
}
}

View file

@ -1,788 +0,0 @@
<?php
namespace FreePBX\modules\Sccp_manager\sccpManTraits;
trait ajaxHelper {
public function ajaxRequest($req, &$setting) {
// Called first by BMO. Must return true or request will be aborted.
// See https://wiki.freepbx.org/display/FOP/BMO+Ajax+Calls
switch ($req) {
case 'backupsettings':
case 'savesettings':
case 'save_device':
case 'save_sip_device':
case 'save_ruser':
case 'save_dialplan_template':
case 'delete_hardware':
case 'getPhoneGrid':
case 'getExtensionGrid':
case 'getDeviceModel':
case 'getUserGrid':
case 'getSoftKey':
case 'getDialTemplate':
case 'get_ext_files':
case 'create_hw_tftp':
case 'reset_dev':
case 'reset_token':
case 'model_enabled':
case 'model_disabled':
case 'model_update':
case 'model_add':
case 'model_delete':
case 'update_button_label':
case 'updateSoftKey':
case 'deleteSoftKey':
case 'delete_dialplan':
return true;
break;
case 'validateMac':
return true;
break;
default:
return false;
}
}
// ajaxHandler is called after ajaxRequest returns true
public function ajaxHandler() {
$request = $_REQUEST;
$msg = array();
$cmd_id = $request['command'];
switch ($cmd_id) {
case 'savesettings':
// Consolidate this into a separate method to improve legibility
$this->handleSubmit($request);
// TODO: Need to be more specific on reload and only reload if critical settings changed.
$res = $this->aminterface->core_sccp_reload();
return array('status' => true, 'message' => 'Data saved', 'reload' => true, 'toastFlag' => 'success', 'search' => '?display=sccpsettings', 'hash' => '');
break;
case 'save_sip_device':
case 'save_device':
return $this->saveSccpDevice($request);
break;
case 'save_ruser':
//$res = $request;
$res = $this->handleRoamingUsers($request);
return array('status' => true, 'search' => '?display=sccp_phone', 'hash' => 'general');
break;
case 'save_dialplan_template':
/* !TODO!: -TODO-: dialplan templates should be removed (only required for very old devices (like ATA) */
// ------------------------------- Old + Sip device support - In the development---
$res = $this->saveDialPlan($request);
//public
if (empty($res)) {
return array('status' => true, 'search' => '?display=sccp_adv', 'hash' => 'sccpdialplan');
} else {
return array('status' => false, 'message' => print_r($res));
}
break;
case 'delete_dialplan':
if (!empty($request['dialplan'])) {
$get_file = $request['dialplan'];
$res = $this->deleteDialPlan($get_file);
return array('status' => true, 'message' => 'Dial Template has been deleted ! ', 'table_reload' => true);
} else {
return array('status' => false, 'message' => print_r($res));
}
break;
// ------------------------------- Old device support - In the development---
case 'delete_hardware':
if (!empty($request['idn'])) {
foreach ($request['idn'] as $idv) {
if ($this->strpos_array($idv, array('SEP', 'ATA', 'VG')) !== false) {
$this->dbinterface->write('sccpdevice', array('name' => $idv), 'delete', "name");
$this->dbinterface->write('sccpbuttons', array(), 'delete', '', $idv);
$this->deleteSccpDeviceXML($idv); // Концы в вводу !!
$this->aminterface->sccpDeviceReset($idv, 'reset');
}
}
return array('status' => true, 'table_reload' => true, 'message' => 'Hardware device has been deleted! ');
}
break;
case 'create_hw_tftp':
$ver_id = ' Test !';
if (!empty($request['idn'])) {
$models = array();
foreach ($request['idn'] as $idv) {
$this->deleteSccpDeviceXML($idv);
$models [] = array('name' => $idv);
}
} else {
$this->deleteSccpDeviceXML('all');
$models = $this->dbinterface->getSccpDeviceTableData("SccpDevice");
}
$this->createDefaultSccpXml(); // Default XML
$ver_id = ' on found active model !';
foreach ($models as $data) {
$ver_id = $this->createSccpDeviceXML($data['name']);
if ($ver_id == -1) {
return array('status' => false, 'message' => 'Error Create Configuration Divice :' . $data['name']);
}
};
if ($this->sccpvalues['siptftp']['data'] == 'on') { // Check SIP Support Enabled
$this->createSccpXmlSoftkey(); // Create Softkey Sets for SIP
}
// !TODO!: -TODO-: Do these returned message strings work with i18n ?
return array('status' => true, 'message' => 'Create new config files (version:' . $ver_id . ')');
break;
case 'reset_token':
case 'reset_dev':
$msg = '';
$msgr = array();
$msgr[] = "Reset command sent to device(s) ";
if (!empty($request['name'])) {
foreach ($request['name'] as $idv) {
$msg = strpos($idv, 'SEP-');
if (!(strpos($idv, 'SEP') === false)) {
if ($cmd_id == 'reset_token') {
$res = $this->aminterface->sccpDeviceReset($idv, 'tokenack');
$msgr[] = $msg . ' ' . $res['Response'] . ' ' . $res['data'];
} else {
$res = $this->aminterface->sccpDeviceReset($idv, 'reset');
$msgr[] = $msg . ' ' . $res['Response'] . ' ' . $res['data'];
}
}
if ($idv == 'all') {
$dev_list = $this->aminterface->sccp_get_active_device();
foreach ($dev_list as $key => $data) {
if ($cmd_id == 'reset_token') {
if (($data['token'] == 'Rej') || ($data['status'] == 'Token ')) {
$res = $this->aminterface->sccpDeviceReset($idv, 'tokenack');
$msgr[] = 'Sent Token reset to :' . $key;
}
} else {
$res = $this->aminterface->sccpDeviceReset($idv, 'reset');
$msgr[] = $res['Response'] . ' ' . $res['data'];
}
}
}
}
}
return array('status' => (($res['Response'] == 'Error')? false : true ), 'message' => $msgr, 'reload' => false, 'table_reload' => true);
break;
case 'update_button_label':
$msg = '';
$hw_list = array();
if (!empty($request['name'])) {
foreach ($request['name'] as $idv) {
if (!(strpos($idv, 'SEP') === false)) {
$hw_list[] = array('name' => $idv);
}
if ($idv == 'all') {
}
}
}
$res = $this->updateSccpButtons($hw_list);
$msg .= $res['Response'] . (empty($res['data']) ? '' : ' raw data: ' . $res['data'] . ' ');
return array('status' => true, 'message' => 'Update Buttons Labels Complete: ' . $msg, 'reload' => false, 'table_reload' => true);
case 'model_add':
$save_settings = array();
$key_name = array('model', 'vendor', 'dns', 'buttons', 'loadimage', 'loadinformationid', 'nametemplate');
$upd_mode = 'replace';
case 'model_update':
if ($request['command'] == 'model_update') {
$key_name = array('model','vendor','dns', 'buttons', 'loadimage', 'loadinformationid', 'nametemplate');
$upd_mode = 'update';
}
if (!empty($request['model'])) {
foreach ($key_name as $key => $value) {
if (!empty($request[$value])) {
$save_settings[$value] = $request[$value];
} else {
$save_settings[$value] = $this->val_null; // null
}
}
$this->dbinterface->write('sccpdevmodel', $save_settings, $upd_mode, "model");
return array('status' => true, 'table_reload' => true);
}
return $save_settings;
break;
case 'model_enabled':
$model_set = '1'; // fall through intentionally
case 'model_disabled':
if ($request['command'] == 'model_disabled') {
$model_set = '0';
}
$msg = '';
$save_settings = array();
if (!empty($request['model'])) {
foreach ($request['model'] as $idv) {
$this->dbinterface->write('sccpdevmodel', array('model' => $idv, 'enabled' => $model_set), 'update', "model");
}
}
return array('status' => true, 'table_reload' => true);
break;
case 'model_delete':
if (!empty($request['model'])) {
$this->dbinterface->write('sccpdevmodel', array('model' => $request['model']), 'delete', "model");
return array('status' => true, 'table_reload' => true);
}
break;
case 'getDeviceModel':
switch ($request['type']) {
case 'all':
case 'extension':
case 'enabled':
$devices = $this->getSccpModelInformation($request['type'], $validate = true);
break;
}
if (empty($devices)) {
return array();
}
return $devices;
break;
case 'deleteSoftKey':
if (!empty($request['softkey'])) {
$id_name = $request['softkey'];
unset($this->sccp_conf_init[$id_name]);
$this->createDefaultSccpConfig($this->sccpvalues, $this->sccppath["asterisk"], $this->sccp_conf_init);
$msg = print_r($this->aminterface->core_sccp_reload(), 1);
return array('status' => true, 'table_reload' => true);
}
break;
case 'updateSoftKey':
if (!empty($request['id'])) {
$id_name = preg_replace('/[^A-Za-z0-9]/', '', $request['id']);
$this->sccp_conf_init[$id_name]['type'] = "softkeyset";
foreach ($this->extconfigs->getExtConfig('keyset') as $keyl => $vall) {
if (!empty($request[$keyl])) {
$this->sccp_conf_init[$id_name][$keyl] = $request[$keyl];
}
}
$this->createDefaultSccpConfig($this->sccpvalues, $this->sccppath["asterisk"], $this->sccp_conf_init);
// !TODO!: -TODO-: Check SIP Support Enabled
$this->createSccpXmlSoftkey();
$msg = print_r($this->aminterface->core_sccp_reload(), 1);
return array('status' => true, 'table_reload' => true);
}
break;
case 'getSoftKey':
$result = array();
$i = 0;
$keyl = 'default';
foreach ($this->aminterface->sccp_list_keysets() as $keyl => $vall) {
$result[$i]['softkeys'] = $keyl;
if ($keyl == 'default') {
foreach ($this->extconfigs->getExtConfig('keyset') as $key => $value) {
$result[$i][$key] = str_replace(',', '<br>', $value);
}
} else {
foreach ($this->getMyConfig('softkeyset', $keyl) as $key => $value) {
$result[$i][$key] = str_replace(',', '<br>', $value);
}
}
$i++;
}
return $result;
break;
case 'getExtensionGrid':
$lineList = $this->dbinterface->getSccpDeviceTableData($request['type']);
if (empty($lineList)) {
return array();
}
$activeDevices = $this->aminterface->sccp_get_active_device();
$uniqueLineList = array();
foreach ($lineList as $key => &$lineArr) {
if (array_key_exists($lineArr['mac'], $activeDevices)) {
$lineArr['line_status'] = "{$activeDevices[$lineArr['mac']]['status']} | {$activeDevices[$lineArr['mac']]['act']}";
}
if (array_key_exists($lineArr['name'], $uniqueLineList)) {
$lineList[$uniqueLineList[$lineArr['name']]]['mac'] .= '<br>' . $lineArr['mac'];
$lineList[$uniqueLineList[$lineArr['name']]]['line_status'] .= '<br>' . $lineArr['line_status'];
unset($lineList[$key]); // Drop this array as no longer used
continue;
}
$uniqueLineList[$lineArr['name']] = $key;
}
unset($lineArr, $uniqueLineList); // unset reference and temp vars.
return array_values($lineList); // Reindex array and return
break;
case 'getPhoneGrid':
$dbDevices = array();
// Find all devices defined in the database.
$dbDevices = $this->dbinterface->getSccpDeviceTableData('phoneGrid', array('type' => $request['type']));
// Return if only interested in SIP devices
if ($request['type'] == 'cisco-sip') {
return $dbDevices; //this may be empty
}
// Find all devices currently connected
$activeDevices = $this->aminterface->sccp_get_active_device();
foreach ($dbDevices as &$dev_id) {
if (!empty($activeDevices[$dev_id['name']])) {
// Device is in db and is connected
$dev_id['description'] = $activeDevices[$dev_id['name']]['descr'];
$dev_id['status'] = $activeDevices[$dev_id['name']]['status'];
$dev_id['address'] = $activeDevices[$dev_id['name']]['address'];
$dev_id['new_hw'] = 'N';
// No further action required on this active device
unset($activeDevices[$dev_id['name']]);
}
}
unset($dev_id); // unset reference.
if (!empty($activeDevices)) {
// Have a device that is connected but is not currently in the database
// This device must have connected via hotline or config in sccp.conf.
// Pass parameters to addDevice so that can be added to db.
foreach ($activeDevices as $dev_ids) {
$id_name = $dev_ids['name'];
$dev_data = $this->aminterface->sccp_getdevice_info($id_name);
if (!empty($dev_data['SCCP_Vendor']['model_id'])) {
$dev_addon = $dev_data['SCCP_Vendor']['model_addon'];
if (empty($dev_addon)) {
$dev_addon = null;
}
$dev_schema = $this->getSccpModelInformation('byciscoid', false, "all", array('model' => $dev_data['SCCP_Vendor']['model_id']));
if (empty($dev_schema)) {
$dev_schema[0]['model'] = "ERROR in Model Schema";
}
$dbDevices[] = array(
'name' => $id_name,
'mac' => $id_name,
'button' => '---',
'type' => $dev_schema[0]['model'],
'new_hw' => 'Y',
'description' => '*NEW* ' . $dev_ids['descr'],
'status' => '*NEW* ' . $dev_ids['status'],
'address' => $dev_ids['address'],
'addon' => $dev_addon
);
}
}
}
return $dbDevices;
break;
case 'getDialTemplate':
// ------------------------------- Old device support - In the development---
$result = $this->getDialPlanList();
if (empty($result)) {
$result = array();
}
return $result;
break;
case 'backupsettings':
// ------------------------------- Old device support - In the development---
$filename = $this->createSccpBackup();
$file_name = basename($filename);
header("Content-Type: application/zip");
header("Content-Disposition: attachment; filename=$file_name");
header("Content-Length: " . filesize($filename));
readfile($filename);
unlink($filename);
// return array('status' => false, 'message' => $result);
return $result;
break;
case 'validateMac':
break;
case 'get_ext_files':
return $this->getFilesFromProvisioner($request);
break;
}
}
function handleSubmit($request, $validateonly = false) {
$hdr_prefix = 'sccp_';
$hdr_arprefix = 'sccp-ar_';
$save_settings = array();
$save_codec = array();
$count_mods = 0;
$dbSaveArray = array();
$errors = array();
if (isset($request["{$hdr_prefix}createlangdir"]) && ($request["{$hdr_prefix}createlangdir"] == 'yes')) {
$this->initializeTFtpLanguagePath();
}
// if uncheck all codecs, audiocodecs key is missing so nothing changes in db.
// Unsetting all codecs will now return to chan-sccp defaults.
// all codecs are currently treated as audiocodecs. To treat videocodecs separately name in video codec section of
// server.codec needs to be changed from audiocodecs to videocodecs.
if (!isset($request['audiocodecs'])) {
$save_settings['allow'] = $this->sccpvalues['allow'];
$save_settings['allow']['data'] = $this->sccpvalues['allow']['systemdefault'];
} else {
foreach ($request['audiocodecs'] as $keycodeс => $dumVal) {
$save_codec[] = $keycodeс;
}
$save_settings['allow'] = $this->sccpvalues['allow'];
$save_settings['allow']['data'] = implode(";", $save_codec);
}
unset($request['audiocodecs']);
if (isset($request[$hdr_prefix . 'ntp_timezone'])) {
$TZdata = $this->extconfigs->getExtConfig('sccp_timezone', $request[$hdr_prefix . 'ntp_timezone']);
if (!empty($TZdata)) {
$save_settings['tzoffset'] = array(
'keyword' => 'tzoffset',
'data' => $TZdata['offset']/60,
'seq' => '98',
'type' => '2',
'systemdefault' => ''
);
}
unset($request[$hdr_prefix . 'ntp_timezone']);
}
// Now handle remaining data. First get table defaults
$sccpdevice_def = (array)$this->getTableDefaults('sccpdevice', false);
$sccpline_def = (array)$this->getTableDefaults('sccpline', false);
// before handling arrays, need to see if deny and permit are set in the request
// if they have been cleared by the users, will not be present
foreach (['deny','permit'] as $keyVal) {
if (!isset($request[$hdr_arprefix.$keyVal])) {
$tmpArr = $this->convertCsvToArray($this->sccpvalues[$keyVal]['systemdefault']);
if (isset($tmpArr[0]['internal'])) {
$request[$hdr_arprefix.$keyVal][0] = $tmpArr[0];
} else {
$request[$hdr_arprefix.$keyVal][1]['net'] = $tmpArr[0]['net'];
$request[$hdr_arprefix.$keyVal][1]['mask'] = $tmpArr[0]['mask'];
}
}
}
foreach ($request as $key => $value) {
// First handle any arrays as their prefix is part common with normal data
//$netvalue = array();
$key = (str_replace($hdr_arprefix, '', $key, $count_mods));
if ($count_mods) {
// Only arrays : network lists or ip lists.
$save_settings[$key]['keyword'] = $key;
$save_settings[$key]['type'] = $this->sccpvalues[$key]['type'];
$save_settings[$key]['seq'] = $this->sccpvalues[$key]['seq'];
$save_settings[$key]['data'] = $this->convertArrayToCsv($value);
$save_settings[$key]['systemdefault'] = $this->sccpvalues[$key]['systemdefault'];
continue;
}
// Now handle any normal data - arrays will not match as already handled.
if (strpos($key, $hdr_prefix) === 0) {
$key = (str_replace($hdr_prefix, '', $key, $count_mods));
if (($count_mods) && (!empty($this->sccpvalues[$key])) && ($this->sccpvalues[$key]['data'] != $value)) {
$save_settings[$key] = $this->sccpvalues[$key];
$save_settings[$key]['data'] = $value;
}
continue;
}
// Finally treat values to be saved to sccpdevice and sccpline defaults.
// TODO: Need to verify the tables defined in showGroup - some options maybe
// device options, but if set by freePbx extensions, be in sccpline.
foreach (array('sccpdevice', 'sccpline') as $tableName) {
$key = (str_replace("{$tableName}_", '', $key, $count_mods));
if ($count_mods) {
// Have default to be saved to db table default
$tableName_def = "{$tableName}_def";
if ((array_key_exists($key, ${$tableName_def})) && (${$tableName_def}[$key]['data'] == $value)) {
// Value unchanged so ignore
} else {
$dbSaveArray[$key] = array('table' => $tableName, 'field' => $key, 'Default' => $value);
}
// If have matched on device, cannot match on line
continue 2;
}
}
}
$extSettings = $this->extconfigs->updateTftpStructure(array_merge($this->sccpvalues, $save_settings));
$save_settings = array_merge($save_settings, $extSettings);
//dbug($save_settings);
if (!empty($save_settings)) {
$this->saveSccpSettings($save_settings);
$this->sccpvalues = $this->dbinterface->get_db_SccpSetting();
}
// now add the site defaults from sccpsettings to sccpdevice for permit and deny, so that these will override
foreach (['deny', 'permit'] as $fieldId) {
$output = array();
foreach ($this->convertCsvToArray($this->sccpvalues[$fieldId]['data']) as $netValue) {
if (isset($netValue['internal'])) {
$output[] = 'internal';
continue;
}
$output[] = implode('/', $netValue);
}
$dbSaveArray[$fieldId] = array('table' => 'sccpdevice', 'field' => $fieldId, 'Default' => implode(';',$output));
}
foreach ($dbSaveArray as $key => $rowToSave) {
$this->dbinterface->updateTableDefaults($rowToSave['table'], $rowToSave['field'], $rowToSave['Default']);
}
// rewrite sccp.conf
$this->createDefaultSccpConfig($this->sccpvalues, $this->sccppath["asterisk"], $this->sccp_conf_init);
$this->createDefaultSccpXml();
}
public function getMyConfig($var = null, $id = "noid") {
// TODO: this function has little purpose - need to integrate into AjaxHelper
switch ($var) {
case "softkeyset":
$final = array();
$i = 0;
if ($id == "noid") {
foreach ($this->sccp_conf_init as $key => $value) {
if ($this->sccp_conf_init[$key]['type'] == 'softkeyset') {
$final[$i] = $value;
$i++;
}
}
} else {
if (!empty($this->sccp_conf_init[$id])) {
if ($this->sccp_conf_init[$id]['type'] == 'softkeyset') {
$final = $this->sccp_conf_init[$id];
}
}
}
break;
}
return $final;
}
public function getFilesFromProvisioner($request) {
$filesToGet = array();
$totalFiles = 0;
$provisionerUrl = "https://github.com/dkgroot/provision_sccp/raw/master/";
// TODO: Maybe should always fetch to ensure have latest, backing up old version
if (!file_exists("{$this->sccppath['tftp_path']}/masterFilesStructure.xml")) {
if (!$this->getFileListFromProvisioner($this->sccppath['tftp_path'])) {
return array('status' => false,
'message' => "{$provisionerUrl}tools/tftpbootFiles.xml cannot be found. Check your internet connection, and that this path exists",
'reload' => false);
}
}
$tftpBootXml = simplexml_load_file("{$this->sccppath['tftp_path']}/masterFilesStructure.xml");
switch ($request['type']) {
case 'firmware':
$device = $request['device'];
$firmwareDir = $tftpBootXml->xpath("//Directory[@name='firmware']");
$result = $firmwareDir[0]->xpath("//Directory[@name='{$device}']");
$filesToGet['firmware'] = (array)$result[0]->FileName;
$totalFiles += count($filesToGet['firmware']);
$srcDir['firmware'] = $provisionerUrl . (string)$result[0]->DirectoryPath;
$dstDir['firmware'] = "{$this->sccppath['tftp_firmware_path']}/{$device}";
$msg = "Firmware for {$device} has been successfully downloaded";
break;
case 'locale':
$language = $request['locale'];
// Get locales
$localeDir = $tftpBootXml->xpath("//Directory[@name='languages']");
$result = $localeDir[0]->xpath("//Directory[@name='{$language}']");
$filesToGet['language'] = (array)$result[0]->FileName;
$totalFiles += count($filesToGet['language']);
$srcDir['language'] = $provisionerUrl . (string)$result[0]->DirectoryPath;
$dstDir['language'] = "{$this->sccppath['tftp_lang_path']}/{$language}";
// Get countries. Country is a substring of locale with exception of korea
$country = explode('_', $language);
array_shift($country);
$countryName = array_shift($country);
while (count($country)>=1) {
$countryName .= '_' . array_shift($country);
}
$msg = "{$language} Locale and Country tones have been successfully downloaded";
//fall through intentionally to also get country files
case 'country':
if ($totalFiles == 0) {
//Request is for countries; if >0, have fallen through from locale
$countryName = $request['country'];
$msg = "{$countryName} country tones have been successfully downloaded";
}
$result = $tftpBootXml->xpath("//Directory[@name='{$countryName}']");
$filesToGet['country'] = (array)$result[0]->FileName;
$totalFiles += count($filesToGet['country']);
$srcDir['country'] = $provisionerUrl . (string)$result[0]->DirectoryPath;
$dstDir['country'] = "{$this->sccppath['tftp_countries_path']}/{$countryName}";
break;
default:
return array('status' => false, 'message' => 'Invalid request', 'reload' => false);
break;
}
// Now get the files
$filesRetrieved = 0;
foreach (array('language','country', 'firmware') as $section){
if (!isset($dstDir[$section])) {
// No request for this section
continue;
}
$srcDir = $srcDir[$section];
$dstDir = $dstDir[$section];
if (!is_dir($dstDir)) {
mkdir($dstDir, 0755);
}
foreach ($filesToGet[$section] as $srcFile) {
try {
file_put_contents("{$dstDir}/{$srcFile}",
file_get_contents($srcDir. $srcFile));
} catch (\Exception $e) {
return array('status' => false,
'message' => "{$countriesSrcDir}{$srcFile} cannot be found. Check your internet connection, and that this path exists",
'reload' => false);
}
$filesRetrieved ++;
$percentComplete = $filesRetrieved *100 / $totalFiles;
$data = "{$percentComplete},";
echo $data;
ob_flush();
flush();
}
}
return array('status' => true, 'message' => $msg, 'reload' => true);
}
function saveSccpDevice($get_settings, $validateonly = false) {
$hdr_prefix = 'sccp_hw_';
$hdr_arprefix = 'sccp_hw-ar_';
$hdr_vendPrefix = 'vendorconfig_';
$save_buttons = array();
$save_settings = array();
$save_codec = array();
$name_dev = '';
$db_field = array_keys($this->dbinterface->getSccpDeviceTableData("get_columns_sccpdevice"));
$hw_id = (empty($get_settings['sccp_device_id'])) ? 'new' : $get_settings['sccp_device_id'];
$hw_type = (empty($get_settings['sccp_device_typeid'])) ? 'sccpdevice' : $get_settings['sccp_device_typeid'];
$update_hw = ($hw_id == 'new') ? 'add' : 'clear'; // Clear is delete + add. Only used for buttons
$hw_prefix = 'SEP';
if (!empty($get_settings[$hdr_prefix . 'type'])) {
$value = $get_settings[$hdr_prefix . 'type'];
if (strpos($value, 'ATA') !== false) {
$hw_prefix = 'ATA';
}
if (strpos($value, 'VG') !== false) {
$hw_prefix = 'VG';
}
}
foreach ($db_field as $key) {
$value = "";
switch ($key) {
case 'name':
if (!empty($get_settings[$hdr_prefix . 'mac'])) {
$value = $get_settings[$hdr_prefix . 'mac'];
$value = strtoupper(str_replace(array('.', '-', ':'), '', $value)); // Delete mac separators from string
$value = sprintf("%012s", $value);
if ($hw_prefix == 'VG') {
$value = $hw_prefix . $value . '0';
} else {
$value = $hw_prefix . $value;
}
$name_dev = $value;
}
break;
case 'phonecodepage':
// phonecodepage depends on 2 variables - language and phone type (uses java or not).
// Non java phones use ISO8859-1 or CP1251 (Cyrillic); java phones use UTF-8. See @dkgroot.
// Below list is not definitive or necessarily accurate - needs to be maintained.
$nonJavaPhones = array(
'6901', '6911', '6921', '6945', '7902', '7905', '7910', '7911', '7912', '7914', '7915', '7916', '7920', '7925', '7926', '7931', '7935', '7936', '7937', '7940', '7960'
);
// TODO: May be other exceptions so use switch. Historically this is the only one handled
if (!empty($get_settings["{$hdr_prefix}devlang"])) {
switch ($get_settings["{$hdr_prefix}devlang"]) {
case 'Russian_Russian_Federation':
$value = (in_array($get_settings['sccp_hw_type'], $nonJavaPhones, true)) ? 'CP1251' : 'utf-8';
break;
default:
$value = (in_array($get_settings['sccp_hw_type'], $nonJavaPhones, true)) ? 'ISO8859-1' : 'utf-8';
break;
}
}
break;
default:
// handle vendor prefix
if (!empty($get_settings["${hdr_vendPrefix}${key}"])) {
$value = $get_settings["${hdr_vendPrefix}${key}"];
}
// handle array prefix
if (!empty($get_settings["${hdr_arprefix}${key}"])) {
// Only 3 types of array returned permit,deny, setvar
$arr_data = '';
$arr_clear = false;
$output = array();
foreach ($get_settings["${hdr_arprefix}${key}"] as $netValue) {
switch ($key) {
case 'permit':
case 'deny';
// Now have an array of settings each with keys net and Mask
// TODO: This needs to be optimised
//foreach ($valueArr as $netValue) {
if (isset($netValue['inherit'])) {
$save_settings['deny'] = 'NONE';
continue 2;
}
if (isset($netValue['internal'])) {
$output[] = 'internal';
continue 2;
}
if (empty($netValue['net'])) {
// empty net so ignored
continue 2;
}
$netValue['mask'] = (empty($netValue['mask'])) ? "255.255.255.0" : $netValue['mask'];
$output[]= implode('/', $netValue);
//}
break;
case 'setvar':
$output[] = implode(';', $netValue);
break;
// No default case
}
}
$save_settings[$key] = implode(';', $output);
unset($output);
}
// Now only have normal prefix
if (!empty($get_settings["{$hdr_prefix}{$key}"])) {
$value = $get_settings["{$hdr_prefix}{$key}"];
}
}
if (!empty($value)) {
$save_settings[$key] = $value;
}
}
// Save this device.
$this->dbinterface->write('sccpdevice', $save_settings, 'replace');
// Retrieve the phone buttons from $_REQUEST ($get_settings) and write back to
// update sccpdeviceconfig via Trigger
$save_buttons = $this->getPhoneButtons($get_settings, $name_dev, $hw_type);
$this->dbinterface->write('sccpbuttons', $save_buttons, $update_hw, '', $name_dev);
// Create new XML for this device, and then reset or restart the device
// so that it loads the file from TFT.
$msg = "Device Saved";
$toastFlag = 'success';
if (!$this->createSccpDeviceXML($name_dev)){
// will only be false if creating SIP SEP with no line.
$msg = "Device Saved but SEP config file not created as no SIP line attached to this device";
$toastFlag = 'warning';
};
$hash = '#sipdevice';
if ($get_settings['sccp_device_typeid'] != 'sipdevice') {
$hash = '#sccpdevice';
// cannot restart SIP device via chan-sccp.
if ($hw_id == 'new') {
$this->aminterface->sccpDeviceReset($name_dev, 'reset');
} else {
$this->aminterface->sccpDeviceReset($name_dev, 'restart');
}
}
$search = '?display=sccp_phone';
return array('status' => true, 'message' => $msg, 'reload' => true, 'toastFlag' => $toastFlag, 'search' => $search, 'hash' => $hash);
}
}
?>

View file

@ -1,153 +0,0 @@
<?php
namespace FreePBX\modules\Sccp_manager\sccpManTraits;
trait bmoFunctions {
//Need to reload freePBX for modifications below to work
/*
//want to catch extensions
public static function myConfigPageInits() {
return array("extensions");
}
*/
public function doConfigPageInit($page) {
if ($page == "extensions") {
}
$this->doGeneralPost();
}
// Try to change extensions which is part of core
/*
public static function myGuiHooks() {
return array('core');
}
*/
/*
public function doGuiHook(&$cc) {
if ($_REQUEST['display'] == "extensions" ) {
if ($_REQUEST['tech_hardware'] == 'sccp_custom') {
this is the add extensions form
On submit returns to extensions page. Users prefer that it returns
To Sccp Phone.
Below adds redirect URL, but it is not followed
$cc->setRedirectURL("config.php?display=sccp_phone");
so force redirect at end of addDevice in SccpClass
}
}
}
*/
/* unused but FPBX API requires it */
public function install() {
}
/* unused but FPBX API requires it */
public function uninstall() {
}
/* unused but FPBX API requires it */
public function backup() {
}
/* unused but FPBX API requires it */
public function restore($backup) {
}
public function getActionBar($request) {
$buttons = array();
switch ($request['display']) {
case 'sccp_adv':
if (empty($request['tech_hardware'])) {
break;
}
$buttons = array(
'submit' => array(
'name' => 'ajaxsubmit',
'id' => 'ajaxsubmit',
'value' => _("Save")
),
'Save' => array(
'name' => 'ajaxsubmit2',
'id' => 'ajaxsubmit2',
'stayonpage' => 'yes',
'value' => _("Save + Continue")
),
'cancel' => array(
'name' => 'cancel',
'id' => 'ajaxcancel',
'data-search' => '?display=sccp_adv',
'data-hash' => 'sccpdialplan',
'value' => _("Cancel")
),
);
break;
case 'sccp_phone':
if (empty($request['tech_hardware'])) {
break;
}
$buttons = array(
'submit' => array(
'name' => 'ajaxsubmit',
'id' => 'ajaxsubmit',
'value' => _("Save")
),
'Save' => array(
'name' => 'ajaxsubmit2',
'id' => 'ajaxsubmit2',
'stayonpage' => 'yes',
'value' => _("Save + Continue")
),
'cancel' => array(
'name' => 'cancel',
'id' => 'ajaxcancel',
'data-search' => '?display=sccp_phone',
'data-hash' => 'sccpdevice',
'value' => _("Cancel")
),
);
break;
case 'sccpsettings':
// TODO: Need to change to have save and save and continue
$buttons = array(
'submit' => array(
'name' => 'ajaxsubmit',
'id' => 'ajaxsubmit',
'value' => _("Save")
),
'reset' => array(
'name' => 'reset',
'id' => 'ajaxcancel',
'data-reload' => 'reload',
'value' => _("Cancel")
),
);
break;
}
return $buttons;
}
public function getRightNav($request) {
global $amp_conf;
if (isset($request['tech_hardware']) && ($request['tech_hardware'] == 'cisco')) {
return load_view($amp_conf['AMPWEBROOT'] .'/admin/modules/sccp_manager/views/hardware.rnav.php', array('request' => $request));
}
}
public function doGeneralPost() {
if (!isset($_REQUEST['Submit'])) {
return;
}
}
}
?>

View file

@ -1,523 +0,0 @@
<?php
namespace FreePBX\modules\Sccp_manager\sccpManTraits;
trait helperfunctions {
private function convertCsvToArray($stringToConvert = "") {
// Take a csv string form of net/mask or ip/port and convert to an array
// sub arrays are separated by ";"
$outputArr = array();
if (empty($stringToConvert)) {
return $outputArr;
}
foreach (explode(";", $stringToConvert) as $value) {
//internal is always the first setting if present
if ($value == 'internal') {
$outputArr[] = array('internal' => 'on');
continue;
}
// Now handle rest of value types
$subArr = explode("/", $value);
if (count($subArr) === 2) {
// Have net/mask
$outputArr[] = array('net' => $subArr[0], 'mask' => $subArr[1]);
} else {
// have ip:port
$subArr = explode(":", $value);
$outputArr[] = array('ip' => $subArr[0], 'port' => $subArr[1]);
}
}
return $outputArr;
}
private function convertArrayToCsv(array $arrayToConvert) {
// About to save to db so need to convert to string
// Take an array form of net mask or ip port and convert to a csv
// sub arrays are separated by ";"
if (empty($arrayToConvert)) {
return '';
}
$output = array();
// Internal is always element 0, nets and ips start at element 1.
if ((isset($arrayToConvert[1]['net'])) || (isset($arrayToConvert[0]['internal']))) {
// Have net masks
foreach ($arrayToConvert as $netValue) {
if (isset($netValue['internal'])) {
$output[] = 'internal';
continue;
}
if (empty($netValue['net'])) {
// If network not set, user error, has added empty row so delete
continue;
}
// If the mask has not been set, set to this subnet
$netValue['mask'] = (empty($netValue['mask'])) ? "255.255.255.0" : $netValue['mask'];
$output[] = implode('/', $netValue);
}
} else {
// Have ip addresses
foreach ($arrayToConvert as $ipArr) {
if (isset($ipArr['internal'])) {
// should not be set for an ip address
continue;
}
if (empty($ipArr['ip'])) {
// If ip not set, user error, has added empty row so delete
continue;
}
$ipArr['port'] = (empty($ipArr['port'])) ? "2000" : $ipArr['port'];
$output[] = implode(':', $ipArr);
}
}
return implode(';', $output);
}
private function getIpInformation($type = '') {
$interfaces = array();
switch ($type) {
case 'ip4':
exec("/sbin/ip -4 -o addr", $result, $ret);
break;
case 'ip6':
exec("/sbin/ip -6 -o addr", $result, $ret);
break;
default:
exec("/sbin/ip -o addr", $result, $ret);
break;
}
foreach ($result as $line) {
$vals = preg_split("/\s+/", $line);
if ($vals[3] == "mtu") {
continue;
}
if ($vals[2] != "inet" && $vals[2] != "inet6") {
continue;
}
if (preg_match("/(.+?)(?:@.+)?:$/", $vals[1], $res)) {
continue;
}
$ret = preg_match("/(\d*+.\d*+.\d*+.\d*+)[\/(\d*+)]*/", $vals[3], $ip);
$interfaces[$vals[1] . ':' . $vals[2]] = array('name' => $vals[1], 'type' => $vals[2], 'ip' => ((empty($ip[1]) ? '' : $ip[1])));
}
return $interfaces;
}
private function before($thing, $inthat) {
return substr($inthat, 0, strpos($inthat, $thing));
}
private function array_key_exists_recursive($key, $arr) {
if (array_key_exists($key, $arr)) {
return true;
}
foreach ($arr as $currentKey => $value) {
if (is_array($value)) {
return $this->array_key_exists_recursive($key, $value);
}
}
return false;
}
private function strpos_array($haystack, $needles) {
if (is_array($needles)) {
foreach ($needles as $str) {
if (is_array($str)) {
$pos = $this->strpos_array($haystack, $str);
} else {
$pos = strpos($haystack, $str);
}
if ($pos !== FALSE) {
return $pos;
}
}
} else {
return strpos($haystack, $needles);
}
return FALSE;
}
private function getTableDefaults($table, $trim_underscore = true) {
$def_val = array();
// TODO: This is ugly and overkill - needs to be cleaned up in dbinterface
if ($table == 'sccpsettings') {
// sccpsettings has a different structure and already have values in $sccpvalues
return $this->sccpvalues;
}
$sccpTableDesc = $this->dbinterface->getSccpDeviceTableData("get_columns_{$table}");
foreach ($sccpTableDesc as $key => $data) {
// function has 2 roles: return actual table keys (trim_underscore = false)
// return sanitised keys to add defaults (trim_underscore = true)
if ($trim_underscore) {
// Remove any leading (or trailing but should be none) underscore
// These are only used to hide fields from chan-sccp for compatibility
$key = trim($key,'_');
}
$def_val[$key] = array("keyword" => $key, "data" => $data['Default'], "seq" => "99");
}
return $def_val;
}
private function getTableEnums($table, $trim_underscore = true) {
$enumFields = array();
$sccpTableDesc = $this->dbinterface->getSccpDeviceTableData("get_columns_{$table}");
foreach ($sccpTableDesc as $key => $data) {
// function has 2 roles: return actual table keys (trim_underscore = false)
// return sanitised keys to add defaults (trim_underscore = true)
if ($trim_underscore) {
// Remove any leading (or trailing but should be none) underscore
// These are only used to hide fields from chan-sccp for compatibility
$key = trim($key,'_');
}
$typeArray = explode('(', $data['Type']);
if ($typeArray[0] == 'enum') {
$enumOptions = explode(',', trim($typeArray[1],')'));
$enumFields[$key] = $enumOptions;
}
}
return $enumFields;
}
private function findAllFiles($searchDir, $file_mask = array(), $mode = 'full') {
$result = array();
if (!is_dir($searchDir)) {
return $result;
}
foreach (array_diff(scandir($searchDir),array('.', '..')) as $value) {
if (is_file("$searchDir/$value")) {
$extFound = '';
$foundFile = true;
if (!empty($file_mask)) {
$foundFile = false;
foreach ($file_mask as $k) {
if (strpos($value, $k) !== false) {
$foundFile = true;
$extFound = $k;
break;
}
}
}
if ($foundFile) {
switch ($mode) {
case 'fileonly':
$result[] = $value;
break;
case 'fileBaseName':
$result[] = basename("/$value", $extFound);
break;
case 'dirFileBaseName':
$result[] = $searchDir . "/" . basename("/$value", $extFound);
break;
default:
$result[] = "$searchDir/$value";
break;
}
}
continue;
}
// Now iterate over sub directories
$sub_find = $this->findAllFiles("$searchDir/$value", $file_mask, $mode);
if (!empty($sub_find)) {
foreach ($sub_find as $sub_value) {
$result[] = $sub_value;
}
}
}
return $result;
}
function is_assoc($array) {
foreach (array_keys($array) as $k => $v) {
if ($k !== $v)
return true;
}
return false;
}
function tftpReadTestFile($remoteFileName, $host = "127.0.0.1")
{
// https://datatracker.ietf.org/doc/html/rfc1350
$socket = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
// Set timeout so that do not hang if no data received.
socket_set_option($socket,SOL_SOCKET, SO_RCVTIMEO, array('sec'=>1, 'usec'=>0));
if ($socket) {
$port = 69; // Initial TFTP port. Changed in received packet.
// create the RRQ request packet
$packet = chr(0) . chr(1) . $remoteFileName . chr(0) . 'netascii' . chr(0);
// UDP is connectionless, so we just send it.
socket_sendto($socket, $packet, strlen($packet), MSG_EOR, $host, $port);
$buffer = null;
$port = "";
$ret = "";
// MSG_WAITALL is blocking but socket has timeout set to 1 sec.
$numbytes = socket_recvfrom($socket, $buffer, 84, MSG_WAITALL, $host, $port);
if ($numbytes < 2) {
// socket has timed out before data received.
return false;
}
// unpack the returned buffer and discard the first two bytes.
$pkt = unpack("nopcode/nblockno/a*data", $buffer);
// send ack and close socket.
$packet = chr(4) . chr($pkt["blockno"]);
socket_sendto($socket, $packet, strlen($packet), MSG_EOR, $host, $port);
socket_close($socket);
if ($pkt["opcode"] == 3 && $numbytes) {
return $pkt["data"];
}
}
return false;
}
public function initialiseConfInit(){
$read_config = \FreePBX::LoadConfig()->getConfig('sccp.conf');
$sccp_conf_init['general'] = $read_config['general'];
foreach ($read_config as $key => $value) {
if (isset($read_config[$key]['type'])) { // copy soft key
if ($read_config[$key]['type'] == 'softkeyset') {
$sccp_conf_init[$key] = $read_config[$key];
}
}
}
return $sccp_conf_init;
}
public function checkTftpMapping(){
exec('in.tftpd -V', $tftpInfo);
$info['TFTP Server'] = array('Version' => 'Not Found', 'about' => 'Mapping not available');
if (isset($tftpInfo[0])) {
$tftpInfo = explode(',',$tftpInfo[0]);
$info['TFTP Server'] = array('Version' => $tftpInfo[0], 'about' => 'Mapping not available');
$tftpInfo[1] = trim($tftpInfo[1]);
$this->sccpvalues['tftp_rewrite']['data'] = 'off';
if ($tftpInfo[1] == 'with remap') {
$info['TFTP Server'] = array('Version' => $tftpInfo[0], 'about' => $tftpInfo[1]);
$remoteFileName = ".sccp_manager_remap_probe_sentinel_temp".mt_rand(0, 9999999).".tlzz";
$remoteFileContent = "# This is a test file created by Sccp_Manager. It can be deleted without impact";
$testFtpDir = "{$this->sccpvalues['tftp_path']['data']}/settings";
// write a sentinel to a tftp subdirectory to see if mapping is working
if (is_dir($testFtpDir) && is_writable($testFtpDir)) {
$tempFile = "${testFtpDir}/{$remoteFileName}";
file_put_contents($tempFile, $remoteFileContent);
// try to pull the written file through tftp.
// this way we can determine if mapping is active and using sccp_manager maps
if ($remoteFileContent == $this->tftpReadTestFile($remoteFileName)) {
//found the file and contents are correct
$this->sccpvalues['tftp_rewrite']['data'] = 'pro';
} else {
// Did not find sentinel so mapping not available
$this->sccpvalues['tftp_rewrite']['data'] = 'off';
}
unlink($tempFile);
}
return true;
}
}
return false;
}
// helper function to save xml with proper indentation
public function saveXml($xml, $filename) {
$dom = new \DOMDocument("1.0");
$dom->preserveWhiteSpace = false;
$dom->formatOutput = true;
$dom->loadXML($xml->asXML());
$dom->save($filename);
}
public function getFileListFromProvisioner(string $tftpRootPath) {
$provisionerUrl = "https://github.com/dkgroot/provision_sccp/raw/master/";
// Get master tftpboot directory structure
try {
file_put_contents("{$tftpRootPath}/masterFilesStructure.xml",file_get_contents("{$provisionerUrl}tools/tftpbootFiles.xml"));
} catch (\Exception $e) {
return false;
}
return true;
}
public function getChanSccpSettings() {
// This is a utility function for debug only, and is not used by core code
foreach (array('general','line', 'device') as $section) {
$sysConfig = $this->aminterface->getSCCPConfigMetaData($section);
dbug($sysConfig);
}
unset($sysConfig);
}
public function createDefaultSccpConfig(array $sccpvalues, string $asteriskPath, $conf_init) {
global $cnf_wr;
// Make sccp.conf data
// [general] section
// TODO: Need to review sccpsettings seq numbering, as will speed this up, and remove the need for $permittedSettings.
$cnf_wr = \FreePBX::WriteConfig();
//clear old general settings, and initiate with allow/disallow and permit/deny keys in correct order
$conf_init['general'] = array();
$conf_init['general']['disallow'] = 'all';
$conf_init['general']['allow'] = '';
$conf_init['general']['deny'] = '0.0.0.0/0.0.0.0';
$conf_init['general']['permit'] = '0.0.0.0/0.0.0.0';
// permitted chan-sccp settings array
$permittedSettings = array(
'debug', 'servername', 'keepalive', 'context', 'dateformat', 'bindaddr', 'port', 'secbindaddr', 'secport', 'disallow', 'allow', 'deny', 'permit',
'localnet', 'externip', 'externrefresh', 'firstdigittimeout', 'digittimeout', 'digittimeoutchar', 'recorddigittimeoutchar', 'simulate_enbloc',
'ringtype', 'autoanswer_ring_time', 'autoanswer_tone', 'remotehangup_tone', 'transfer', 'transfer_tone', 'transfer_on_hangup', 'dnd_tone',
'callwaiting_tone', 'callwaiting_interval', 'musicclass', 'language', 'callevents', 'accountcode', 'sccp_tos', 'sccp_cos', 'audio_tos',
'audio_cos', 'video_tos', 'video_cos', 'echocancel', 'silencesuppression', 'earlyrtp', 'dndFeature', 'private', 'mwilamp', 'mwioncall',
'cfwdall', 'cfwdbusy', 'cfwdnoanswer', 'cfwdnoanswer_timeout', 'nat', 'directrtp', 'allowoverlap', 'pickup_modeanswer',
'callhistory_answered_elsewhere', 'amaflags', 'callanswerorder', 'devicetable', 'linetable', 'meetmeopts', 'jbenable', 'jbforce',
'jblog', 'jbmaxsize', 'jbresyncthreshold', 'jbimpl', 'hotline_enabled', 'hotline_extension', 'hotline_context', 'hotline_label', 'fallback',
'backoff_time', 'server_priority');
foreach ($sccpvalues as $key => $value) {
if (!in_array($key, $permittedSettings, true)) {
continue;
}
if ($value['seq'] == 0) {
switch ($key) {
case "allow":
case "disallow":
case "deny":
case "localnet":
case "permit":
$conf_init['general'][$key] = explode(';', $value['data']);
break;
case "devlang":
/*
$lang_data = $this->extconfigs->getExtConfig('sccp_lang', $value['data']);
if (!empty($lang_data)) {
// TODO: will always get here, but lang_data['codepage'] will be empty as not a valid key
$this->sccp_conf_init['general']['phonecodepage'] = $lang_data['codepage'];
}
break;
*/
case "netlang": // Remove Key
case "tftp_path":
case "sccp_compatible": // This is equal to SccpDBmodel
break;
default:
if (!empty($value['data'])) {
$conf_init['general'][$key] = $value['data'];
}
}
}
}
//
// ----- It is a very bad idea to add an external configuration file "sccp_custom.conf" !!!!
// This will complicate solving problems caused by unexpected solutions from users.
//
if (file_exists($asteriskPath . "/sccp_custom.conf")) {
$conf_init['HEADER'] = array(
"; ;",
"; It is a very bad idea to add an external configuration file !!!! ;",
"; This will complicate solving problems caused by unexpected solutions ;",
"; from users. ;",
";--------------------------------------------------------------------------------;",
"#include sccp_custom.conf"
);
}
$cnf_wr->WriteConfig('sccp.conf', $conf_init);
}
public function initVarfromXml() {
if ((array) $this->xml_data) {
foreach ($this->xml_data->xpath('//page_group') as $item) {
foreach ($item->children() as $child) {
$seq = 0;
if (!empty($child['seq'])) {
$seq = (string) $child['seq'];
}
if ($seq < 99) {
if ($child['type'] == 'IE') {
foreach ($child->xpath('input') as $value) {
$tp = 0;
if (empty($value->value)) {
$datav = (string) $value->default;
} else {
$datav = (string) $value->value;
}
if (strtolower($value->type) == 'number') {
$tp = 1;
}
if (empty($this->sccpvalues[(string) $value->name])) {
$this->sccpvalues[(string) $value->name] = array('keyword' => (string) $value->name, 'data' => $datav, 'type' => $tp, 'seq' => $seq, 'systemdefault' => '');
}
}
}
if ($child['type'] == 'IS' || $child['type'] == 'IED') {
if (empty($child->value)) {
$datav = (string) $child->default;
} else {
$datav = (string) $child->value;
}
if (empty($this->sccpvalues[(string) $child->name])) {
$this->sccpvalues[(string) $child->name] = array('keyword' => (string) $child->name, 'data' => $datav, 'type' => '2', 'seq' => $seq, 'systemdefault' => '');
}
}
if (in_array($child['type'], array('SLD', 'SLS', 'SLT', 'SLNA', 'SLDA', 'SL', 'SLM', 'SLZ', 'SLTZN', 'SLA'))) {
if (empty($child->value)) {
$datav = (string) $child->default;
} else {
$datav = (string) $child->value;
}
if (empty($this->sccpvalues[(string) $child->name])) {
$this->sccpvalues[(string) $child->name] = array('keyword' => (string) $child->name, 'data' => $datav, 'type' => '2', 'seq' => $seq, 'systemdefault' => '');
}
}
}
}
}
}
}
public function getSipConfig() {
// Only called from sccp_manager class when saving SIP device
$result = array();
$tmp_binds = \FreePBX::Sipsettings()->getBinds();
$if_list = $this->getIpInformation('ip4');
if (!is_array($tmp_binds)) {
// FreePBX has no sip bindings.
die_freepbx(_("SIP server configuration error ! No SIP protocols enabled"));
}
foreach ($tmp_binds as $fpbx_protocol => $fpbx_bind) {
foreach ($fpbx_bind as $protocol_ip => $protocol_port_arr) {
if (empty($protocol_port_arr)) {
continue;
}
if (($protocol_ip == '0.0.0.0') || ($protocol_ip == '[::]')) {
foreach ($if_list as $if_type => $if_data) {
if ($if_data['ip'] == "127.0.0.1") {
continue;
}
if (empty($result[$fpbx_protocol][$if_data['ip']])) {
$result[$fpbx_protocol][$if_data['ip']]= $protocol_port_arr;
} else {
$result[$fpbx_protocol][$if_data['ip']]= array_merge($result[$fpbx_protocol][$if_data['ip']],$protocol_port_arr);
}
$result[$fpbx_protocol][$if_data['ip']]['ip']=$if_data['ip'];
}
} else {
$result[$fpbx_protocol][$protocol_ip]=$protocol_port_arr;
$result[$fpbx_protocol][$protocol_ip]['ip']=$protocol_ip;
}
}
}
if (empty($result)) {
die_freepbx(_("SIP server configuration error ! No SIP protocols enabled"));
}
return $result;
}
}
?>

View file

@ -1,21 +0,0 @@
{
"rawname": "sccp_manager",
"repo": "stable",
"name": "Sccp Manager",
"version": "14.5.0.4",
"publisher": "Steve Lad",
"license": "GPL",
"licenselink": "http://www.gnu.org/licenses/gpl.txt",
"changelog": "*14.5.0.4* Preserve softkeys across installs. Fix truncated values\n*14.5.0.3* Fix issue 32\n*14.4.0.5* Fix issue 59\n*14.4.0.1* Fix regression in SQL not compatible with MariaDb 5\n*14.4.0.1* Upgrade installer to prevent data loss when run\n*14.3.0.30* Fix issue returning after save\n*14.3.0.28* Fix issue with RNav\n*14.3.0.27* Improve handling of SIP devices\n*14.3.0.15* Install master files list via installer\n*14.2.0.3* Fix module database definition\n*14.2.0.3* Fix module database definition\n*14.2.0.2* First release of new version without old interface\n*13.0.0.1* Packaging of ver 1.0.0.1\n*12.0.0.1* Packaging of ver 1.0.0.1",
"category": "Sccp Connectivity",
"description": "The Sccp Manager module lets you manage the chan-sccp driver.",
"depends": {
"version": "16.0"
},
"supported": {
"version": "15.0"
},
"location": "https://github.com/chan-sccp/sccp_manager/archive/refs/tags/v14.5.0.4.tar.gz",
"md5sum": "80b454d5cfdd602bffeec350e6e76bac",
"packaged": "1643364518"
}

View file

@ -1,81 +0,0 @@
<?php
/* $Id:$ */
if (!defined('FREEPBX_IS_AUTH')) {
die('No direct script access allowed');
}
global $db;
$version = FreePBX::Config()->get('ASTVERSION');
global $sqlTables;
$sqlTables = array('sccpbuttonconfig','sccpdevice','sccpline','sccpuser','sccpsettings','sccpdevmodel');
createBackUpConfig();
function createBackUpConfig()
{
global $amp_conf;
global $sqlTables;
outn("<li>" . _("Creating Config BackUp") . "</li>");
$cnf_int = \FreePBX::Config();
$backup_files = array('extensions','extconfig','res_mysql', 'res_config_mysql','sccp','sccp_hardware','sccp_extensions');
$backup_ext = array('_custom.conf', '_additional.conf','.conf');
$dir = $cnf_int->get('ASTETCDIR');
$sqlTables = array('sccpbuttonconfig','sccpdevice','sccpline','sccpuser','sccpsettings','sccpdevmodel');
$sqlTablesString = implode(' ',$sqlTables);
$sqlBuFile = $dir.'/sccp_backup_'.date("Ymd").'.sql';
$result = exec("mysqldump {$amp_conf['AMPDBNAME']} {$sqlTablesString}
--password={$amp_conf['AMPDBPASS']}
--user={$amp_conf['AMPDBUSER']}
--single-transaction >{$sqlBuFile}");
try {
$zip = new \ZipArchive();
} catch (\Exception $e) {
outn("<br>");
outn("<font color='red'>PHPx.x-zip not installed where x.x is the installed PHP version. Install it before continuing !</font>");
die_freepbx();
}
$filename = $dir . "/sccp_uninstall_backup" . date("Ymd"). ".zip";
if ($zip->open($filename, \ZIPARCHIVE::CREATE)) {
foreach ($backup_files as $file) {
foreach ($backup_ext as $b_ext) {
if (file_exists($dir . '/'.$file . $b_ext)) {
$zip->addFile($dir . '/'.$file . $b_ext);
}
}
}
if (file_exists($sqlBuFile)) {
$zip->addFile($sqlBuFile);
}
$zip->close();
} else {
outn("<li>" . _("Error Creating BackUp: ") . $filename ."</li>");
outn("<br>");
outn("<font color='red'>PHPx.x-zip not installed where x.x is the installed PHP version. Install it before continuing !</font>");
die_freepbx();
}
unlink($sqlBuFile);
outn("<li>" . _("Config backup created: ") . $filename ."</li>");
}
if (!empty($version)) {
$check = $db->getRow("SELECT 1 FROM `kvstore` LIMIT 0", DB_FETCHMODE_ASSOC);
if (!(DB::IsError($check))) {
outn("<li>" . _("Deleting keys FROM kvstore..") . "</li>");
sql("DELETE FROM kvstore WHERE module = 'sccpsettings'");
sql("DELETE FROM kvstore WHERE module = 'Sccp_manager'");
}
}
// FreePbx removes all tables via module.xml, and uninstaller will error
// If the tables do not exist.
//outn("<li>" . _('Removing all Sccp_manager tables') . "</li>");
//foreach ($sqlTables as $table) {
//$sql = "DROP TABLE IF EXISTS {$table}";
//}
// Still need to handle views as FreePBX does not know about these.
outn("<li>" . _('Removing all Sccp_manager views') . "</li>");
$db->query("DROP VIEW IF EXISTS sccpdeviceconfig");
outn("<li>" . _("Uninstall Complete") . "</li>");
?>

21
update.json Normal file
View file

@ -0,0 +1,21 @@
{
"rawname": "sccp_manager",
"repo": "extended",
"name": "Sccp Manager",
"version": "14.2.0.3",
"publisher": "Steve Lad",
"license": "GPL",
"licenselink": "http://www.gnu.org/licenses/gpl.txt",
"changelog": "*14.2.0.3* Fix module database definition\n*14.2.0.3* Fix module database definition\n*14.2.0.2* First release of new version without old interface\n*13.0.0.1* Packaging of ver 1.0.0.1\n*12.0.0.1* Packaging of ver 1.0.0.1",
"category": "Sccp Connectivity",
"description": "The Cisco Manager module lets you manage the chan-sccp module.",
"depends": {
"version": "14.0"
},
"supported": {
"version": "13.0"
},
"location": "https://github.com/chan-sccp/sccp_manager/archive/refs/tags/v14.2.0.3.tar.gz",
"md5sum": "9aff57a6553a4a3649e056013fe1758f",
"packaged": "1623001021"
}

View file

@ -1,42 +0,0 @@
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
// vim: set ai ts=4 sw=4 ft=phtml:
?>
<div class="fpbx-container container-fluid">
<div class="row">
<div class="col-sm-12">
<div class="display no-border">
<h1><?php echo _("Cisco Dial Template") ?></h1>
<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">&nbsp;</i><?php echo _("Add Dialplan") ?></a>
<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>
</button>
</div>
<table data-cookie="true" data-cookie-id-table="sccp-dialtemplate-table" data-url="ajax.php?module=sccp_manager&command=getDialTemplate" 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>
<tr>
<!-- <th data-checkbox="true"></th> -->
<th data-sortable="true" data-field="id"><?php echo _('Template name') ?></th>
<th data-field="actions" data-formatter="DispayDPActionsKeyFormatter"><?php echo _('Actions') ?></th>
</tr>
</thead>
</table>
</div>
</div>
</div>
</div>
<script>
function DispayDPActionsKeyFormatter(value, row, index) {
var exp_model = '';
exp_model += '<a href="?display=sccp_adv&tech_hardware=dialplan&extdisplay=' + row['id'] + '"><i class="fa fa-pencil"></i></a> &nbsp; &nbsp;\n';
if (row['id'] !== 'dialplan') {
exp_model += '</a> &nbsp;<a class="btn-item-delete" data-for="dialplan" data-id="' + row['id'] + '"><i class="fa fa-trash"></i></a>';
}
return exp_model;
}
</script>

View file

@ -1,176 +0,0 @@
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
$keymultiselect = array('AllRight' =>'>>', 'Right' => '>', 'AllLeft' => '<<', 'Left' => '<');
// ------------------------------------- Key Set Value ---------------------------------------------------------
$keysetarray = $this->extconfigs->getExtConfig('keyset');
/*$keysetarray1 = array('onhook' => array('redial','newcall','cfwdall','dnd','pickup','gpickup','private'),
'connected' => array('hold','endcall','park','vidmode','select','cfwdall','cfwdbusy','idivert'),
'onhold' => array('resume','newcall','endcall','transfer','conflist','select','dirtrfr','idivert','meetme'),
'ringin' => array('answer','endcall','transvm','idivert'),
'offhook' => array('redial','endcall','private','cfwdall','cfwdbusy','pickup','gpickup','meetme','barge'),
'conntrans' => array('hold','endcall','transfer','conf','park','select','dirtrfr','vidmode','meetme','cfwdall','cfwdbusy'),
'digitsfoll' => array('back','endcall','dial'),
'connconf' => array('conflist','newcall','endcall','hold','vidmode'),
'ringout' => array('empty','endcall','transfer','cfwdall','idivert'),
'offhookfeat'=> array('redial','endcall'),
'onhint' => array('redial','newcall','pickup','gpickup','barge'),
'onstealable'=> array('redial','newcall','cfwdall','pickup','gpickup','dnd','intrcpt'),
'holdconf' => array('resume','newcall','endcall','join'),
'uriaction' => array('default'));
*/
// ------------------------------------- Key Set Display information ---------------------------------------------------------
$keynamearray = array('onhook' => array('sname' => 'ONHOOK', 'name' =>'Display Onhook', 'help' =>'help.'),
'connected' => array('sname' => 'CONNECTED', 'name' =>'Display Connected', 'help' =>'help.'),
'onhold' => array('sname' => 'ONHOLD', 'name' =>'Display onhold', 'help' =>'help.'),
'ringin' => array('sname' => 'RINGIN', 'name' =>'Display ringin', 'help' =>'help.'),
'offhook' => array('sname' => 'OFFHOOK', 'name' =>'Display offhook', 'help' =>'help.'),
'conntrans' => array('sname' => 'CONNTRANS', 'name' =>'Display conntrans', 'help' =>'help.'),
'digitsfoll' => array('sname' => 'DIGITSFOLL', 'name' =>'Display digitsfoll', 'help' =>'help.'),
'connconf' => array('sname' => 'CONNCONF', 'name' =>'Display connconf', 'help' =>'help.'),
'ringout' => array('sname' => 'RINGOUT', 'name' =>'Display ringout', 'help' =>'help.'),
'offhookfeat'=> array('sname' => 'OFFHOOKFEAT', 'name' =>'Display offhookfeat', 'help' =>'help.'),
'onhint' => array('sname' => 'ONHINT', 'name' =>'Display onhint', 'help' =>'help.'),
'onstealable'=> array('sname' => 'onstealable', 'name' =>'Display onstealable', 'help' =>'help.'),
'holdconf' => array('sname' => 'HOLDCONF', 'name' =>'Display holdconf', 'help' =>'help.'),
'uriaction' => array('sname' => '', 'name' =>'Display uriaction', 'help' =>'help.')
);
?>
<form autocomplete="off" name="frm_keyset" id="frm_keyset" class="fpbx-submit" action="" method="post">
<input type="hidden" name="category" value="keysetform">
<input type="hidden" name="Submit" value="Submit">
<div class="fpbx-container container-fluid">
<div class="row">
<div class="col-sm-12">
<div class="display no-border">
<div id="toolbar-all">
<button type="button" class="btn btn-primary btn-lg" data-toggle="modal" onclick="load_oncliсk(this,'*new*')" data-target=".edit_new_keyset"><i class="fa fa-bolt"></i> <?php echo _("Add Keyset"); ?></button>
</div>
<table data-cookie="true" data-cookie-id-table="sccp_keyset-all" data-url="ajax.php?module=sccp_manager&command=getSoftKey&type=active" data-cache="false" data-show-refresh="true" data-toolbar="#toolbar-all" 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" id="softkey-all" data-unique-id="softkeys">
<thead>
<tr>
<th data-sortable="true" data-field="softkeys"><?php echo _('KeySetName')?></th>
<?php
$i = 0;
foreach ($keynamearray as $key => $value) {
if ($i < 12) {
echo '<th data-sortable="false" data-field="'.$key.'">'._($value['sname']).'</th>';
}
$i ++;
}
?>
<th data-field="actions" data-formatter="DispayActionsKeyFormatter"><?php echo _('Actions')?></th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
</div>
</form>
<!-- Begin Form Input New / Edit -->
<div class="modal fade edit_new_keyset" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel2">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="gridSystemModalLabel">Add New KeySet</h4>
</div>
<div class="modal-body">
<style type="text/css">
input:invalid {border: red solid 3px;}
</style>
<div class="element-container">
<div class="row">
<div class="form-group">
<div class="col-md-3">
<label class="control-label" for="new_keysetname">Name Keyset</label>
<i class="fa fa-question-circle fpbx-help-icon" data-for="new_devmodel"></i>
</div>
<div class="col-md-9">
<input type="text" maxlength="15" pattern="[a-zA-Z0-9]{4,15}" class="form-control" id="new_keySetname" name="new_keySetname" value="SoftKeyset">
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<span id="new_devmodel-help" class="help-block fpbx-help-block">Max length 15 letters or numbers without spaces</span>
</div>
</div>
</div>
<ul class="nav nav-tabs" role="tablist">
<?php
$i = 0;
foreach ($keysetarray as $key => $value) {
if ($i == 0) {
echo '<li role="presentation" data-name="'.$key.'" class="active">';
} else {
echo '<li role="presentation" data-name="'.$key.'" class="change-tab">';
}
echo '<a href="#'.$key.'" aria-controls="'.$key.'" role="tab" data-toggle="tab">'._($key);
echo '</a></li>';
$i ++;
}
?>
</ul>
<div class="tab-content display">
<?php
$i = 0;
foreach ($keysetarray as $key => $value) {
if ($i == 0) {
echo '<div role="tabpanel" id="'.$key.'" class="tab-pane active">';
} else {
echo '<div role="tabpanel" id="'.$key.'" class="tab-pane">';
}
echo '<div class="element-container"><div class="row"><div class="form-group"><div class="col-md-3"><label class="control-label" for="'.$key.'">'._($keynamearray[$key]['name']).'</label>';
echo '<i class="fa fa-question-circle fpbx-help-icon" data-for="'.$key.'"></i></div>';
echo '<div class="col-md-4"><select multiple class="form-control sccpmultiselect" name="av_'.$key.'" id="source_'.$key.'">';
$row_dada= explode(',', $value);
foreach ($row_dada as $data) {
echo '<option value="'.$data.'">'.$data.'</option>';
}
echo '</select></div><div class="col-md-1">';
foreach ($keymultiselect as $btkey => $btval) {
echo '<input type="button" class="btnMultiselect" data-id="'.$key.'" data-key="'.$btkey.'" value="'.$btval.'">';
}
echo '</div><div class="col-md-4"><select multiple class="form-control" name="sel_'.$key.'" id="destination_'.$key.'">';
echo '</select></div></div></div><div class="row"><div class="col-md-12">';
echo '<span id="'.$key.'-help" class="help-block fpbx-help-block">'._($keynamearray[$key]['help']).'</span>';
echo '</div></div></div></div>';
$i ++;
}
?>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary sccp_update" data-id="keyset_add" data-mode="new" id="keyset_add" data-dismiss="modal">Save</button>
</div>
</div>
</div>
</div>
<script>
function DispayActionsKeyFormatter(value, row, index) {
var exp_model = '';
if (row['softkeys'] !== 'default') {
exp_model += '<a href="#edit_softkeys" onclick="load_oncliсk(this, &quot;'+row['softkeys']+'&quot;)" data-toggle="modal" data-target=".edit_new_keyset"><i class="fa fa-pencil"></i></a>&nbsp;';
exp_model += '</a> &nbsp;<a class="btn-item-delete" data-for="softkeys" data-id="' + row['softkeys'] + '"><i class="fa fa-trash"></i></a>';
}
return exp_model;
}
</script>

View file

@ -1,330 +0,0 @@
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
$requestType = 'firmware';
global $amp_conf;
?>
<div class="fpbx-container container-fluid">
<div class="row">
<div class="col-sm-12">
<div class="display no-border">
<div id="toolbar-model">
<button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target=".add_new_model"><i class="fa fa-bolt"></i> <?php echo _("Add model"); ?>
</button>
<button data-id="model_disabled" class="btn btn-danger sccp_update btn-tab-select" data-type="sccp_model" data-table="table-models" disabled data-section="all">
<i class="glyphicon glyphicon-remove"></i> <span><?php echo _('Disable') ?></span>
</button>
<button data-id="model_enabled" class="btn btn-danger sccp_update btn-tab-select" data-table="table-models" data-type="sccp_model" disabled data-section="all">
<i class="glyphicon glyphicon-active"></i> <span><?php echo _('Enable') ?></span>
</button>
<div class="btn-group">
<a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
<BtnCaption class="dropdown_capture"><?php echo _('Show Enabled') ?></BtnCaption>
<span class="caret"></span>
</a>
<ul class="dropdown-menu">
<li><a class="dropitem" data-id="enabled" tabindex="-1" href="#"><span><?php echo _('Show Enabled') ?></span></a></li>
<li><a class="dropitem" data-id="extension" tabindex="-1" href="#"><span><?php echo _('Expansion Module')?></span></a></li>
<li><a class="dropitem" data-id="all" tabindex="-1" href="#"><span><?php echo _('Show All') ?></span></a></li>
</ul>
</div>
<button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target=".get_ext_file_<?php echo $requestType; ?>"><i class="fa fa-bolt"></i> <?php echo _("Update Files from Provisioner"); ?>
</button>
</div>
<table data-cookie="true" data-row-style="SetRowColor" data-cookie-id-table="sccp_model-all" data-url="ajax.php?module=sccp_manager&command=getDeviceModel&type=enabled" data-cache="false" data-show-refresh="true" data-toolbar="#toolbar-model" data-maintain-selected="true" data-show-columns="true" data-show-toggle="true" data-toggle="table" data-pagination="true" data-search="true" class="table table-condensed" id="table-models" data-id="model" data-unique-id="model">
<thead>
<tr>
<th data-checkbox="true"></th>
<th data-sortable="false" data-formatter="StatusIconFormatter" data-field="enabled"><?php echo _('Enabled');?></th>
<th data-sortable="true" data-field="model"><?php echo _('Device Model');?></th>
<th data-sortable="true" data-field="vendor"><?php echo _('Vendor');?></th>
<th data-sortable="false" data-formatter="DisplayDnsFormatter" data-field="dns"><?php echo _('Expansion Module');?></th>
<th data-sortable="false" data-field="buttons"><?php echo _('Buttons');?></th>
<th data-sortable="false" data-formatter="SetColFirmNf" data-field="loadimage"><?php echo _('Loadimage');?></th>
<th data-sortable="false" data-field="loadinformationid"><?php echo _('Loadinformation ID');?></th>
<th data-sortable="false" data-formatter="SetColTemplNf" data-field="nametemplate"><?php echo _('Model template');?></th>
<th data-field="actions" data-formatter="DispayActionsModelFormatter"><?php echo _('Actions');?></th>
</tr>
</thead>
</table>
</div>
</div>
</div>
</div>
<!-- Begin Form Input New -->
<div class="modal fade add_new_model" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="gridSystemModalLabel"><?php echo _('Add new model');?></h4>
</div>
<div class="modal-body">
<div class="element-container"><div class="row"> <div class="form-group"><div class="col-md-3">
<label class="control-label" for="new_model"><?php echo _('Device Model');?></label>
<i class="fa fa-question-circle fpbx-help-icon" data-for="new_model"></i>
</div><div class="col-md-9">
<input type="text" class="form-control" id="new_model" name="new_model" value="79XX">
</div> </div></div>
<div class="row"><div class="col-md-12">
<span id="new_model-help" class="help-block fpbx-help-block">Help.</span>
</div></div></div>
<div class="element-container"><div class="row"> <div class="form-group"><div class="col-md-3">
<label class="control-label" for="new_vendor"><?php echo _('Vendor name');?></label>
<i class="fa fa-question-circle fpbx-help-icon" data-for="new_vendor"></i>
</div><div class="col-md-9">
<input type="text" class="form-control" id="new_vendor" name="new_vendor" value="CISCO">
</div> </div></div>
<div class="row"><div class="col-md-12">
<span id="new_vendor-help" class="help-block fpbx-help-block">Use "CISCO" for the Skinny Client Control Protocol and "CISCO-SIP" for the CISCO Sip Protocol</span>
</div></div></div>
<div class="element-container"><div class="row"> <div class="form-group"><div class="col-md-3">
<label class="control-label" for="new_dns"><?php echo _('Expansion Module');?></label>
<i class="fa fa-question-circle fpbx-help-icon" data-for="new_dns"></i>
</div><div class="col-md-9">
<select name="new_dns" id="new_dns">
<option value="1" selected='selected'>Phone - no sidecars.</option>
<option value="2">Phone - one sidecar.</option>
<option value="3">Phone - two sidecars.</option>
<option value="0">Sidecar</option>
</select>
</div> </div></div>
<div class="row"><div class="col-md-12">
<span id="new_dns-help" class="help-block fpbx-help-block">Help.</span>
</div></div></div>
<div class="element-container"><div class="row"> <div class="form-group"><div class="col-md-3">
<label class="control-label" for="new_buttons"><?php echo _('Model Line Buttons');?></label>
<i class="fa fa-question-circle fpbx-help-icon" data-for="new_buttons"></i>
</div><div class="col-md-9">
<input type="number" min="1" min="96" class="form-control" id="new_buttons" name="new_buttons" value="1">
</div> </div></div>
<div class="row"><div class="col-md-12">
<span id="new_buttons-help" class="help-block fpbx-help-block">Help.</span>
</div></div></div>
<div class="element-container"><div class="row"> <div class="form-group"><div class="col-md-3">
<label class="control-label" for="new_loadimage"><?php echo _('Load Image');?></label>
<i class="fa fa-question-circle fpbx-help-icon" data-for="new_loadimage"></i>
</div><div class="col-md-9">
<input type="text" class="form-control" id="new_loadimage" name="new_loadimage" value="">
</div> </div></div>
<div class="row"><div class="col-md-12">
<span id="new_loadimage-help" class="help-block fpbx-help-block">Help.</span>
</div></div></div>
<div class="element-container"><div class="row"> <div class="form-group"><div class="col-md-3">
<label class="control-label" for="new_loadinformationid"><?php echo _('Load Information ID');?></label>
<i class="fa fa-question-circle fpbx-help-icon" data-for="new_loadinformationid"></i>
</div><div class="col-md-9">
<input type="text" class="form-control" id="new_loadinformationid" name="new_loadinformationid" value="">
</div> </div></div>
<div class="row"><div class="col-md-12">
<span id="new_loadinformationid-help" class="help-block fpbx-help-block">Help.</span>
</div></div></div>
<div class="element-container"><div class="row"> <div class="form-group"><div class="col-md-3">
<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_nametemplate"></i>
</div><div class="col-md-9">
<input type="text" class="form-control" id="new_nametemplate" name="new_nametemplate" value="">
</div> </div></div>
<div class="row"><div class="col-md-12">
<span id="new_nametemplate-help" class="help-block fpbx-help-block">Help.</span>
</div></div></div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal"><?php echo _('Close');?></button>
<button type="button" class="btn btn-primary sccp_update" data-id="model_add" id="add_new_model" data-dismiss="modal"><?php echo _('Add New model - Disabled');?></button>
</div>
</div>
</div>
</div>
<?php
$selectArray = array();
//below probably unnecessary as installer should ensure that a copy always exists
// TODO: Maybe should always check here to ensure that have latest
if (!file_exists("{$this->sccppath['tftp_path']}/masterFilesStructure.xml")) {
if (!$this->getFileListFromProvisioner($this->sccppath['tftp_path'])) {
// File does not exist and cannot get from internet.
return $result;
};
}
$tftpBootXml = simplexml_load_file("{$this->sccppath['tftp_path']}/masterFilesStructure.xml");
$firmwareDir = $tftpBootXml->xpath("//Directory[@name='firmware']");
foreach ($firmwareDir[0] as $child) {
if (!empty((string)$child['name'])) {
$selectArray[(string)$child['name']] = (string)$child['name'];
}
};
include($amp_conf['AMPWEBROOT'] . '/admin/modules/sccp_manager/views/getFileModal.html');
?>
<div class="modal fade" id="edit_model" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="gridSystemModalLabel"><?php echo _('Modal title');?></h4>
</div>
<div class="modal-body">
<div class="element-container"><div class="row"> <div class="form-group"><div class="col-md-3">
<label class="control-label" for="editd_model"><?php echo _('Device Model');?></label>
<i class="fa fa-question-circle fpbx-help-icon" data-for="editd_model"></i>
</div><div class="col-md-9">
<input type="text" class="form-control" id="editd_model" name="editd_model" value="79XX" disabled>
</div> </div></div>
<div class="row"><div class="col-md-12">
<span id="editd_model-help" class="help-block fpbx-help-block">Help.</span>
</div></div></div>
<div class="element-container"><div class="row"> <div class="form-group"><div class="col-md-3">
<label class="control-label" for="editd_vendor"><?php echo _('Vendor name');?></label>
<i class="fa fa-question-circle fpbx-help-icon" data-for="editd_vendor"></i>
</div><div class="col-md-9">
<input type="text" class="form-control" id="editd_vendor" name="editd_vendor" value="CISCO">
</div> </div></div>
<div class="row"><div class="col-md-12">
<span id="editd_vendor-help" class="help-block fpbx-help-block">Use "CISCO" for the Skinny Client Control Protocol and "CISCO-SIP" for the CISCO Sip Protocol</span>
</div></div></div>
<div class="element-container"><div class="row"> <div class="form-group"><div class="col-md-3">
<label class="control-label" for="editd_dns"><?php echo _('Expansion Module');?></label>
<i class="fa fa-question-circle fpbx-help-icon" data-for="editd_dns"></i>
</div><div class="col-md-9">
<select name="editd_dns" id="editd_dns">
<option value="1" selected='selected'>Phone - no sidecars.</option>
<option value="2">Phone - one sidecar.</option>
<option value="3">Phone - two sidecars.</option>
<option value="0">Sidecar</option>
</select>
</div> </div></div>
<div class="row"><div class="col-md-12">
<span id="editd_dns-help" class="help-block fpbx-help-block">Help.</span>
</div></div></div>
<div class="element-container"><div class="row"> <div class="form-group"><div class="col-md-3">
<label class="control-label" for="editd_buttons"><?php echo _('Model Line Buttons');?></label>
<i class="fa fa-question-circle fpbx-help-icon" data-for="editd_buttons"></i>
</div><div class="col-md-9">
<input type="number" min="1" min="96" class="form-control" id="editd_buttons" name="editd_buttons" value="1">
</div> </div></div>
<div class="row"><div class="col-md-12">
<span id="editd_buttons-help" class="help-block fpbx-help-block">Help.</span>
</div></div></div>
<div class="element-container"><div class="row"> <div class="form-group"><div class="col-md-3">
<label class="control-label" for="editd_loadimage"><?php echo _('Load Image');?></label>
<i class="fa fa-question-circle fpbx-help-icon" data-for="editd_loadimage"></i>
</div><div class="col-md-9">
<input type="text" class="form-control" id="editd_loadimage" name="editd_loadimage" value="">
</div> </div></div>
<div class="row"><div class="col-md-12">
<span id="editd_loadimage-help" class="help-block fpbx-help-block">Help.</span>
</div></div></div>
<div class="element-container"><div class="row"> <div class="form-group"><div class="col-md-3">
<label class="control-label" for="editd_loadinformationid"><?php echo _('Load Information ID');?></label>
<i class="fa fa-question-circle fpbx-help-icon" data-for="editd_loadinformationid"></i>
</div><div class="col-md-9">
<input type="text" class="form-control" id="editd_loadinformationid" name="editd_loadinformationid" value="">
</div> </div></div>
<div class="row"><div class="col-md-12">
<span id="editd_loadinformationid-help" class="help-block fpbx-help-block">Help.</span>
</div></div></div>
<div class="element-container"><div class="row"> <div class="form-group"><div class="col-md-3">
<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_nametemplate"></i>
</div><div class="col-md-9">
<input type="text" class="form-control" id="editd_nametemplate" name="editd_nametemplate" value="">
</div> </div></div>
<div class="row"><div class="col-md-12">
<span id="editd_nametemplate-help" class="help-block fpbx-help-block">Help.</span>
</div></div></div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal"><?php echo _('Close');?></button>
<button type="button" class="btn btn-primary sccp_update" data-id="model_apply" data-dismiss="modal"><?php echo _('apply');?></button>
</div>
</div>
</div>
</div>
<script>
function StatusIconFormatter(value, row) {
return (value === '1') ? '<i class="fa fa-check-square-o" style="color:green" title="<?php echo _("Device is enabled")?>"></i>' : '<i class="fa fa-square-o" title="<?php echo _("Device is disabled")?>"></i>';
}
function DisplayDnsFormatter(value, row, index) {
var exp_model = ['Expansion Module', 'Not Available', 'One ExpModule', 'Two ExpModule'];
return exp_model[value];
}
// function DispayInputFormatter(value, row, index) {
// 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) {
var exp_model = '';
// exp_model += '<a href="#edit_model" class="btn btn-info" onclick="load_model(this, &quot;'+row['model']+'&quot;)" data-toggle="modal"><i class="fa fa-pencil"></i></a>';
exp_model += '<a href="#edit_model" onclick="load_model(this, &quot;'+row['model']+'&quot;)" data-toggle="modal"><i class="fa fa-pencil"></i></a>&nbsp;&nbsp;';
exp_model += '</a> &nbsp;<a class="btn-item-delete" data-for="model" data-id="' + row['model'] + '"><i class="fa fa-trash"></i></a>';
return exp_model;
}
function SetColFirmNf(value, row, index) {
if (row['validate'].split(';')[0] === 'no') {
return "File not found<br />" + value;
}
return value;
}
function SetColTemplNf(value, row, index) {
if (row['validate'].split(';')[1] === 'no') {
return "File not found<br /> " + value ;
}
return value;
}
function SetRowColor(row, index) {
var tclass = "active";
if (row['enabled'] === 1) {
tclass = (index % 2 === 0) ? "info" : "info";
}
if ((row['validate'] === 'yes;yes') || (row['validate'] === 'yes;-')) {
// tclass = (row['enabled'] === '1') ? "danger" : "warning";
} else {
tclass = (row['enabled'] === '1') ? "danger" : "warning";
}
return {classes: tclass};
}
function load_model(elmnt,clr) {
// $("#edit_devmodel").text(clr);
var drow = $("#table-models").bootstrapTable('getRowByUniqueId',clr);
if (drow == null) {
alert(drow);
} else {
document.getElementById("editd_model").value = clr;
document.getElementById("editd_loadimage").value = drow['loadimage'];
document.getElementById("editd_nametemplate").value = drow['nametemplate'];
document.getElementById("editd_loadinformationid").value = drow['loadinformationid'];
document.getElementById("editd_dns").value = drow['dns'];
document.getElementById("editd_vendor").value = drow['vendor'];
document.getElementById("editd_buttons").value = drow['buttons'];
}
}
</script>

View file

@ -1,150 +0,0 @@
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
$def_val = array();
$dev_id = null;
$device_warning= null;
// Default value from Server setings
//Get default values. Will use these for a new device, and modify for an existing.
$def_val = $this->getTableDefaults('sccpdevice');
$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'])) {
// Adding device that is connected but not in database
$dev_id = $_REQUEST['new_id'];
// Overwrite some specific defaults based on $_REQUEST
$def_val['type'] = array("keyword" => 'type', "data" => $_REQUEST['type'], "seq" => "99");
if (!empty($_REQUEST['addon'])) {
$def_val['addon'] = array("keyword" => 'type', "data" => $_REQUEST['addon'], "seq" => "99");
}
}
if (!empty($_REQUEST['id'])) {
// Editing an existing Device. Overwrite any defaults that are already set for this device.
$dev_id = $_REQUEST['id'];
$db_res = $this->dbinterface->getSccpDeviceTableData('get_sccpdevice_byid', array("id" => $dev_id));
foreach ($db_res as $key => $val) {
if (!empty($val)) {
switch ($key) {
case 'phonepersonalization':
$def_val['phonepersonalization'] = array("keyword" => 'phonepersonalization', "data" => $val, "seq" => "99");
break;
default:
// Overwrite existing defaults after checking that data is still valid after schema updates
// Do not strip underscores as these fields are new in the schema and so should be valid.
$enumFields = $this->getTableEnums('sccpdevice', false);
if (array_key_exists($key, $enumFields)){
// This field is (now) an enum. Check the current value is acceptable.
// Quote value as enum values are quoted.
if (in_array("'{$val}'", $enumFields[$key])) {
// The value is valid so will keep
$def_val[$key] = array('keyword' => $key, 'data' => $val, 'seq' => 99);
}
// Do not store value and let defaults apply
break;
}
$def_val[$key] = array("keyword" => $key, "data" => $val, "seq" => "99");
// Need to assign defaultLine as not set in the db.
$def_val['defaultLine'] = $this->dbinterface->getSccpDeviceTableData('getDefaultLine', array('id' => $dev_id))['name'];
break;
}
}
}
}
if (!empty($def_val['type'])) {
$tmp_raw = $this->getSccpModelInformation('byid', true, 'all', array('model'=>$def_val['type']));
if (!empty($tmp_raw[0])) {
$tmp_raw = $tmp_raw[0];
}
if (!empty($tmp_raw['validate'])) {
$tmpar = explode(";", $tmp_raw['validate']);
if ($tmpar[0] != 'yes') {
$device_warning['Image'] = array('Device firmware not found : '.$tmp_raw['loadimage']);
}
if ($tmpar[1] != 'yes') {
$device_warning['Template'] = array('Missing device configuration template : '. $tmp_raw['nametemplate']);
}
if (!empty($device_warning)) {
?>
<div class="fpbx-container container-fluid">
<div class="row">
<div class="container">
<h2 style="border:2px solid Tomato;color:Tomato;" >Warning in the SCCP Device</h2>
<div class="table-responsive">
<pre>
<?php
foreach ($device_warning as $key => $value) {
echo '<h3>'.$key.'</h3>';
if (is_array($value)) {
echo '<li>'._(implode('</li><li>', $value)).'</li>';
} else {
echo '<li>'. _($value).'</li>';
}
}
?>
</pre>
</div>
</div>
</div>
</div>
<br>
<?php }
}
} ?>
<form autocomplete="off" name="frm_adddevice" id="frm_adddevice" class="fpbx-submit" action="" method="post" data-id="hw_edit">
<input type="hidden" name="category" value="adddevice_form">
<input type="hidden" name="Submit" value="Submit">
<?php
if (empty($dev_id)) {
echo '<input type="hidden" name="sccp_deviceid" value="new">';
} else {
$val = str_replace(array('SEP','ATA','VG'), '', $dev_id);
$val = implode(':', sscanf($val, '%2s%2s%2s%2s%2s%2s')); // Convert to Cisco display Format
$def_val['mac'] = array("keyword" => 'mac', "data" => $val, "seq" => "99");
echo '<input type="hidden" name="sccp_device_id" value="'.$dev_id.'">';
}
if ($_REQUEST['tech_hardware'] == 'cisco') {
echo '<input type="hidden" name="sccp_device_typeid" value="sccpdevice">';
if (empty($dev_id)) {
echo $this->showGroup('sccp_hw_dev', 1, 'sccp_hw', $def_val);
} else {
echo $this->showGroup('sccp_hw_dev_edit', 1, 'sccp_hw', $def_val);
}
echo $this->showGroup('sccp_hw_dev2', 1, 'sccp_hw', $def_val);
echo $this->showGroup('sccp_hw_dev_advance', 1, 'sccp_hw', $def_val);
echo $this->showGroup('sccp_hw_dev_softkey', 1, 'sccp_hw', $def_val);
// echo $this->showGroup('sccp_hw_dev_pickup', 1, 'sccp_hw', $def_val); This are line properties and does not exist!
echo $this->showGroup('sccp_hw_dev_conference', 1, 'sccp_hw', $def_val);
echo $this->showGroup('sccp_dev_vendor_conf', 1, 'vendorconfig', $def_val);
echo $this->showGroup('sccp_hw_dev_network', 1, 'sccp_hw', $def_val);
} else if ($_REQUEST['tech_hardware'] == 'cisco-sip') {
echo '<input type="hidden" name="sccp_device_typeid" value="sipdevice">';
/*
if (empty($dev_new)) {
echo '<input type="hidden" name="sccp_deviceid" value="new">';
} else {
echo '<input type="hidden" name="sccp_deviceid" value="'.$dev_id.'">';
}
*/
if (empty($dev_id)) {
echo $this->showGroup('sccp_hw_sip_dev', 1, 'sccp_hw', $def_val);
} else {
echo $this->showGroup('sccp_hw_dev_edit', 1, 'sccp_hw', $def_val);
}
echo $this->showGroup('sccp_hw_sip_dev2', 1, 'sccp_hw', $def_val);
echo $this->showGroup('sccp_hw_sip_conf', 1, 'sccp_hw', $def_val);
}
?>
</form>

View file

@ -1,34 +0,0 @@
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
$def_val = null;
$dev_id = null;
$dev_new = null;
if (!empty($_REQUEST['ru_id'])) {
$dev_id = $_REQUEST['ru_id'];
$def_val['id'] = array("keyword" => 'id', "data" => $dev_id, "seq" => "99");
$db_res = $this->dbinterface->getSccpDeviceTableData('get_sccpuser', array("id" => $dev_id));
if (!empty($db_res)) {
foreach ($db_res as $key => $val) {
if (!empty($val)) {
$def_val[$key] = array("keyword" => $key, "data" => $val, "seq" => "99");
}
}
}
}
?>
<form autocomplete="off" name="frm_addruser" id="frm_addruser" class="fpbx-submit" action="" method="post" data-id="ruser_edit">
<input type="hidden" name="category" value="addruser_form">
<input type="hidden" name="Submit" value="Submit">
<?php
echo $this->showGroup('sccp_ruser', 1, 'sccp_ru', $def_val);
echo $this->showGroup('sccp_ruser_time', 1, 'sccp_ru', $def_val);
?>
</form>

View file

@ -1,274 +0,0 @@
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
$forminfo =array(
array('name'=>'dev_buttons', 'label'=>'Buttons Configuration'),
array('name'=>'button', 'label'=>'Buttons', 'help'=>'help')
);
//$buttons_type= array("empty","line","service","feature","speeddial");
// "feature","service" -- Add leter !
$buttons_type= array("empty","line","silent","monitor","speeddial","feature","adv.line");
$feature_list= array('parkinglot'=>'Park Slots','monitor'=> "Record Calls",'devstate'=> "Change Status");
if ($_REQUEST['tech_hardware'] === 'cisco') {
$lines_list = $this->dbinterface->getSccpDeviceTableData('SccpExtension');
} else {
$lines_list = $this->dbinterface->getSipTableData('extensionList');
}
$hint_list = $this->getHintInformation(true, array('context'=>'park-hints')) ;
$line_id =0;
$max_buttons =56; //Don't know hardware type so set a maximum. On save, this is set to actual max buttons
$show_buttons =1;
if (!empty($_REQUEST['id'])) {
$dev_id = $_REQUEST['id'];
$db_buttons = $this->dbinterface->getSccpDeviceTableData('get_sccpdevice_buttons', array("id" => $dev_id));
$db_device = $this->dbinterface->getSccpDeviceTableData('get_sccpdevice_byid', array("id" => $dev_id));
$show_buttons = $db_device['buttons'];
if (!empty($db_device['addon_buttons'])) {
$show_buttons += $db_device['addon_buttons'];
}
//$show_buttons = $max_buttons;
}
if (!empty($_REQUEST['new_id'])) {
$val = $_REQUEST['type'];
$dev_schema = $this-> getSccpModelInformation('byid', false, "all", array('model' =>$val));
// $db_device = $this->dbinterface->getSccpDeviceTableData('get_sccpdevice_byid', array("id" => $val));
$show_buttons = $dev_schema[0]['buttons'];
if (!empty($_REQUEST['addon'])) {
$val = $_REQUEST['addon'];
$dev_schema = $this-> getSccpModelInformation('byid', false, "all", array('model' =>$val));
$show_buttons += $dev_schema[0]['buttons'];
}
//$show_buttons = $max_buttons;
}
if (!empty($_REQUEST['ru_id'])) {
$dev_id = $_REQUEST['ru_id'];
$db_buttons = $this->dbinterface->getSccpDeviceTableData('get_sccpdevice_buttons', array("id" => $dev_id));
$show_buttons = $max_buttons;
}
?>
<form autocomplete="off" name="frm_editbuttons" id="frm_editbuttons" class="fpbx-submit" action="" method="post" data-id="hw_edit">
<input type="hidden" name="category" value="frm_editbuttons">
<input type="hidden" name="Submit" value="Submit">
<input type="hidden" name="buttonscount" id="buttonscount" value="<?php echo $show_buttons;?>">
<input type="hidden" name="devButtonCnt" id="devButtonCnt" value="<?php echo (!empty($db_device['buttons']))?$db_device['buttons']:0;?>">
<input type="hidden" name="addonCnt" id="addonCnt" value="<?php echo (!empty($db_device['dns']))?$db_device['dns']:0;?>">
<div class="section-title" data-for="<?php echo $forminfo[0]['name'];?>">
<h3><i class="fa fa-minus"></i><?php echo _($forminfo[0]['label']) ?></h3>
</div>
<div class="section" data-id="<?php echo $forminfo[0]['name'];?>">
<div class="row"> <div class="form-group">
<div class="col-sm-2">
<label class="control-label">Help</label>
<i class="fa fa-question-circle fpbx-help-icon" data-for="frmbuttons"></i>
</div>
<div class="col-sm-10">
<span id="frmbuttons-help" class="help-block fpbx-help-block"><?php echo _("buttons come in the following flavours: <br>
<ul>
<li>empty: Empty button (no options)</li>
<li>line: Registers the line with identifier specified as [name]</li>
<li>silent: buttons equal 'Line' with out ring</li>
<li>monitor: buttons mode speeddial + show status</li>
<li>speeddial: Adds a speeddial with label [name] and [option1] as number Optionally, [option2] can be used to specify a hint by extension@context as usual.</li>
<li>service (not implemented): Adds a service url Feature buttons have an on/off status represented on the device with a tick-box and can be used to set the device in a particular state. Currently Possible [option1],[option2] combinations:</li>
<ul>
<li>privacy,callpresent = Make a private call, number is suppressed</li><li>privacy,hint = Make a private call, hint is suppressed</li><li>cfwdall,number = Forward all calls </li><li>cfwbusy,number = Forward on busy</li><li>
cfwnoaswer,number = Forward on no-answer (not implemented yet)<br> DND,busy = Do-not-disturb, return Busy signal to Caller <br> DND,silent = Do-not-disturb, return nothing to caller <br>
monitor = Record Calls using AutoMon (asterisk 1.6.x only)</li><li>devstate,custom_devstate = Device State Feature Button (asterisk 1.6.1 and up). custom_devstate is the name of the custom devicestate to be toggled (How to use devicestate)
hold = To be implemented</li><li>transfer = To be implemented</li><li>multiblink = To be implemented</li><li>mobility = To be implemented</li><li>conference = To be implemented</li>
</ui></ui>");?></span>
</div>
</div></div>
<?php
for ($line_id = 0; $line_id <$max_buttons; $line_id ++) {
$show_form_mode = '';
$defaul_tv = (empty($db_buttons[$line_id])) ? "empty": $db_buttons[$line_id]['buttontype'];
$defaul_btn = (empty($db_buttons[$line_id])) ? "": $db_buttons[$line_id]['name'];
$defaul_opt = (empty($db_buttons[$line_id])) ? array(''): explode(',', $db_buttons[$line_id]['options']);
$show_form_mode = $defaul_tv;
$def_hint = ''; // Hint check Box
$def_hint_btn = ''; // Hint Combo Box
$def_park = ''; // Hint check Box
$def_silent = '';
$defaul_advline = '';
$defaul_ftr = '';
if (strpos($defaul_btn, '@') >0) {
$defaul_tv = 'adv.line';
$show_form_mode = 'adv.line';
$defaul_btn = strtok($defaul_btn, '@');
$defaul_advline = strtok('@');
}
if ($line_id == 0) {
$show_form_mode = 'line';
}
if (stripos($defaul_btn, '!') >0) {
$defaul_btn = strtok($defaul_btn, '!');
$defaul_tv = 'silent';
$def_silent = 'checked';
}
if ($defaul_tv == "feature") {
$defaul_ftr = $defaul_opt[0];
$defaul_fcod = (empty($defaul_opt[1])) ? '': $defaul_opt[1];
$def_park = (empty($defaul_opt[2])) ? '': 'checked';
// print_r($defaul_opt);
}
foreach ($defaul_opt as $data_i) {
if (strpos($data_i, '@')>0) {
$test_btn = strtok($data_i, '@');
$def_hint = 'checked';
$defaul_btn = $data_i;
$def_hint_btn = $data_i;
if ($test_btn == $defaul_opt[0]) {
foreach ($lines_list as $data) {
if ($data['name']==$test_btn) {
$show_form_mode = 'line';
$defaul_tv = 'monitor';
$defaul_btn = $test_btn;
break;
}
}
}
}
}
echo '<!-- Begin button :'.$line_id.' -->';
echo '<div class="line_button element-container" '.(($line_id < $show_buttons)?"":"hidden ").'data-id="'.$line_id.'">';
?>
<div class="row"> <div class="form-group">
<div class="col-sm-2">
<label class="control-label" for="<?php echo $forminfo[1]['name'].$line_id; ?> "><?php echo _($forminfo[1]['label'].$line_id).(($line_id =="0")?' Default ':''); ?></label>
</div>
<div class="col-sm-5">
<div class="col-xs-3">
<!-- Line Type Select -->
<select class="form-control buttontype" data-id="<?php echo $line_id;?>" name="<?php echo $forminfo[1]['name'].$line_id.'_type';?>">
<?php
if ($line_id == 0) {
echo '<option value="line" selected >DEF LINE</option>';
} else {
foreach ($buttons_type as $data) {
$select = (($data == $defaul_tv)?"selected":"");
echo '<option value="'.$data.'" '.$select.' >'.$data.'</option>';
}
}
?>
</select>
</div>
<!-- if Line Type = feature Show Futures -->
<div class="col-xs-7">
<select data-type="feature" class ="futuretype form-control lineid_<?php echo $line_id.(($show_form_mode=='feature')?'':' hidden');?>" data-id="<?php echo $line_id;?>" name="<?php echo $forminfo[1]['name'].$line_id.'_feature';?>" >
<?php
foreach ($feature_list as $fkey => $fval) {
$select = (($fkey == $defaul_ftr)?"selected":"");
echo '<option value="'.$fkey.'" '.$select.' >'.$fval.'</option>';
}
?>
</select>
<!-- if Line Type = line Show SCCP Num -->
<select data-type='line' class ="form-control lineid_<?php echo $line_id.(($show_form_mode=='line' || $show_form_mode=='adv.line')?'':' hidden');?>" name="<?php echo $forminfo[1]['name'].$line_id.'_line';?>" id="<?php echo $forminfo[1]['name'].$line_id.'_line';?>">
<?php
foreach ($lines_list as $data) {
$select = (($data['name']==$defaul_btn)?'selected="selected"':"");
echo '<option value="'.$data['name'].'" '.$select.' >'.$data['name'].' / '.$data['label'].'</option>';
}
?>
</select>
<!-- if Line Type = Othe Show Input -->
<div data-type='speeddial' class="lineid_<?php echo $line_id.(($show_form_mode=='speeddial')? '':' hidden');?>" >
<?php
echo '<input class="form-control" type="text" id="'.$forminfo[1]['name'].$line_id.'_input" name="'.$forminfo[1]['name'].$line_id.'_input" placeholder="Name" value="'.$db_buttons[$line_id]['name'].'" >';
?>
</div>
</div>
</div>
<div class="col-md-5">
<!-- if Line Type = speeddial Show Hint line -->
<div data-type='hintline' class="lineid_<?php echo $line_id.(($show_form_mode=='speeddial')? '':' hidden');?>" name="<?php echo $forminfo[1]['name'].$line_id.'_hint';?>">
<?php
echo '<div class="col-xs-5">';
echo '<input class="form-control" type="text" id="'.$forminfo[1]['name'].$line_id.'_phone" name="'.$forminfo[1]['name'].$line_id.'_phone" placeholder="Phone" value="'.$defaul_opt[0].'">';
echo '</div><div class="col-xs-2 radioset" data-toggle="buttons">';
echo '<input class="form-control" type="checkbox" name="'.$forminfo[1]['name'].$line_id.'_hint" id="'.$forminfo[1]['name'].$line_id.'_hint" '.$def_hint.' value= "hint">';
echo '<label for="'.$forminfo[1]['name'].$line_id.'_hint">hints</label>';
echo '</div><div class="col-xs-5">';
echo '<select class="form-control" name="'.$forminfo[1]['name'].$line_id.'_hline" >';
foreach ($hint_list as $data) {
$select = (($data['key']==$def_hint_btn)?"selected":"");
echo '<option value="'.$data['key'].'" '.$select.' >'.$data['exten'].' / '.$data['label'].'</option>';
}
echo '</select>';
echo '</div>';
?>
</div>
<!-- if Line Type = feature Show Futures Park -->
<div data-type='feature' class="lineid_<?php echo $line_id.(($show_form_mode=='feature')? '':' hidden');?>" name="<?php echo $forminfo[1]['name'].$line_id.'_hint';?>">
<div class="col-xs-4">
<?php
echo '<input class="form-control" type="text" id="'.$forminfo[1]['name'].$line_id.'_flabel" name="'.$forminfo[1]['name'].$line_id.'_flabel" placeholder="Display Label" value="'.$db_buttons[$line_id]['name'].'" >';
?>
</div>
<div class="col-xs-4">
<?php
echo '<input class="form-control" type="text" id="'.$forminfo[1]['name'].$line_id.'_fvalue" name="'.$forminfo[1]['name'].$line_id.'_fvalue" placeholder="code" value="'.$defaul_fcod.'" >';
?>
</div>
</div>
<!-- if Line Type = Advanced Show Hint line -->
<div data-type='adv_line' class="lineid_<?php echo $line_id.(($show_form_mode=='adv.line')? '':' hidden');?>" name="<?php echo $forminfo[1]['name'].$line_id.'_hint';?>">
<div class="col-xs-5">
<?php
echo '<input class="form-control" type="text" id="'.$forminfo[1]['name'].$line_id.'_advline" name="'.$forminfo[1]['name'].$line_id.'_advline" placeholder="[+=][01]:[cidname]" value="'.$defaul_advline.'" >';
?>
</div>
<div class="col-xs-5">
<?php
echo '<input class="form-control" type="text" id="'.$forminfo[1]['name'].$line_id.'_advopt" name="'.$forminfo[1]['name'].$line_id.'_advopt" placeholder="ButtonLabel,Options" value="'.$db_buttons[$line_id]['options'].'" >';
?>
</div>
</div>
<!-- if Line Type = feature Show Futures Park -->
<div data-type='featurep' class="lineid_<?php echo $line_id.(($show_form_mode=='feature')? (($defaul_ftr=='parkinglot')? ' ':' hidden'):' hidden');?>" name="<?php echo $forminfo[1]['name'].$line_id.'_park';?>">
<div class="col-xs-4">
<div class="radioset" data-toggle="buttons">
<?php
echo '<input class="form-control" type="checkbox" name="'.$forminfo[1]['name'].$line_id.'_retrieve" id="'.$forminfo[1]['name'].$line_id.'_retrieve" '.$def_park.' value="retrieve">';
echo '<label for="'.$forminfo[1]['name'].$line_id.'_retrieve">RetrieveSingle</label>';
?>
</div>
</div>
</div>
</div>
</div></div>
</div>
<?php
echo '<!-- End button :'.$line_id.' -->';
}
?>
</div>
</form>
<div class="section-butom" data-for="<?php echo $forminfo[0]['name'];?>">
<h3></h3>
</div>

View file

@ -1,16 +0,0 @@
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
?>
<form autocomplete="off" name="frm_advanced" id="frm_adddevice" class="fpbx-submit" action="" method="post" data-id="hw_edit">
<input type="hidden" name="category" value="deviceadvanced_form">
<input type="hidden" name="Submit" value="Submit">
<?php
echo $this->showGroup('sccp_hw_addv_device', 1, 'sccp_hw', $def_val);
?>
</form>

View file

@ -1,80 +0,0 @@
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
//$list_data = $this->getDialPlan('dialplan');
//print_r($list_data);
//$dialFelds = array('match','timeout','line','rewrite','tone');
//$dialFelds = array('match','timeout','User','rewrite','tone');
$dialFelds = array('match','timeout','rewrite','tone');
$dev_id = '*new*';
if (!empty($_REQUEST['extdisplay'])) {
$dev_id = $_REQUEST['extdisplay'];
}
if ($dev_id != '*new*') {
$list_data= $this->getDialPlan($dev_id);
$data_s= '';
foreach ($list_data['template'] as $key => $value) {
foreach ($dialFelds as $fld) {
if (isset($value[$fld])) {
$data_s .=(string)$value[$fld];
}
$data_s .= '/';
}
$data_s = substr($data_s, 0, -1);
$data_s .= ';';
}
$data_s = substr($data_s, 0, -1);
$def_val['dialtemplate'] = array("keyword" => 'dialtemplate', "data" => $data_s, "seq" => "99");
}
?>
<form autocomplete="off" name="frm_editdialtemplate" id="frm_editbuttons" class="fpbx-submit" action="" method="post" data-id="dial_template">
<input type="hidden" name="idtemplate" value="<?php echo str_replace('dial', '', $dev_id);?>">
<input type="hidden" name="Submit" value="Submit">
<?php
if ($dev_id == '*new*') {
echo $this->showGroup('sccp_dp_new_template', 0, 'sccp_dial', $def_val);
}
?>
<div class="panel panel-default">
<div class="panel-heading"><?php echo _("Dial Plan Help");?>
<a data-toggle="collapse" href="#pathelp"><i class="fa fa-plus pull-right"></i></a>
</div>
<div class="panel-body collapse" id="pathelp">
<p> <?php echo _("Specifies a pattern to match dialed digits against. Note: TEMPLATE must be in uppercase.");?> </p>
<h4><?php echo _("Rules:");?></h4>
<table class="table">
<tr><td><strong><?php echo _("match:");?> </strong></td><td><?php echo _("Pattern to match, consists of one or more elements");?></td></tr>
<tr><td><strong>0 1 2 3 4 5 6 7 8 9</strong></td><td><?php echo _("Match digit");?></td></tr>
<tr><td><strong>.</strong></td><td><?php echo _("Match one digit, # or *");?></td></tr>
<tr><td><strong>*</strong></td><td><?php echo _("Match zero or more digits, # or *");?></td></tr>
<tr><td><strong>\*</strong></td><td><?php echo _("Match a literal *");?></td></tr>
<tr><td><strong>,</strong></td><td><?php echo _("Play secondary dial-tone specified by tone");?></td></tr>
<tr><td><strong><?php echo _("timeout:");?></strong></td><td><?php echo _("Number of seconds to wait for more digits if this pattern matches");?></td></tr>
<tr><td><strong><?php echo _("line:");?></strong></td><td><?php echo _("Only apply template to the specified line (optional)");?></td></tr>
<tr><td><strong><?php echo _("rewrite:");?></strong></td><td><?php echo _("Rewrite the matched digits before dialing, consists of one or more elements (optional)");?></td></tr>
<tr><td><strong>0 1 2 3 4 5 6 7 8 9</strong></td><td><?php echo _("Replace with digit");?></td></tr>
<tr><td><strong>%0</strong></td><td><?php echo _("The entire match");?></td></tr>
<tr><td><strong>%1 %2 %3 %4 %5</strong></td><td><?php echo _("Replace with group of digits matched, grouping is done by consecutive literal digit or . elements");?></td></tr>
<tr><td><strong>%%</strong></td><td><?php echo _("A literal %");?></td></tr>
<tr><td><strong>.</strong></td><td><?php echo _("Each . is replaced by the digit that was matched by the corresponding . in the pattern");?></td></tr>
<tr><td><strong><?php echo _("tone:");?></strong></td><td><?php echo _("Secondary dial-tone to play when a , is matched, up to 3 can be specified (optional)");?></td></tr>
</table>
</div>
</div>
<?php
// echo $this->showGroup('sccp_dp_new_template',0,'sccp_dial',$def_val);
echo $this->showGroup('sccp_dp_template', 0, 'sccp_dial', $def_val);
?>
</form>

View file

@ -1,4 +0,0 @@
<div class="element-container"> <div class="row"> <div class="form-group">
<div class="col-md-3"> <label class="control-label" for="ERROR">Error loadinging form configuration </label>
<i class="fa fa-question-circle fpbx-help-icon" data-for="ERROR"></i>
</div></div></div></div>

View file

@ -1,113 +0,0 @@
<?php
/*
* IE - Text Input
* IED - Text Input Dynamic
* ITED- Input Dynamic Table
* IS - Radio box
* SL - Select element
* SLA - Select element (from - data )
* Input element Select SLD - Date format
* SLZ - Time Zone
* SLTZN - Time Zone List
* SLT - TFTP Lang
* SLM - Music on hold
* SLK - System KeySet
* * Input element Select SLS - System Language
* Input element Select SDM - Model List
* SDE - Extension List
* Help elemen HLP - Help Element
*/
// This will not work if the field already has the underscore
$npref = $form_prefix.'_';
$napref = $form_prefix.'-ar_';
if (empty($form_prefix)) {
$npref = "sccp_";
$napref ="sccp-ar_";
//} elseif ($form_prefix == 'vendorconfig') {
// $npref = 'vendorconfig';
// $napref = 'vendorconfig-ar';
}
if (empty($fvalues)) {
$fvalues = $sccp_defaults;
}
$items = $itm -> children();
if ($h_show==1) {
$sec_class ='';
if (!empty($items ->class)) {
$sec_class = (string)$items ->class;
}
?>
<div class="section-title" data-for="<?php echo $npref.$itm['name'];?>">
<h3><i class="fa fa-minus"></i><?php echo _($items ->label) ?></h3>
</div>
<div class="section <?php echo $sec_class;?>" data-id="<?php echo $npref.$itm['name'];?>">
<?php
}
foreach ($items as $child) {
$disabledButtons = array();
if (empty($child->help)) {
$child->help = 'Help is not available.';
$child->meta_help = '1';
}
echo "<!-- Begin {$child->label} -->";
switch ($child['type']) {
case 'IE':
\FreePbx::sccp_manager()->formcreate->addElementIE($child, $fvalues, $sccp_defaults,$npref);
break;
case 'IED':
\FreePbx::sccp_manager()->formcreate->addElementIED($child, $fvalues, $sccp_defaults,$npref, $napref);
break;
case 'ISC':
// This is a special case for Provision mode. Set some parameters here and fall through to IS.
$disabledButtons = array('pro' => 'Provision');
if ($sccp_defaults['tftp_rewrite']['data'] == 'pro') {
$disabledButtons = array('off' => 'Off');
}
case 'IS':
\FreePbx::sccp_manager()->formcreate->addElementIS($child, $fvalues, $sccp_defaults,$npref, $disabledButtons);
break;
case 'SLD':
case 'SLM':
case 'SLK':
case 'SLP':
case 'SLS':
case 'SLTD':
case 'SLTN':
case 'SLA':
case 'SLZ':
case 'SL':
\FreePbx::sccp_manager()->formcreate->addElementSL($child, $fvalues, $sccp_defaults,$npref, $installedLangs);
break;
case 'SLDA':
case 'SLNA':
\FreePbx::sccp_manager()->formcreate->addElementSLNA($child, $fvalues, $sccp_defaults,$npref, $installedLangs);
break;
case 'SDM':
case 'SDMS':
case 'SDML':
case 'SDMF':
case 'SDE':
case 'SDD':
\FreePbx::sccp_manager()->formcreate->addElementSD($child, $fvalues, $sccp_defaults,$npref);
break;
case 'ITED':
\FreePbx::sccp_manager()->formcreate->addElementITED($child, $fvalues, $sccp_defaults, $npref, $napref);
break;
case 'HLP':
\FreePbx::sccp_manager()->formcreate->addElementHLP($child, $fvalues, $sccp_defaults,$npref);
break;
case 'SLTZN':
\FreePbx::sccp_manager()->formcreate->addElementSLTZN($child, $fvalues, $sccp_defaults,$npref);
break;
}
echo "<!-- END {$child->label} -->";
}
if ($h_show==1) {
echo '</div>';
}
?>

View file

@ -1,85 +0,0 @@
<!--Begin modal include-->
<div class="modal fade get_ext_file_<?php echo $requestType;?>" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="gridSystemModalLabel"><?php echo _('Get Files From Provisioner');?></h4>
</div>
<div class="modal-body">
<div class="element-container">
<div class="row">
<div class="col-md-12">
<?php echo "Sccp_Manager will try to download {$requestType} files from Provision_Sccp on GitHub.<br>
This site, dkgroot/provision_sccp, is unrelated to Sccp_Manager, and the files found cannot be warrantied<br>
If you accept this, please select the {$requestType} that you want to try to get files for and then Get Files From Provisioner<br><br>
Please be patient - this may take some time depending on your internet link<br><br>" ?>
</div>
</div>
</div>
<div class="element-container">
<div class="row">
<div class="form-group">
<div class="col-md-3">
<label class="control-label" for="get_model_files"><?php echo _('Fetch Files for');?></label>
<i class="fa fa-question-circle fpbx-help-icon" ></i>
</div>
<div class="col-md-3">
<div class = "lnet form-group form-inline" data-nextid=1>
<?php
switch ($requestType) {
case 'firmware':
echo "<select class='form-control' id='ext_device'>";
break;
case 'locale':
echo "<select class='form-control' id='ext_locale'>";
break;
case 'country':
echo "<select class='form-control' id='ext_country'>";
break;
}
foreach ($selectArray as $key => $val) {
echo "<option value= '{$val}'";
if (($val == 'English_United_Kingdom') || ($val == 'United_Kingdom')) {
echo ' selected="selected"';
}
echo ">{$val}</option>";
}
?>
</select>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<span id="new_model-help" class="help-block fpbx-help-block">Help.</span>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal"><?php echo _('Cancel');?></button>
<button type="button" class="btn btn-primary sccp_get_ext" data-id="get_ext_files" data-type=<?php echo '"'.$requestType.'"';?> onclick="showProgress();" id="get_model_files" data-dismiss="modal"><?php echo _('Get Files from Provisioner');?></button>
</div>
</div>
</div>
</div>
<!--End modal include-->
<!--Start progress modal include-->
<div id="pleaseWaitDialog" class="modal" data-backdrop="static" data-keyboard="false">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h1>Getting files .....please wait</h1>
</div>
<div class="modal-body">
<div class="progress">
<div id="progress-bar" class="progress-bar progress-bar-striped progress-bar-animated active" role="progressbar" style="width:0%">
</div>
</div>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<!--End progress modal include-->

View file

@ -1,50 +0,0 @@
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
// vim: set ai ts=4 sw=4 ft=phtml:
$roming_enable = '';
if (!empty($this->sccpvalues['system_rouminguser'])) {
if ($this->sccpvalues['system_rouminguser']['data'] == 'yes') {
$roming_enable = 'yes';
}
}
?>
<div class="fpbx-container container-fluid">
<div class="row">
<div class="col-sm-12">
<div class="display no-border">
<h1><?php echo _("Extensions (Line)") ?></h1>
<div id="toolbar-sccp-extension">
<a class="btn btn-default" href="config.php?display=extensions&tech_hardware=sccp_custom"><i class="fa fa-plus">&nbsp;</i><?php echo _("Add Extension") ?></a>
</div>
<table data-cookie="true" data-cookie-id-table="sccp-extension-table" data-url="ajax.php?module=sccp_manager&command=getExtensionGrid&type=extGrid" data-cache="false" data-show-refresh="true" data-toolbar="#toolbar-sip" 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-extension" data-id="name">
<thead>
<tr>
<th data-sortable="true" data-field="name"><?php echo _('Extension') ?></th>
<th data-sortable="true" data-field="label"><?php echo _('Display Name') ?></th>
<th data-sortable="true" data-field="mac"><?php echo _('Device') ?></th>
<th data-sortable="true" data-field="line_status" class="text-center"><?php echo _('Status | Active') ?></th>
<th data-field="actions" data-formatter="DispayPhoneActionsKeyFormatter"><?php echo _('Actions') ?></th>
</tr>
</thead>
</table>
</div>
</div>
</div>
</div>
<script>
function DispayPhoneActionsKeyFormatter(value, row, index) {
var exp_dev = '';
var rmn_dev = '<?php echo $roming_enable ?>';
exp_dev += '<a href="config.php?display=extensions&amp;extdisplay=' + row['name'] + '"><i class="fa fa-pencil"></i></a> &nbsp;';
exp_dev += '<a class="clickable delete" data-id="' + row['name'] + '"><i class="fa fa-trash"></i></a>';
if (rmn_dev == 'yes') {
exp_dev += '<a href="config.php?display=sccp_phone&amp;tech_hardware=r_user&amp;ru_id=' + row['name'] + '"><i class="fa fa-bicycle"></i></a> &nbsp;';
}
return exp_dev;
return '<a href="config.php?display=extensions&amp;extdisplay=' + row['name'] + '"><i class="fa fa-pencil"></i></a> &nbsp;<a class="clickable delete" data-id="' + row['name'] + '"><i class="fa fa-trash"></i></a>';
}
</script>

View file

@ -1,100 +0,0 @@
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
// vim: set ai ts=4 sw=4 ft=phtml:
?>
<div class="fpbx-container container-fluid">
<div class="row">
<div class="col-sm-12">
<div class="display no-border">
<h1><?php echo _("Device SCCP Phone") ?></h1>
<div id="toolbar-sccp-phone">
<a class="btn btn-default" href="config.php?display=sccp_phone&tech_hardware=cisco"><i class="fa fa-plus">&nbsp;</i><?php echo _("Add Device Phone") ?></a>
<button id="remove-sccp-phone" class="btn btn-danger sccp_update btn-tab-select" data-id="delete_hardware" disabled>
<i class="glyphicon glyphicon-remove"></i> <span><?php echo _('Delete') ?></span>
</button>
<button name="cr_sccp_phone_xml" class="btn sccp_update btn-default" data-id="create-cnf">
<i class="glyphicon glyphicon-ok"></i> <span><?php echo _('Create CNF') ?></span>
</button>
<button name="update_button_label" class="btn sccp_update btn-default" data-id="update_button_label">
<i class="glyphicon glyphicon-ok"></i> <span><?php echo _('Update Button label') ?></span>
</button>
<button name="reset_sccp_phone" class="btn sccp_update btn-default" data-id="reset_dev">
<i class="glyphicon glyphicon-ok"></i> <span><?php echo _('Reset Device') ?></span>
</button>
<button name="reset_sccp_token" class="btn sccp_update btn-default" data-id="reset_token">
<i class="glyphicon glyphicon-ok"></i> <span><?php echo _('Reset Token Device') ?></span>
</button>
</div>
<table data-cookie="true" data-cookie-id-table="sccp-phone" data-url="ajax.php?module=sccp_manager&command=getPhoneGrid&type=sccp"
data-cache="false" data-show-refresh="true" data-toolbar="#toolbar-sccp" 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" id="table-sccp" data-id="name">
<thead>
<tr>
<th data-checkbox="true"></th>
<th data-sortable="true" data-field="name"><?php echo _('Device ID') ?></th>
<th data-sortable="true" data-field="description"><?php echo _('Device Description') ?></th>
<th data-sortable="true" data-formatter="DispayTypeFormatter" data-field="type"><?php echo _('Device type') ?></th>
<th data-sortable="true" data-field="button" data-formatter="LineFormatter"><?php echo _('Line') ?></th>
<th data-sortable="true" data-field="status"><?php echo _('Status') ?></th>
<th data-sortable="true" data-field="address"><?php echo _('Address') ?></th>
<th data-field="actions" data-formatter="DispayDeviceActionsKeyFormatter"><?php echo _('Actions') ?></th>
</tr>
</thead>
</table>
</div>
</div>
</div>
</div>
<script>
function DispayTypeFormatter(value, row, index) {
var exp_model = value;
if (row['addon'] !== null ) {
var posd = row['addon'].indexOf(';');
if (posd >0) {
exp_model += ' + 2x ' + row['addon'].substring(0, posd);
} else {
exp_model += ' + ' + row['addon'];
}
}
return exp_model;
}
function DispayDeviceActionsKeyFormatter(value, row, index) {
var exp_model = '';
if (row['new_hw'] == "Y") {
exp_model += '<a href="?display=sccp_phone&tech_hardware=cisco&new_id=' + row['name'] + '&type='+ row['type'];
if (row['addon'] !== null ) {
exp_model += '&addon='+ row['addon'];
}
exp_model += '"><i class="fa fa-pencil"></i></a> &nbsp; &nbsp;\n';
} else {
exp_model += '<a href="?display=sccp_phone&tech_hardware=cisco&id=' + row['name'] + '"><i class="fa fa-pencil"></i></a> &nbsp; &nbsp;\n';
exp_model += '</a> &nbsp;<a class="btn-item-delete" data-for="hardware" data-id="' + row['name'] + '"><i class="fa fa-trash"></i></a>';
}
return exp_model;
}
function LineFormatter(value, row, index) {
if (value === null) {
return '-- EMPTY --';
}
var data = value.split(";");
result = '';
for (var i = 0; i < data.length; i++) {
var val = data[i].split(',');
if (val[0] === 'line') {
result = result + val[1] + '<br>';
}
}
return result;
}
</script>

View file

@ -1,33 +0,0 @@
<div id="toolbar-sccp-rnav">
<a class="btn btn-default" href="config.php?display=sccp_phone#sccpdevice">
<i class="fa fa-list"></i>&nbsp;
<?php echo _("List Device")?>
</a>
<a class="btn btn-default" href="config.php?display=sccp_phone&tech_hardware=cisco">
<i class="fa fa-plus">&nbsp;</i>
<?php echo _("Add Device")?>
</a>
</div>
<table id="sccpnavgrid"
data-search="true"
data-toolbar="#toolbar-sccp-rnav"
data-url="ajax.php?module=sccp_manager&command=getPhoneGrid&type=sccp"
data-cache="false"
data-toggle="table"
class="table">
<thead>
<tr>
<th data-sortable="true" data-field="name"><?php echo _('SEP ID')?></th>
<th data-sortable="true" data-field="description"><?php echo _('Descriptions')?></th>
</tr>
</thead>
</table>
<script type="text/javascript">
$("#sccpnavgrid").on('click-row.bs.table',function(e,row,elem){
if (row['new_hw'] == 'Y' ) {
window.location = '?display=sccp_phone&tech_hardware=cisco&new_id=' +row['name'] +'&' +row['type'];
} else {
window.location = '?display=sccp_phone&tech_hardware=cisco&id='+row['name'];
};
})
</script>

View file

@ -1,92 +0,0 @@
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
// vim: set ai ts=4 sw=4 ft=phtml:
?>
<div class="fpbx-container container-fluid">
<div class="row">
<div class="col-sm-12">
<div class="display no-border">
<h1><?php echo _("Device SIP Phone") ?></h1>
<div id="toolbar-sccp-sphone">
<a class="btn btn-default" href="config.php?display=sccp_phone&tech_hardware=cisco-sip"><i class="fa fa-plus">&nbsp;</i><?php echo _("Add Device Phone") ?></a>
<button id="remove-sccp-sphone" class="btn btn-danger sccp_update btn-tab-select" data-id="delete_hardware" disabled>
<i class="glyphicon glyphicon-remove"></i> <span><?php echo _('Delete') ?></span>
</button>
<button name="cr_sip_phone_xml" class="btn sccp_update btn-default" data-id="create-cnf">
<i class="glyphicon glyphicon-ok"></i> <span><?php echo _('Create CNF') ?></span>
</button>
</div>
<table data-cookie="true" data-cookie-id-table="sccp-sphone" data-url="ajax.php?module=sccp_manager&command=getPhoneGrid&type=cisco-sip"
data-cache="false" data-show-refresh="true" data-toolbar="#toolbar-sip" 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" id="table-sip" data-id="name">
<thead>
<tr>
<th data-checkbox="true"></th>
<th data-sortable="true" data-field="name"><?php echo _('Device ID') ?></th>
<th data-sortable="true" data-field="description"><?php echo _('Device Description') ?></th>
<th data-sortable="true" data-formatter="DispayTypeFormatter" data-field="type"><?php echo _('Device type') ?></th>
<th data-sortable="true" data-field="button" data-formatter="LineFormatter"><?php echo _('Line') ?></th>
<th data-sortable="true" data-field="status"><?php echo _('Status') ?></th>
<th data-sortable="true" data-field="address"><?php echo _('Address') ?></th>
<th data-field="actions" data-formatter="DispayDeviceActionsKeyFormatterS"><?php echo _('Actions') ?></th>
</tr>
</thead>
</table>
</div>
</div>
</div>
</div>
<script>
function DispayTypeFormatter(value, row, index) {
var exp_model = value;
if (row['addon'] !== null ) {
var posd = row['addon'].indexOf(';');
if (posd >0) {
exp_model += ' + 2x ' + row['addon'].substring(0, posd);
} else {
exp_model += ' + ' + row['addon'];
}
}
return exp_model;
}
function DispayDeviceActionsKeyFormatterS(value, row, index) {
var exp_model = '';
if (row['new_hw'] == "Y") {
exp_model += '<a href="?display=sccp_phone&tech_hardware=cisco-sip&new_id=' + row['name'] + '&type='+ row['type'];
if (row['addon'] !== null ) {
exp_model += '&addon='+ row['addon'];
}
exp_model += '"><i class="fa fa-pencil"></i></a> &nbsp; &nbsp;\n';
} else {
exp_model += '<a href="?display=sccp_phone&tech_hardware=cisco-sip&id=' + row['name'] + '"><i class="fa fa-pencil"></i></a> &nbsp; &nbsp;\n';
exp_model += '</a> &nbsp;<a class="btn-item-delete" data-for="hardware" data-id="' + row['name'] + '"><i class="fa fa-trash"></i></a>';
}
return exp_model;
}
function LineFormatter(value, row, index) {
if (value === null) {
return '-- EMPTY --';
}
var data = value.split(";");
result = '';
for (var i = 0; i < data.length; i++) {
var val = data[i].split(',');
if (val[0] === 'line') {
result = result + val[1] + '<br>';
}
}
return result;
}
</script>

View file

@ -1,23 +0,0 @@
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
?>
<form autocomplete="off" name="frm_advanced" id="frm_ntp" class="fpbx-submit" action="" method="post">
<input type="hidden" name="category" value="advancedform">
<input type="hidden" name="Submit" value="Submit">
<?php
// originally, this was populated by sccpgeneral.xml but that should be static
// now will populate from the db defaults.
$defaultVals = $this->getTableDefaults('sccpdevice', true);
echo $this->showGroup('sccp_srst', 1);
echo $this->showGroup('sccp_dev_vendor_conf', 1, 'sccpdevice', $defaultVals);
?>
</form>

View file

@ -1,162 +0,0 @@
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
$def_val = null;
$dev_id = null;
$audio_codecs = $this->getCodecs('audio');
$video_codecs = $this->getCodecs('video');
$sccp_disallow_def = $this->sccpvalues['disallow']['data'];
$sys_disallow_def = $this->sccpvalues['disallow']['systemdefault'];
if (empty($sccp_disallow_def)) {
$sccp_disallow_def = $sys_disallow_def;
}
?>
<!-- Codec selection is at the line level - this page sets site defaults based on chan-sccp defaults -->
<form autocomplete="off" name="frm_codec" id="frm_codec" class="fpbx-submit" action="" method="post">
<input type="hidden" name="category" value="codecform">
<input type="hidden" name="Submit" value="Submit">
<div class="section" data-id="sccp_dcodecs">
<!--Codec disallow-->
<div class="element-container">
<div class="row">
<div class="col-md-12">
<div class="row">
<div class="form-group">
<div class="col-md-3">
<label class="control-label" for="sccp_disallow"><?php echo _("Disallow") ?></label>
<i class="fa fa-question-circle fpbx-help-icon" data-for="sccp_disallow"></i>
</div>
<div class="col-md-9 radioset">
<input id="sccp_disallow" type="text" name="sccp_disallow" value="<?php echo $sccp_disallow_def ?>">
<label for="sccp_disallow"><?php echo _("Recomended default: all") ?></label>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<span id="sccp_disallow-help" class="help-block fpbx-help-block"><?php echo _("Default : all. If you wish to change (Not Recommended) please enter a semicolon separated list for example: alaw;ulaw;...") ?></span>
</div>
</div>
</div>
<!--END Codec disallow-->
</div>
<!--SCCP Audio Codecs-->
<div class="section-title" data-for="sccp_acodecs">
<h3><i class="fa fa-minus"></i><?php echo _("SCCP Audio Codecs ") ?></h3>
</div>
<div class="section" data-id="sccp_acodecs">
<!--Codecs-->
<div class="element-container">
<div class="row">
<div class="col-md-12">
<div class="row">
<div class="form-group">
<div class="col-md-3">
<label class="control-label" for="codecw"><?php echo _("Allow") ?></label>
</div>
<div class="col-md-9">
<div>
<?php echo show_help(_("These are the default audio codec settings for this site. Unchecked codecs cannot be assigned to extensions.
<br>Order can be changed by dragging and dropping to indicate priority. This priority applies for all extensions
<br>Higher priority enabled codecs are at the top
<br>Precedence for ulaw and alaw, if used, should be set according to your region
<br>If your region uses alaw, it is important that alaw has the highest priority
<br>To return to chan-sccp defaults, uncheck ALL codecs (both Audio and Video)."),"Helpful information",true) ?>
</div>
<?php
$seq = 1;
echo '<ul class="sortable">';
foreach ($audio_codecs as $codec => $codec_state) {
$codec_trans = _($codec);
$codec_checked = $codec_state ? 'checked' : '';
echo '<li><a href="#">'
. '<img src="assets/sipsettings/images/arrow_up_down.png" height="16" width="16" border="0" alt="move" style="float:none; margin-left:-6px; margin-bottom:-3px;cursor:move" /> '
. '<input type="checkbox" '
. ($codec_checked ? 'value="' . $seq++ . '" ' : '')
. 'name="audiocodecs[' . $codec . ']" '
. 'id="' . $codec . '" '
. 'class="audio-codecs" '
. $codec_checked
. ' />'
. '&nbsp;&nbsp;<label for="' . $codec . '"> '
. '<small>' . $codec_trans . '</small>'
. " </label></a></li>\n";
}
echo '</ul>';
?>
</div>
</div>
</div>
</div>
</div>
</div>
<!--END Codecs-->
</div>
<!--END SCCP Audio Codecs-->
<!--SCCP Video Codecs-->
<div class="section-title" data-for="sccp_vcodecs">
<h3><i class="fa fa-minus"></i><?php echo _("SCCP Video Codecs ") ?></h3>
</div>
<div class="section" data-id="sccp_vcodecs">
<!--Codecs-->
<div class="element-container">
<div class="row">
<div class="col-md-12">
<div class="row">
<div class="form-group">
<div class="col-md-3">
<label class="control-label" for="codecw"><?php echo _("Allow") ?></label>
</div>
<div class="col-md-9">
<div>
<?php echo show_help(_("These are the default video codec settings for this site.")) ?>
</div>
<?php
$seq = 1;
echo '<ul class="sortable">';
// Although classed as video codecs, all stored under allow so name is audiocodecs.
foreach ($video_codecs as $codec => $codec_state) {
$codec_trans = _($codec);
$codec_checked = $codec_state ? 'checked' : '';
echo '<li><a href="#">'
. '<img src="assets/sipsettings/images/arrow_up_down.png" height="16" width="16" border="0" alt="move" style="float:none; margin-left:-6px; margin-bottom:-3px;cursor:move" /> '
. '<input type="checkbox" '
. ($codec_checked ? 'value="' . $seq++ . '" ' : '')
. 'name="audiocodecs[' . $codec . ']" '
. 'id="' . $codec . '" '
. 'class="video-codecs" '
. $codec_checked
. ' />'
. '&nbsp;&nbsp;<label for="' . $codec . '"> '
. '<small>' . $codec_trans . '</small>'
. " </label></a></li>\n";
}
echo '</ul>';
?>
</div>
</div>
</div>
</div>
</div>
<!--END Codecs-->
</div>
<!--END SCCP Video Codecs-->
</div>
</form>

View file

@ -1,19 +0,0 @@
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
?>
<form autocomplete="off" name="frm_ntp" id="frm_ntp" class="fpbx-submit" action="" method="post">
<input type="hidden" name="category" value="ntpform">
<input type="hidden" name="Submit" value="Submit">
<?php
echo $this->showGroup('sccp_dev_ntp', 1);
echo $this->showGroup('sccp_dev_time', 1);
?>
</form>

View file

@ -1,33 +0,0 @@
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
?>
<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="Submit" value="Submit">
<div class="fpbx-container container-fluid">
<div class="row">
<div class="container">
<h2 style="border:2px solid Tomato;color:Tomato;" ><?php echo _("Warning : Any changes to the device configuration can cause all phones to restart.<br>It is important to read the information on hotline below before using this capability"); ?></h2>
</div>
</div>
</div>
<?php
$def_val_line = $this->getTableDefaults('sccpline');
$def_val_device = $this->getTableDefaults('sccpdevice');
//echo $this->showGroup('sccp_dev_config', 1, 'sccpdevice', $def_val_device);
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_softkey', 1);
echo $this->showGroup('sccp_hotline_config', 1);
echo $this->showGroup('sccp_qos_config', 1, 'sccpdevice', $def_val_device);
?>
</form>

View file

@ -1,232 +0,0 @@
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
$test_ami = 0;
$test_any = 0;
global $amp_conf;
$driver = $this->FreePBX->Core->getAllDriversInfo();
$core = $this->aminterface->getSCCPVersion();
$ast_realtime = $this->aminterface->getRealTimeStatus();
//$ast_realm = (empty($ast_realtime['sccp']) ? '' : 'sccp');
// if there are multiple connections, this will only return the first.
foreach ($ast_realtime as $key => $value) {
if (empty($ast_realm)) {
if ($value['status'] === 'OK') {
$ast_realm = $key;
}
}
}
$conf_realtime = $this->extconfigs->validate_RealTime($ast_realm);
$db_Schema = $this->dbinterface->validate();
$mysql_info = $this->dbinterface->get_db_sysvalues();
$compatible = $this->aminterface->get_compatible_sccp();
$info = array();
//$info['srvinterface'] = $this->srvinterface->info();
$moduleXml = simplexml_load_file("{$amp_conf['AMPWEBROOT']}/admin/modules/sccp_manager/module.xml");
$info['extconfigs'] = $this->extconfigs->info();
$info['dbinterface'] = $this->dbinterface->info();
$info['aminterface'] = $this->aminterface->info();
$info['XML'] = $this->xmlinterface->info();
$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']}");
$capabilityArray = array( "park", "pickup", "realtime", "video", "conference", "dirtrfr", "feature_monitor", "functions", "manager_events",
"devicestate", "devstate_feature", "dynamic_speeddial", "dynamic_speeddial_cid", "experimental", "debug");
$info['chan-sccp build info'] = array('Version' => $core['Version'], 'about' => 'Following options NOT built: ' . implode('; ',array_diff($capabilityArray, $core['buildInfo'])));
$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');
}
exec('in.tftpd -V', $tftpInfo);
$info['TFTP Server'] = array('Version' => 'Not Found', 'about' => 'Mapping not available');
if (isset($tftpInfo[0])) {
$tftpInfo = explode(',',$tftpInfo[0]);
$info['TFTP Server'] = array('Version' => $tftpInfo[0], 'about' => 'Mapping not available');
$tftpInfo[1] = trim($tftpInfo[1]);
if ($tftpInfo[1] == 'with remap') {
$info['TFTP Server'] = array('Version' => $tftpInfo[0], 'about' => $tftpInfo[1]);
}
}
if (!empty($this->sccpvalues['tftp_rewrite']['data'])) {
switch ($this->sccpvalues['tftp_rewrite']['data']) {
case 'custom':
case 'pro':
$info['Provision_SCCP'] = array('Version' => 'base', 'about' => 'Provision Sccp enabled');
break;
default:
if ($tftpInfo[1] == 'with remap') {
$info['TFTP_Mapping'] = array('Version' => 'off', 'about' => "TFTP mapping is available but the mapping file is not included in tftpd-hpa default settings.<br>
To enable Provision mode, add option <br>
-m /etc/asterisk/sccpManagerRewrite.rules <br>
to the tftpd defaults, (location dependant on the system), and restart the tftpd server");
} else {
$info['TFTP_Mapping'] = array('Version' => 'off', 'about' => "Mapping capability is not built into the TFTP server. To enable Provision, upgrade the TFTP server.");
}
break;
}
}
// Finished testing tftp server options
$info['Сompatible'] = array('Version' => $compatible, 'about' => 'Ok');
if (!empty($this->sccpvalues['SccpDBmodel'])) {
if ($compatible > $this->sccpvalues['SccpDBmodel']['data']) {
$info['Сompatible']['about'] = '<div class="alert signature alert-danger"> Reinstall SCCP manager required</div>';
}
}
if ($db_Schema == 0) {
$info['DB_Schema'] = array('Version' => 'Error', 'about' => '<div class="alert signature alert-danger"> ERROR DB Version </div>');
} else {
$info['DB_Schema'] = array('Version' => $db_Schema, 'about' => (($compatible == $db_Schema ) ? 'Ok' : 'Incompatible Version'));
}
if (empty($ast_realtime)) {
$info['RealTime'] = array('Version' => 'Error', 'about' => '<div class="alert signature alert-danger"> No RealTime connections found</div>');
} else {
$rt_info = '';
$rt_sccp = 'Failed';
foreach ($ast_realtime as $key => $value) {
if ($key == $ast_realm) {
if ($value['status'] == 'OK') {
$rt_sccp = 'TEST OK';
$rt_info .= '<div> Using SCCP connection found to database: '.$value['realm'] . ' with connector: ['. $key .']</div>';
} else {
$rt_sccp = 'SCCP ERROR';
$rt_info .= '<div class="alert signature alert-danger"> Error : ' . $value['message'] . '</div>';
}
} elseif ($value['status'] == 'ERROR') {
$rt_info .= '<div> No connector found for [' . $key . '] : ' . $value['message'] . '</div>';
} elseif ($value['status'] == 'OK') {
$rt_info .= '<div> Alternative connector found to database '.$value['realm'] . ' with connector: ['. $key . '] </div>';
}
}
$info['RealTime'] = array('Version' => $rt_sccp, 'about' => $rt_info);
}
// There are potential issues with string Type Declarations in PHP 5.
$info['PHP'] = array('Version' => phpversion(), 'about' => version_compare(phpversion(), '7.0.0', '>' ) ? 'OK' : 'PHP 7 Preferred - Please upgrade if possible');
$mariaDbInfo = exec('mysql -V');
$info['MariaDb'] = array('Version' => explode(" ",$mariaDbInfo)[3], 'about' => $mariaDbInfo);
if (empty($conf_realtime)) {
$info['ConfigsRealTime'] = array('Version' => 'Error', 'about' => '<div class="alert signature alert-danger"> Realtime configuration was not found</div>');
} else {
$rt_info = '';
foreach ($conf_realtime as $key => $value) {
if (($value != 'OK') && ($key != 'extconfigfile')) {
$rt_info .= '<div> Found error in section ' . $key . ' :' . $value . '</div>';
}
}
if (!empty($rt_info)) {
$info['ConfigsRealTime'] = array('Version' => 'Error', 'about' => $rt_info);
}
}
// $mysql_info
if ($mysql_info['Value'] <= '2000') {
$this->info_warning['MySql'] = array('Increase Mysql Group Concat Max. Length', 'Step 1: Go to mysql path <br> nano /etc/my.cnf',
'Step 2: And add the following line below [mysqld] as shown below <br> [mysqld] <br>group_concat_max_len = 4096 or more',
'Step 3: Save and restart <br> systemctl restart mariadb.service<br> Or <br> service mysqld restart');
}
// Check Time Zone compatibility
$conf_tz = $this->sccpvalues['ntp_timezone']['data'];
$cisco_tz = $this->extconfigs->getExtConfig('sccp_timezone', $conf_tz);
if ($cisco_tz['offset'] == 0) {
if (!empty($conf_tz)) {
$tmp_dt = new DateTime(null, new DateTimeZone($conf_tz));
$tmp_ofset = $tmp_dt->getOffset();
if (($cisco_tz['offset'] != ($tmp_ofset / 60) )) {
$this->info_warning['NTP'] = array('The selected NTP time zone is not supported by cisco devices.', 'We will use the Greenwich Time zone');
}
}
}
if (!empty($this->info_warning)) {
?>
<div class="fpbx-container container-fluid">
<div class="row">
<div class="container">
<h2 style="border:2px solid Tomato;color:Tomato;" >Sccp Manager Warning</h2>
<div class="table-responsive">
<br> There are Warning in the SCCP Module:<br><pre>
<?php
foreach ($this->info_warning as $key => $value) {
echo '<h3>' . $key . '</h3>';
if (is_array($value)) {
echo '<li>' . _(implode('</li><li>', $value)) . '</li>';
} else {
echo '<li>' . _($value) . '</li>';
}
echo '<br>';
}
?>
</pre>
<br><h4 style="border:2px solid Tomato;color:Green;" > Check these problems before continuing to work.</h4> <br>
</div>
</div>
</div>
</div>
<br>
<?php
}
if (!empty($this->class_error)) {
?>
<div class="fpbx-container container-fluid">
<div class="row">
<div class="container">
<h2 style="border:2px solid Tomato;color:Tomato;" >Diagnostic information about SCCP Manager errors</h2>
<div class="table-responsive">
<br> There is an error in the :<br><pre>
<?php print_r($this->class_error); ?>
</pre>
<br> Correct these problems before continuing to work. <br>
<br><h3 style="border:2px solid Tomato;color:Green;" > Open 'SCCP Connectivity' -> Server Config' to change global settings</h3> <br>
</div>
</div>
</div>
</div>
<br>
<?php } ?>
<div class="fpbx-container container-fluid">
<div class="row">
<div class="container">
<h2>Sccp Manager v<?php print_r((string) $moduleXml->version); ?> Info </h2>
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th>Module</th>
<th>Version</th>
<th>Info</th>
</tr>
</thead>
<tbody>
<?php
foreach ($info as $key => $value) {
echo '<tr><td>' . $key . '</td><td>' . $value['Version'] . '</td><td>' . $value['about'] . '</td></tr>';
}
?>
</tbody>
</table>
</div>
<a class="btn btn-default" href="ajax.php?module=sccp_manager&command=backupsettings"><i class="fa fa-plane">&nbsp;</i><?php echo _("BackUp Config") ?></a>
</div>
</div>
</div>
<?php echo $this->showGroup('sccp_info', 0); ?>

View file

@ -1,58 +0,0 @@
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
// vim: set ai ts=4 sw=4 ft=phtml:
?>
<form autocomplete="off" name="frm_general" id="frm_general" class="fpbx-submit" action="" method="post">
<input type="hidden" name="category" value="generalform">
<input type="hidden" name="Submit" value="Submit">
<!-- div id="toolbar-all">
<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 class="fpbx-container container-fluid">
<div class="row">
<div class="container">
<h2 style="border:2px solid Tomato;color:Tomato;" ><?php echo _("Warning : Any changes to the server configuration can cause all phones to restart"); ?></h2>
</div>
</div>
</div>
<?php
$def_val_device = $this->getTableDefaults('sccpdevice');
echo $this->showGroup('sccp_general', 1);
echo $this->showGroup('sccp_net', 1);
echo $this->showGroup('sccp_lang', 1);
echo $this->showGroup('sccp_extpath_config', 1);
?>
</form>
<!-- Begin Form Input New / Edit -->
<div class="modal fade new_network" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel_Net">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="gridSystemModalLabel_Net">Device</h4>
</div>
<div class="modal-body">
<ul class="nav nav-tabs" role="tablist">
<?php
// echo $this->showGroup('add_network_1',0);
?>
</ul>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary sccp_update" data-id="network_add" data-mode="new" id="network_add" data-dismiss="modal">Save</button>
</div>
</div>
</div>
</div>

View file

@ -1,14 +0,0 @@
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
?>
<form autocomplete="off" name="frm_url" id="frm_url" class="fpbx-submit" action="" method="post">
<input type="hidden" name="category" value=" deviceurlform">
<input type="hidden" name="Submit" value="Submit">
<?php
echo $this->showGroup('sccp_dev_url', 1,);
?>
</form>