Commit Graph
51 Commits
Author SHA1 Message Date
Joachim Bauch cbb6d9ca53 Update capabilities if no hello v2 token key is found in cache.
This is necessary to detect updated Talk setups where the signaling server
might have cached capabilities without the v2 token key but the clients
are trying to connect with a hello v2 token. Fetch updated capabilities in
such cases (but throttle to about one invalidation per minute).
2022-08-04 08:55:21 +02:00
Joachim Bauch 184c941f8a Support plain Ed25519 key as returned by Nextcloud / PHP. 2022-08-03 16:33:48 +02:00
Joachim Bauch 156bc360ff Add hello version "2.0" that authenticates connections using a JWT. 2022-08-03 16:33:45 +02:00
Joachim Bauch deaa17acc5 Implement per-backend session limit for clusters. 2022-07-13 11:52:20 +02:00
Joachim Bauch e101e74672 Fix sending messages to virtual sessions on different servers. 2022-07-12 11:54:41 +02:00
Joachim Bauch 95d5e50705 Disconnect sessions with the same room session id synchronously.
Previously there was a difference in the events being received by other
sessions for the clustered case compared to the single-server case.
Now the events / ordering are the same for both cases.
2022-07-11 10:39:06 +02:00
Joachim Bauch 66e502dc9b Fix handling of "unshareScreen" messages and add test.
Also update tests for "requestoffer" / "sendoffer".
2022-07-08 17:09:22 +02:00
Joachim Bauch 608415c3ff Track anonymous sessions not in rooms instead of clients.
Otherwise it would be possible for clients to reconnect to reset their
timer to join a room.
2022-07-08 15:52:32 +02:00
Joachim Bauch 545bce0082 Fix and add test for clustered disconnect of duplicate room ids. 2022-07-08 14:57:29 +02:00
Joachim Bauch d3f8876d25 Merge pull request #281 from strukturag/refactor-async-events
Clustering support
2022-07-07 16:24:15 +02:00
Joachim Bauch f7db8a38e1 Send initial "welcome" message when clients connect.
This can be used to detect server features before performing the
actual "hello" handshake.
2022-07-07 09:57:10 +02:00
Joachim Bauch 24eab34da7 Allow configuring backends through etcd. 2022-06-30 11:35:36 +02:00
Joachim Bauch 20cc51c2fe grpc: Automatically detect if a target is the current server itself.
This allows configuring the same list of targets for all instances without
having to setup the "own" address differently for each server.
2022-06-30 11:35:35 +02:00
Joachim Bauch dcb5be956c Implement "sendoffer" for remote sessions. 2022-06-30 11:35:33 +02:00
Joachim Bauch 36710c8aa9 Improve detection of decodable sessions that were created on a different server. 2022-06-30 11:35:32 +02:00
Joachim Bauch a0d3af14e0 Add initial clustering support. 2022-06-30 11:35:28 +02:00
Joachim Bauch ece2903413 Trigger "joined" events through async messages. 2022-06-24 13:37:37 +02:00
Joachim Bauch 0115c97946 Refactor asynchronous events to central location. 2022-06-24 13:37:35 +02:00
Joachim Bauch 800ece1d90 Support combining ping requests of different rooms on the same backend. 2022-05-17 16:38:16 +02:00
Joachim Bauch c0f56ff81a Merge pull request #239 from strukturag/toggle-audio-video
Support toggling audio/video in subscribed streams.
2022-05-10 11:39:10 +02:00
Joachim Bauch ec7bc6874e Remove redundant check for "nil" (fixes linter error). 2022-05-10 10:52:19 +02:00
Daniel Calviño Sánchez 3f7ebc8ef9 Fix "signaling_server_messages_total" stat not being incremented
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2022-05-03 13:56:35 +02:00
Daniel Calviño Sánchez 3636e69dba Add specific ID for connections
A new ID is introduced for publishers and subscribers to be able to
identify different connections in the same session. While it was
possible to do that from the Janus handles this ID is meant to be shared
with the clients and set by the peer sending the offer, so it is set by
the client for publishers and by the signaling server for subscribers
(in which case the Janus handle is used).

This will make possible to know without any ambiguity if an offer/answer
belongs to an already existing connection or not. This can be used, for
example, to know if an offer represents an update or a new connection,
or to discard unneeded messages that might be sent in some corner cases
by the clients.

The ID name is "sid" for consistency with the property name used by the
internal signaling server of Talk.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2022-04-27 11:14:59 +02:00
Joachim Bauch 5f97794691 Send directly to local session with disconnected client.
Before it was using NATS to deliver the message to the session.
2022-04-11 16:53:47 +02:00
Joachim Bauch 97f2a1d5f0 Add special events to update "incall" flags of all sessions. 2022-03-23 09:15:22 +01:00
Joachim Bauch 8fd9c688b6 Merge pull request #195 from danxuliu/send-updated-offers-to-subscribers-after-publisher-renegotiations
Send updated offers to subscribers after publisher renegotiations
2022-02-25 09:16:10 +01:00
Daniel Calviño Sánchez cd93db60a4 Introduce feature flag for SDP updates
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2022-02-25 07:47:30 +01:00
Joachim Bauch fca30af201 Add API for transient room data. 2022-02-16 12:30:39 +01:00
Joachim Bauch 76ad24ca62 Include room session id in "joined" events.
This helps with matching signaling sessions with sessions in Talk.
2021-12-17 16:02:22 +01:00
Joachim Bauch 707b125730 Check individual audio/video permissions on change.
If a client publishes audio/video and no longer has the video permission,
the whole publisher will be closed. Previously this was only checking
the generic "media" permission.
2021-11-08 12:08:14 +01:00
Joachim Bauch a05acc9cb4 Include available features in header of backend requests to Nextcloud.
The header "X-Spreed-Signaling-Features" will contain a comma-separated list
of feature flags.
2021-11-03 15:24:27 +01:00
Joachim Bauch 70b37364d3 Support separate permissions for publishing audio / video.
Clients with permission "publish-media" can publish any audio/video. Other
clients need to have "publish-audio" and/or "publish-video" to publish the
corresponding media types. For this the SDP in the offer is parsed to check
what will be sent.
2021-11-03 15:24:25 +01:00
Joachim Bauch c51276596b Internal clients always may subscribe all streams.
Follow-up to #133.
2021-10-11 13:44:54 +02:00
Joachim Bauch a663dd43f9 Add option to allow subscribing of any streams (disabled by default). 2021-09-23 09:05:49 +02:00
Joachim Bauch b398591447 Only allow subscribing if both users are in the same room and call.
Previously it was possible to subscribe any stream if the session id of the
publisher was known.
2021-09-23 09:05:25 +02:00
Joachim Bauch 6841d1495f Fixup: don't decrement virtual sessions twice. 2021-08-10 08:50:41 +02:00
Joachim Bauch ce1b3fc6e2 Add more metrics on rooms / sessions / backends. 2021-08-10 08:50:41 +02:00
Joachim Bauch e40e86f32c Merge pull request #104 from strukturag/stream-selection-api
Add API to select a simulcast substream / temporal layer.
2021-07-01 08:54:11 +02:00
Joachim Bauch 8a87a0d602 Add feature flag "simulcast". 2021-06-08 13:49:09 +02:00
Joachim Bauch 0a8ce3bda3 Add API to select a simulcast substream / temporal layer. 2021-06-08 13:49:08 +02:00
Joachim Bauch 9d2ad0f243 Notify new clients about current flags of virtual sessions. 2021-06-08 13:46:25 +02:00
Joachim Bauch 2f4414561e No need to include trailing newline in log messages. 2021-06-04 16:42:17 +02:00
Joachim Bauch 0b2df54343 Send hello response through session. 2021-06-04 15:46:22 +02:00
Joachim Bauch 21f3f506d1 Send more responses through the session to handle disconnected / resuming clients. 2021-06-04 15:40:43 +02:00
Joachim Bauch 15d5c93b0b Support session resumption while a room is being joined.
If a client resumed a session while a (slow) backend request to join a room
was still active, the response could get lost.
2021-06-04 15:40:42 +02:00
Joachim Bauch c8e4bfe007 Fix various issues found by golangci-lint. 2021-04-26 17:25:52 +02:00
Joachim Bauch 8052df4ef5 Wait for clients to be terminated before destroying hub in tests.
This should help with the flaky test failures on CI.
2021-04-23 15:12:09 +02:00
Joachim Bauch a5faca00cd Pass backend when fetching room for managing virtual sessions.
The internal room id is different depending on the backend.
2021-04-23 14:39:42 +02:00
Joachim Bauch 047e6655a1 Remove unnecessary assignments. 2021-04-21 14:12:11 +02:00
Joachim Bauch 0dd2e8a086 Remove remaining virtual sessions if client session is closed.
Previously any virtual sessions that have not been explicitly closed were
not removed from the backend if the client session was closed / expired.
2021-04-21 14:05:45 +02:00