Commit graph

636 commits

Author SHA1 Message Date
steve-lad 3ec730b71b Standardise between different formShow pages 2021-06-30 07:05:17 +02:00
steve-lad ace4945eb0 Load help from chan-sccp
Load metainfo descriptions which provide help if not in XML
2021-06-30 07:02:22 +02:00
steve-lad b7766fcf64 First test of new interface to manage defaults hierarchy
WIP
Need to better manage display of system defaults when customising
Need to override XML defaults
2021-06-29 16:41:53 +02:00
steve-lad 063556f898 Prepare siteDefaults Page
First pass with input array structure
2021-06-28 16:39:32 +02:00
steve-lad d1e72714af add systemdefault field to sccpvalues for savesccpsettings 2021-06-28 13:02:24 +02:00
steve-lad 22d845ced3 Initialise all chan_sccp defaults in sccp_settings
Get default system settings from chan_sccp and add to sccpsettings
Remove legacy settings from sccpsettings
Change tftpReadTestFile to accept host as argument
Change sccpsettings structure to include systemdefaults
2021-06-28 11:51:05 +02:00
steve-lad f882a66eb4 Tighten TFTP read controls
Avoid hanging if no data received by setting timeout. Thanks to @dkgroot  for soulution
2021-06-28 07:17:51 +02:00
steve-lad ee419ae193 Change SQL for adding system defaults 2021-06-27 17:46:00 +02:00
steve-lad f74978c1b3 Add timer on TFTP read; Get Metadata
TFTP read caused a hang if no server available

Set to DONTWAIT and loop and then check for valid data

Use metadat to set system defaults
2021-06-27 17:12:10 +02:00
steve-lad 7721e7a8a0
Tidy up installer
Clean SQL statements
Solidify dbsettings management
2021-06-27 12:48:24 +02:00
steve-lad b1a7fe3510
Update db exception handling in installer
DB object returns errors on warnings, so was failing.

Ignore the warnings and only die on exceptions (usually violations) as it is normal that there are warnings if we are changing VARCHAR to ENUM
2021-06-27 11:42:21 +02:00
steve-lad 4fcf16b317
Do not die on SQL warning
If we change a field from VARCHAR to enum, we will get warnings as possibly truncating data. Accept this and carry on.

Only fail on an error.
2021-06-27 11:06:33 +02:00
steve-lad d8cc6f3ba1
Remove empty - checking to find actual and overwrite any existing 2021-06-27 10:43:01 +02:00
steve-lad bab83c7e3e
Change TFTP detection logic
Accept first hit
2021-06-27 10:19:20 +02:00
steve-lad d83c3ab93f
Merge pull request #24 from chan-sccp/tftpDetection
Tftp detection
2021-06-27 10:03:54 +02:00
dkgroot 4da4f391d6 Fixes based on review by @steve-lad 2021-06-27 07:54:00 +00:00
dkgroot 838ff633aa Reverse the logic when detecting tftpserver existence and path
- write a sentinel probe file to the known/possible distro tftp directories
 - try fetching it through tftp
 - if we manage to fetch the file, we have the correct path
 - remove sentinel probe file

When creating directories in tftpboot directory we should not set write permissions, using 0755 instead.
2021-06-26 23:19:53 +00:00
Diederik de Groot a6a7b517d1
Added file explaining config parsing and inheritance by chan-sccp. 2021-06-26 11:03:42 +02:00
steve-lad 3a03815daf Change tftp_path names
Change for clarity
2021-06-25 06:52:43 +02:00
steve-lad fb9ea64134 Fix SQL in Install Rename
Change SQL in Installer rename column
Change TFTP variable name for better clarity
2021-06-25 06:35:51 +02:00
steve-lad 97c4c93fb6 Display Device description even if not connected 2021-06-24 16:11:33 +02:00
steve-lad 852156878d Simplify method name 2021-06-24 15:40:36 +02:00
steve-lad 0e36336033 Delete sccpsimple.xml.v433
Not required and complicates maintainability
2021-06-24 15:32:07 +02:00
steve-lad 9be50bab5c Update Create_SEP_XML and defaults
Merge data_values and dev_config so that device specific settings are written to the SEP file
Add sccp general device defaults
Allow saving empty sccpvalues
Add new fields to sccpdevice
move phonepersonalization to sccpdevice from sccpline
Change advanced display block for personalisation to correctly pickup defaults
2021-06-24 15:25:26 +02:00
steve-lad e841c7cb40 Reversions and corrections to previous commit
Restore saveSccpSettings to Sccp_Manager construct (deleted in error)
Initialise ntp_timezone without check (may have been changed externally)
Load xml data in ShowGroup instead of construct.
2021-06-24 10:59:00 +02:00
steve-lad ff1c451fe1 Update Installer and Sccp_manager Construct
Move initial defaults reading from Construct to Install
Move initVarFromXml to helper functions - no longer used as defaults should come from db
Remove extraneous initialisations from Sccp_manager - these are now handled in Installer
Save TFTP structure to sccpsettings in Installer
Pass tftp_root to extconfigs ( if changed or uninitialised, was not written back to settingsFromDb before being passed to extconfigs
2021-06-24 10:02:26 +02:00
steve-lad 4d7463f341 Update sccpgeneral.xml.v433 2021-06-23 19:52:00 +02:00
steve-lad 9daf307081 Correct defaults 2021-06-23 19:46:32 +02:00
steve-lad cdac0f0276 Fix incorrect variable declaration 2021-06-23 17:43:58 +02:00
steve-lad d7e196cf21 Clean up installer and partially revert externconfigs
Remove ancillary function to traits
Move tftp directory management back to extern configs
Remove call to extern configs from InitialiseSccpPath and so from Construct
Need to add call to updateTftpStructure when settings changed ---WIP ---
2021-06-23 17:03:24 +02:00
steve-lad ec79925661 add asterisk etc dir to sccp settings 2021-06-23 13:21:19 +02:00
steve-lad d422776ad6 Create full TFTP Pro structure and save relevant settings
Default structure now created is ready for pro use and settings have been moved to sccp settings and not stored in array sccppath
2021-06-23 12:35:33 +02:00
steve-lad 4e15376181 Update install.php 2021-06-22 20:53:41 +02:00
steve-lad cb890aa264 Update installer to check TFTP server is running and usable
Use dummy put to test and locate the TFTP server
Move all TFTP tests from extconfigs to install (reduces module constructor)
2021-06-22 17:18:01 +02:00
steve-lad 95cd7b4d9b Correct getExtConfig method
sccp_lang did not accept index arg
2021-06-22 10:17:57 +02:00
steve-lad c271dbf3c2 Update edit device to apply current schema
Add defaults if they are unset for the device
If device fields are now an enum, make sure that legacy values are valid or replace with defaults
2021-06-20 16:25:44 +02:00
steve-lad 0692b3cd6a Update module version 2021-06-20 13:15:49 +02:00
steve-lad def22582e3 Correct SQL in INSTALLER 2021-06-20 13:14:54 +02:00
steve-lad 649b717ce7 Correct SQL for SET DEFAULT 2021-06-20 13:06:53 +02:00
steve-lad 34a7f6a163 Remove hidden tab in SQL 2021-06-20 12:08:37 +02:00
steve-lad be8aa5cd92 Initialise Defaults in Driver
Add Constructor to get and set line_defaults
Add defaults to SCCP tab
2021-06-20 11:53:24 +02:00
steve-lad 55285cf625 Move install functions from sccp_manager to installer
Change core driver to be an include
Move driver to sccpManClasses to improve maintainability and eliminate possible version issues
Add driver in installer (remove
from extConfigs)
Create sccp.conf in installer if it does not exist (remove from extconfigs)

Update extconfigs.class.php

Update Sccp.class.php.v433
2021-06-20 09:24:19 +02:00
steve-lad 2dad547e3d Redefine defaults from db in sccp driver 2021-06-19 17:42:01 +02:00
steve-lad aad6fa31c6
Merge pull request #21 from chan-sccp/Fix-Issue-#20
Fix Issue #20
2021-06-19 15:24:56 +02:00
steve-lad fd21a94821 Fix Issue #20
During initial migration of Sccp_Manager to chan-sccp, the incorrect version of sccp class driver was imported.

This corrects that and modifies the original driver
2021-06-19 15:23:42 +02:00
steve-lad 310256dc5d Update Sccp Driver class
During initial import to chan sccp, the wrong version of this class was used, and the SCCP Tab was not shown when adding or editing extensions.

Also comment out  GUI hooks as not currently used, and can present issues because of FreePBX caching.
2021-06-19 15:15:26 +02:00
steve-lad d6cfa86978 Control MAC address entry
Warning and refocus if not conform to indicated requirements
2021-06-18 16:50:15 +02:00
steve-lad 510b4259ac Optimise handlerSubmit and activate TZ
Simplify process
Reenable TZ offset test on save
2021-06-18 13:13:38 +02:00
steve-lad de3c58178b Remove Inherit processing
Remove functionality added to hide inherit in default configs - Inherit has been removed from sccpgeneral.xml
2021-06-18 12:10:26 +02:00
steve-lad 57bc13f782 Modify default values
Change sccpgeneral to remove inherit - now inherit default values automatically
Add default values to form groups
Revert changes informShow
Update getTableDefaults to better manage underscores with chan-sccp
Change Defaults in Install
2021-06-18 11:58:00 +02:00