-
Notifications
You must be signed in to change notification settings - Fork 12
Description
FreePBX Version
FreePBX 16
Improvement Description
About Extension we can Add and Update an extension but if the goal is to update any extension, the request featching the extension doesn't return maxcontact. And there is no way to get this value with any existing API requests.
That will be nice to see maxcontact's value when we are editing this extension.
Need to check if this kind of case is true for the other requests. Whatever if the request is RestAPI or GQL though.
Indeed, the locic will be:
If we can update something, the be sure to get the same items with their value. Otherwise, it doesn't make sense.
Example:
We can imagine creating the extension 100 with max contact = 1 (by default).
Some days later, we decide to update max contact to 3. Ok in this case we set maxcontact to 3.
If we need to check this value, then, there is no way to verify it. And I think if we set nothing on maxcontact, the value will be changer to 1 and not 3.
maxcontact is not alone in this case. All fields present in addExtension and updateExtension cannot be read in a same request. Need to send at least 2 requests to get almost what we need to display the fields for udpate.
The logic would be to get everything when we read any items necessary for updates.