summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--synapse/config/voip.py6
-rw-r--r--synapse/rest/voip.py8
2 files changed, 6 insertions, 8 deletions
diff --git a/synapse/config/voip.py b/synapse/config/voip.py
index a47e81037a..3a211ae6b6 100644
--- a/synapse/config/voip.py
+++ b/synapse/config/voip.py
@@ -19,7 +19,7 @@ class VoipConfig(Config):
 
     def __init__(self, args):
         super(VoipConfig, self).__init__(args)
-        self.turn_uri = args.turn_uri
+        self.turn_uris = args.turn_uris.split(",")
         self.turn_shared_secret = args.turn_shared_secret
         self.turn_user_lifetime = args.turn_user_lifetime
 
@@ -28,8 +28,8 @@ class VoipConfig(Config):
         super(VoipConfig, cls).add_arguments(parser)
         group = parser.add_argument_group("voip")
         group.add_argument(
-            "--turn-uri", type=str, default=None,
-            help="The public URI of the TURN server to give to clients"
+            "--turn-uris", type=str, default=None,
+            help="The public URIs of the TURN server to give to clients"
         )
         group.add_argument(
             "--turn-shared-secret", type=str, default=None,
diff --git a/synapse/rest/voip.py b/synapse/rest/voip.py
index bb0108cbd1..31f3fd100d 100644
--- a/synapse/rest/voip.py
+++ b/synapse/rest/voip.py
@@ -24,13 +24,13 @@ import base64
 
 
 class VoipRestServlet(RestServlet):
-    PATTERN = client_path_pattern("/voip/turnuris$")
+    PATTERN = client_path_pattern("/voip/turnServers$")
 
     @defer.inlineCallbacks
     def on_GET(self, request):
         auth_user = yield self.auth.get_user_by_req(request)
 
-        turnUri = self.hs.config.turn_uri
+        turnUris = self.hs.config.turn_uris
         turnSecret = self.hs.config.turn_shared_secret
         userLifetime = self.hs.config.turn_user_lifetime
         if not turnUri or not turnSecret or not userLifetime:
@@ -49,9 +49,7 @@ class VoipRestServlet(RestServlet):
             'username': username,
             'password': password,
             'ttl': userLifetime / 1000,
-            'uris': [
-                turnUri,
-            ]
+            'uris': turnUris,
         }) )
 
     def on_OPTIONS(self, request):