Commit graph

39 commits

Author SHA1 Message Date
stevenA 048077fce8 Update SIP device Handling & Fix Issue#53
Fix Issue #53
Consolidate forms to facilitate maintenance, reduce code, and apply changes to SIP handling introduce for sccp
Delete form.addsdevice.php
Delete form.sbuttons.php
Delete sipconfigs class and move db functions to dbinterface class, and other function to helperfunctions
create new field type for SIP line
update 9951 buttons count in installer
simplify segregation of sip and sccp requests
2022-01-06 15:00:24 +01:00
stevenA f4aa2eda1c Fix writing settings to sccp.conf
Only write chan-sccp allowed settings to sccp.conf
Clean sccp.conf on install
Move createDefaultSccpConfig to traits so that can access from installer
tighten calls to createDefaultSccpConfig
2021-12-30 09:39:28 +01:00
stevenA 0bc2eed76b Fix dndFeature setting not saved
dndFeature setting was not saved
check for existence of chan-sccp flags
add helper to list chan-sccp flags
fix version compatibility check
update version to 14.3.0.19
2021-12-29 12:42:57 +01:00
steve-lad a2217e6e37 Fix issue #39
Get masterFilesList at install direct from Provisioner. If not available, install a copy from the module
2021-12-27 11:09:42 +01:00
steve-lad b7d5851643 Update helperFunctions.php 2021-08-10 08:06:36 +02:00
steve-lad 031ef0087e Compatibility update 2021-08-09 13:56:18 +02:00
steve-lad 91d6ad2f48 Fix incompatibility with new Describe table 2021-08-09 09:23:00 +02:00
steve-lad 28bb5a63da Optimise validate part of getSccpModelInformation
Remove needless iterations and use array functions.
Use basename to remove file extension to facilitate this
2021-08-01 11:57:03 +02:00
steve-lad d8d2f946ce Minor optimisations 2021-07-31 15:41:32 +02:00
steve-lad 43a656cebc Correct XML Path in installer and optimise findAllFiles
XML Path in installer was in single quotes - corrected
Remove unnecessary tests in findallfiles
2021-07-31 12:30:24 +02:00
steve-lad 75858d7cc1 Optimise and add error handling to getFilesFromProvisioner 2021-07-24 09:31:30 +02:00
steve-lad 4151b4fdae Restructure languages and locales management
Base off of provision file structure
Store netlang and devlang
Stop usage of extconfig ->sccplang
2021-07-23 12:14:46 +02:00
steve-lad b3b3858965 standardise get ext file modal and add via include
Create standard modal for insertion via include in firmcreate class and adserver view
2021-07-19 08:04:12 +02:00
steve-lad 3d69090767 Fix finding master file 2021-07-18 12:50:53 +02:00
steve-lad d7fd77dfe8 Get locales from provisioner
Add progress bar and xhr handler
2021-07-18 11:30:19 +02:00
steve-lad 1b32e0977e Optimise locale (language) management
Optimise function calls
Use array functions instead of loops
findInstalledlangs is currently called by the construct - as this is called frequently, maximise its efficiency
2021-07-15 12:12:07 +02:00
steve-lad a4f8fa4600 Impliment retrieving firmware from Provision_sccp
WIP - need to handle exceptions etc
2021-07-14 17:16:27 +02:00
steve-lad ef77bce159 Add retrieve device files 2021-07-14 13:10:15 +02:00
steve-lad 2ffe4028e6 Add download function
WIP - debug with ringtones
2021-07-12 16:32:57 +02:00
steve-lad 6e26428b1d Update rewrite rules
Add header with credits
Add specific rule for sccp_manager
Add correct fields to parse xml for sccpvalues
Add new option to update files from @dkgroot/provision
2021-07-12 13:50:09 +02:00
steve-lad 651f3adb44 Finalise TFTP Mapping treatment
User no longer can select on or pro: If remapping is enabled and rules are set, then must use pro or phones will not find files
Otherwise is Off (flat directory)
2021-07-12 12:26:56 +02:00
steve-lad 5a184ededb Integrate Provision functionality into Sccp_Manager
Create required directory structure
Check if mapping support is enabled
Check if mapping rules are defined
Change options available based on above
Create index.cnf and sccpManagerRewrite.rules
2021-07-11 16:52:24 +02:00
steve-lad acdf777bcc Clean up xml in cnf files
Indentation was not satisfactory. Improves readability and presentation of cnf files created

Thanks to @dkgroot for proposing this improvement
2021-07-06 12:24:34 +02:00
steve-lad 2809b0796e Simplify List Button Presentation
Standardise method for all SL Types
WIP - unused method needs to be removed after full testing
2021-07-05 10:27:26 +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 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 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 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
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
steve-lad 852156878d Simplify method name 2021-06-24 15:40:36 +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 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 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 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
steve-lad efdf2d0469 Added sccpline fields
WIP Still have issue with def_modify in installer
2021-06-17 18:39:32 +02:00
steve-lad 416cedc425 Create new function to get device defaults
Add new function in helperFunctions and use
2021-06-17 10:18:07 +02:00
steve-lad 4ee26a9871 Name Changes 2021-06-02 15:03:38 +02:00
Renamed from SccpManTraits/helperfunctions.php (Browse further)