matrix-org / matrix-org/matrix-spec

TURN servers can't specify different credentials.

Open
#1,252 0 comments 0 reactions 0 assignees View on GitHub
A-VoIP improvement
Dominant language
HTML
Stars
330
Forks
150
Avg merge
2h 21m
Merged PRs (30d)
3

Description

The shape of the response of GET /voip/turnServers is:

```json
{
"password": "JlKfBy1QwLrO20385QyAtEyIv0=",
"ttl": 86400,
"uris": [
"turn:turn.example.com:3478?transport=udp",
"turn:10.20.30.40:3478?transport=tcp",
"turns:10.20.30.40:443?transport=tcp"
],
"username": "1443779631:@user:example.com"
}
```

However, the thing you pass it into in WebRTC, [RTCIceServer](https://developer.mozilla.org/en-US/docs/Web/API/RTCIceServer), looks like:

```json5
[{
urls: "stun:stun.services.mozilla.com",
username: "louis@mozilla.com",
credential: "webrtcdemo"
}, {
urls: [
"stun:stun.example.com",
"stun:stun-1.example.com"
]
}]
```

These are needlessly desynced. As a result:

* You can't specify per-TURN uri credentials, unlike WebRTC
* One has `uris` and the other has `urls`
* One has `password` and the other has `credential`.

They should be brought in sync.

Contributor guide

Open the contributing guide

Research direction

Start with the GET /voip/turnServers response described in the issue and compare it with the RTCIceServer shape linked there. Update the specification so the response uses the WebRTC field names and supports per-TURN URI credentials; done means the two shapes are in sync.

Written by the indexing model from the issue text.

Assessment

Domain
api, audio-video-rtc
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.