ejabberd: Fix making call connections when using TURN

Closes: #2318.

We currently set 'restricted: false' to both stun and turn server configuration
in ejabberd. This works for stun but for turn, ejabberd assumes that
authentication is not needed even though it is needed for our coturn setup. Drop
the configuration option entirely as the desired values are already default in
both stun and turn cases.

Tests:

- On a fresh setup, install coturn and ejabberd. In ejabberd.yaml, the stun/turn
configuration does not have the restricted option.

- On a container without the patch, install coturn and ejabberd. Configuration
has restricted option. Apply the patch, ejabberd setup is updated and restricted
option is removed.

- Test that calls can't be made with TURN with 'restricted: false' set. Changing
it to true for TURN configuration allows the calls to be established. Remove the
restricted option entirely also works. This was tested by @Znoteer in #2318.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2023-02-02 18:31:54 -08:00 committed by James Valleroy
parent 982fec5a60
commit d0ea67cde6
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808
2 changed files with 1 additions and 2 deletions

View File

@ -50,7 +50,7 @@ class EjabberdApp(app_module.App):
app_id = 'ejabberd'
_version = 5
_version = 6
def __init__(self):
"""Create components for the app."""

View File

@ -292,7 +292,6 @@ def _generate_service(uri: str) -> dict:
"port": int(port),
"type": typ,
"transport": transport,
"restricted": False
}