From 843e501902aa0f01f56d8aa5279c340bf82c8825 Mon Sep 17 00:00:00 2001 From: Jade Ellis Date: Wed, 16 Jul 2025 23:47:41 +0100 Subject: [PATCH] docs: Add section for testing TURN servers --- docs/turn.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/docs/turn.md b/docs/turn.md index 5dba823c..cccb1cb3 100644 --- a/docs/turn.md +++ b/docs/turn.md @@ -68,3 +68,27 @@ documentation](https://github.com/coturn/coturn/blob/master/docker/coturn/README For security recommendations see Synapse's [Coturn documentation](https://element-hq.github.io/synapse/latest/turn-howto.html). + +### Testing + +To make sure turn credentials are being correctly served to clients, you can manually make a HTTP request to the turnServer endpoint. + +`curl "https:///_matrix/client/r0/voip/turnServer" -H 'Authorization: Bearer ' | jq` + +You should get a response like this: + +```json +{ + "username": "1752792167:@jade:example.com", + "password": "KjlDlawdPbU9mvP4bhdV/2c/h65=", + "uris": [ + "turns:coturn.example.com?transport=udp", + "turns:coturn.example.com?transport=tcp", + "turn:coturn.example.com?transport=udp", + "turn:coturn.example.com?transport=tcp" + ], + "ttl": 86400 +} +``` + +You can test these credentials work using [Trickle ICE](https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/)