Commit graph

568 commits

Author SHA1 Message Date
steve-lad acb0141d99 Refine Sccp.class
Move help and other defs to sccpgeneral so that have one interface across system
Correct defaults in line with chan-sccp
Standardise db object, and move sql to dbinterface to remove second dependancy
2021-07-08 17:22:50 +02:00
steve-lad 6429b6add9 Finalise Codec Management
Add video codec treatment
Correct missing defaults
Simplify defaults in Sccp.class
2021-07-08 08:56:42 +02:00
steve-lad 11da8356a5 Update Sccp_manager.class.php 2021-07-06 17:20:42 +02:00
steve-lad 945e77f9bc Simplify getCodecs by using array functions 2021-07-06 17:18:17 +02:00
steve-lad f929267910 Provide mechanism to reset codecs to system defaults
Unchecking all codecs will return to chan-sccp defaults
Document this behaviour
Remove various debug code
2021-07-06 16:12:25 +02:00
steve-lad 2e5028f438 Finalise Codecs tab for site defaults
Partially revert changes to sccpvalues keys
Remove obsolete code
Improve help and set as open by default
Move getMyConfig to AjaxHelper as only used there
2021-07-06 15:22:12 +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 8b06495938 Update installer to handle chan-sccp parsable fields
chan-sccp has parsable fields where two values are separated by a |.
Parse these fields and their associated values and create two fields.
Remove the unparsed field if it exists.
2021-07-06 11:54:46 +02:00
steve-lad fea6d88aa5 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

Remove Inherit processing

Remove functionality added to hide inherit in default configs - Inherit has been removed from sccpgeneral.xml
2021-07-06 09:31:44 +02:00
steve-lad 5af3c7d2eb
Merge pull request #26 from chan-sccp/Fix-Issue-#25
Fix issue #25
2021-07-06 09:08:14 +02:00
steve-lad 47522b4a25 Update SIP cnf as well 2021-07-06 09:06:10 +02:00
steve-lad 4ad33852fd Revert "Revert "Fix Issue #25""
This reverts commit 6fa4c8626e.
2021-07-06 09:01:26 +02:00
steve-lad 6fa4c8626e Revert "Fix Issue #25"
This reverts commit c1aab666b3.
2021-07-06 08:58:47 +02:00
steve-lad c1aab666b3 Fix Issue #25
Fix incorrect separator and key reference.
2021-07-06 08:58:03 +02:00
steve-lad 44e0846761 Update server.codec.php
Add Recommendation for disallow
2021-07-06 08:30:38 +02:00
steve-lad a6a9850a3c rewrite codec methods to be more compliant with chan-sccp
Update db Fields for defaults
Update save logic
WIP update save defaults Field  in sccpline
2021-07-05 17:08:01 +02:00
steve-lad b15729a340 Change earlyrtp enum
chan-sccp enum is now yes / no and all older values equate to one of these. Help updated in chan-sccp revision: 566c8695
2021-07-05 11:17:03 +02:00
steve-lad a493165153 Insert missing </div> at end of SL type
</div> was commented out
Change sccpdevice type to IE ( using a list suggests changes are legitimate. While true, they are not recommended, so now user must know exactly what to enter.
2021-07-05 11:02:52 +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 503f227b98 Convert formShowSysDefs to anonymous class
Allows use of methods per type, which allows clearer compartmentalisation of variables and code.
Improves loading as FreePBX instantiates only once
WIP - create a full class loaded with Sccp_Manager
2021-07-04 16:46:18 +02:00
steve-lad b6dfb51993 Conditional include of Use chan-sccp defaults/Customise button
If there is no chan-sccp default, do not add the button to use chan-sccp default/customise

This adds a large block of html + php enclosed within {}. Add documentation so that this is clear
2021-07-04 09:02:33 +02:00
steve-lad 6ecc981a02 Align more defaults 2021-07-03 16:44:52 +02:00
steve-lad dd9888e55e (re)Align Defaults and Default values with chan-sccp
Ensure all defaults use same vales as chan-sccp (partial revert of earlier changes)
Initialise UsingSysDefaults
Clarify html
2021-07-03 16:29:31 +02:00
steve-lad 7dc4438ad8 Enable/Disable buttons when setting chan-sccp defaults
First version - Needs simplifying!
2021-07-03 12:10:44 +02:00
steve-lad 93fe6d45e1 Extend defaults to all pages
Change enum in installer to correspond to chan-sccp
2021-07-02 12:27:06 +02:00
steve-lad 927186151e Update checkbox defaults logic 2021-07-02 08:29:15 +02:00
steve-lad dcd9c75886 WIP Partial fix for setting default radio buttons 2021-07-01 10:11:02 +02:00
steve-lad 02f0b401d0 Impliment defaults for class IS
WIP
2021-06-30 16:31:29 +02:00
steve-lad e50c32a1ac Correct Indents for IS data type 2021-06-30 15:04:09 +02:00
steve-lad 3b91ad2188 Update JS
Default settings for customise are chan-sccp settings
Include QOS page group
Change help text
2021-06-30 14:27:39 +02:00
steve-lad 01b5e9e868 Use Dynamic Checkbox 2021-06-30 13:43:52 +02:00
steve-lad 64624fa597 Simplify chan-sccp help usage
Convert array to string when loaded, and rename arrays that hold the data for clarity
2021-06-30 08:14:15 +02:00
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