You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-27Lines changed: 8 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -67,40 +67,21 @@ Consumers of the events must then run the `get-phonebook-credentials` action on
67
67
68
68
## Matrix integration
69
69
70
-
This module provides optional integration with a Matrix server module (for example `matrix5`). Integration is implemented so the Matrix module can call into FreePBX to authenticate or validate users.
70
+
Provides optional integration with a Matrix server module (e.g. `matrix5`). Use the included helper action `set-matrix-server` to enable or disable the NethVoice authentication endpoint on a Matrix instance.
71
71
72
-
A helper action `set-matrix-server` was added to manage this integration. The action performs the following steps:
72
+
The action sets or clears the `nethvoice_auth_url` used by the Matrix module to call FreePBX for external authentication.
73
73
74
-
- Resolve the target Matrix module using the module UUID stored in Redis under `module/<module_id>/environment` as the `MODULE_UUID` field. The action only uses this method for resolution and will fail if the UUID is not found.
75
-
- Calls `get-configuration` on the local NethVoice module to obtain `nethvoice_host`.
76
-
- Calls `get-configuration` on the target Matrix module to obtain its current configuration.
77
-
- Sets the `nethvoice_auth_url` field to either `https://<nethvoice_host>/freepbx/rest/testextauth` when integration is enabled, or to the empty string when disabled.
78
-
- Calls `configure-module` on the Matrix module with the merged configuration (the Matrix module's existing `get-configuration` response with `nethvoice_auth_url` overridden).
74
+
Parameters:
75
+
-`module_uuid`: string, required - the UUID of the Matrix module instance to update, find it using ` redis-cli hget module/matrix1/environment MODULE_UUID`
76
+
-`enable_integration`: boolean, required
79
77
80
-
This approach ensures the Matrix module receives a full, consistent payload suitable for its `configure-module` handler while only changing the authentication endpoint field required for NethVoice integration.
-`module_uuid` (string, required): the UUID of the Matrix module instance to configure. The action will locate the module id by scanning `module/*/environment` for the `MODULE_UUID` value.
88
-
-`enable_integration` (boolean, required): `true` to enable integration (sets the `nethvoice_auth_url`), `false` to disable it (clears the field).
89
-
90
-
### Example usage
91
-
92
-
Run the action as a cluster task (example JSON payload):
The action will find the module id (for example `matrix5`) by scanning Redis, fetch both configurations, set `nethvoice_auth_url` to `https://<nethvoice_host>/freepbx/rest/testextauth` and call `configure-module` on the `module/matrix5` agent.
102
-
103
-
If you prefer to run this manually for testing, use the `agent.tasks.run` equivalent on the cluster admin node or invoke the module task from your management tooling.
84
+
When enabling integration the `nethvoice_auth_url` is set to `https://<nethvoice_host>/freepbx/rest/testextauth` (using the configured NethVoice host); disabling the integration clears the field.
0 commit comments