Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] MSC3898: Native Matrix VoIP signalling for cascaded foci (SFUs, MCUs...) #3898

Draft
wants to merge 30 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
750087f
Native Matrix VoIP signalling for cascaded SFUs
SimonBrandner Sep 25, 2022
aa53398
Update MSC number
SimonBrandner Sep 25, 2022
de302cb
Link to diagrams from MSC3401
SimonBrandner Oct 2, 2022
7474782
Use correct number for file
SimonBrandner Oct 2, 2022
5cad46d
Update sub and unsub ops
SimonBrandner Nov 11, 2022
2cbc2d6
Merge remote-tracking branch 'upstream/main' into SimonBrandner/msc/sfu
SimonBrandner Nov 11, 2022
f542fcb
Give a reason for specifying res in metadata
SimonBrandner Nov 11, 2022
6f01a94
Specify foci by `device_id` too
SimonBrandner Nov 12, 2022
575e16c
Fixup some json
SimonBrandner Nov 12, 2022
33b1880
Typo
SimonBrandner Nov 12, 2022
65faee4
Specify how to handle foci better
SimonBrandner Nov 13, 2022
9882c97
Amend TODOs
SimonBrandner Nov 13, 2022
c66bbe4
Add rationale behind usage of data channels
daniel-abramov Nov 15, 2022
1b2d740
Add TODO
SimonBrandner Dec 2, 2022
feb064b
Update event types
SimonBrandner Dec 2, 2022
d96d101
Add unstable prefixes
SimonBrandner Dec 2, 2022
d538e1e
Use `subscribe` instead of `select`
SimonBrandner Dec 6, 2022
91470a2
`op` -> `event`
SimonBrandner Dec 6, 2022
2ef7425
Fixup formatting
SimonBrandner Dec 6, 2022
5a186e4
Use `content`
SimonBrandner Dec 6, 2022
b461525
Namespace things
SimonBrandner Dec 6, 2022
e49e80d
Further namespacing
SimonBrandner Dec 6, 2022
6b3fd47
Update the events to match current Matrix
SimonBrandner Dec 6, 2022
bf52e02
Fix typo
SimonBrandner Dec 7, 2022
f81dd9d
Use `subscribe`/`unsbuscribe`
SimonBrandner Dec 7, 2022
9c32b96
Add informational section on active/preferred foci.
dbkr Dec 8, 2022
6f8c9d1
Change keepalives to ping/pong
dbkr Dec 8, 2022
ecf2425
Add empty line
SimonBrandner Dec 8, 2022
bf04b17
Fix event name
SimonBrandner Dec 9, 2022
1896fc7
Remove encryption section as it's glossing over details
SimonBrandner Dec 12, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 21 additions & 9 deletions proposals/3898-sfu.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ between itself and the SFU to use later for rapid signalling.

The client uses the established data channel connection to the SFU to perform
low-latency signalling to rapidly (un)subscribe/(un)publish streams, send
keep-alive messages, metadata, cascade and perform re-negotiation.
ping messages, metadata, cascade and perform re-negotiation.

See the section about the [rationale](#the-use-of-the-data-channels-for-signaling)
behind the use of the data channels for signaling.
Expand Down Expand Up @@ -294,17 +294,29 @@ This event works very similarly to the 1:1 call `m.call.sdp_stream_metadata`.
}
```

##### `m.call.keep_alive`

Clients should send an `m.call.keep_alive` event to foci every so often. If
the client does not send an `m.call.keep_alive` event for 30 seconds, the
focus should hang up.

- **TODO: should this be configurable somehow?**
##### `m.call.ping`, `m.call.pong`
SimonBrandner marked this conversation as resolved.
Show resolved Hide resolved
A ping message must be sent by the focus to the client at an interval
no greater than 30 seconds. On receiving a ping message, a client must respond
immediately with a pong message. A client may therefore detect that the
connection has failed after an amount of time of its choosing (greater than
30 seconds) has elapsed since it last saw a ping message. A server may deem a
client unresponsive after not receiving a pong some amount of time after it
has sent a ping, again the amount of time the server waits is up to the
implementation. Either send should hang up once deeming the other side
unresponsive.

focus -> client:
```json
{
"type": "m.call.ping",
"content": {}
}
```

client -> focus:
```json
{
"type": "m.call.keep_alive",
"type": "m.call.pong",
"content": {}
}
```
Expand Down