FreePBX / issue-tracker

The unified FreePBX issue tracker.
https://www.freepbx.org
GNU General Public License v3.0
11 stars 1 forks source link

[bug]: Advanced Settings Reset or Omitted During Extension Creation/Modification via GQL API #528

Open RomainBerthet opened 1 week ago

RomainBerthet commented 1 week ago

FreePBX Version

FreePBX 17

Issue Description

When creating or modifying extensions via the GQL API in FreePBX, advanced settings are frequently reset to default values or omitted entirely. This issue appears to arise because the GQL API deletes and recreates extensions without fully retaining user-defined parameters. Consequently, critical settings such as DTMF Signaling, Transport, Call Waiting, Ring Time ... default to their original values, which disrupts configurations that require specific, user-defined values.

Expected Behavior During extension creation and modification through the GQL API, all settings, including advanced configurations, should be retained according to user input. Defaults should only apply if no custom input is provided.

Actual Behavior Advanced settings revert to default values, with only a subset of user-defined settings being preserved during GQL API calls. This leads to incorrect configurations in cases where specific parameters are essential, introducing potential errors and operational risks.

Steps to Reproduce

  1. Create or edit an extension in FreePBX using the GQL API and manually set advanced parameters.
  2. Save changes via the GQL API.
  3. Reopen the extension settings and observe that certain advanced settings have reverted to default values.

Suggested Solution Enhance the GQL API's handling of input parameters to include advanced settings. Ensure that each setting verifies the presence of user-defined values during extension creation and modification, defaulting only when no input is provided. Expand the set of parameters to account for all advanced settings in the API calls.

Operating Environment

FreePBX Version: 17.0.19.16 Asterisk Version: 21.4.3

Relevant log output

No response

RomainBerthet commented 1 week ago

A pull request has been submitted to address this issue by preserving advanced settings during extension creation and modification through the GQL API. The changes ensure that all custom parameters are retained instead of reverting to default values.

You can review the merge request here: https://github.com/FreePBX/core/pull/134

Please let us know if additional adjustments are needed.