1110 Commits

Author SHA1 Message Date
Benjamin Pracht
64057c3e4d Implement AgentDispatch service (#2919)
This allows listing, adding and deleting agent dispatches on an existing room. Requests go to a new AgentDispatchService, which sends them over RPC to the rtc.Room via the RoomManager. The rtc.Room then does agent job management using RPCs to the agent service.
2024-08-08 22:31:23 +02:00
cnderrauber
a8730b04b8 move TrackSubscribed trigger to MediaSubscription (#2916) 2024-08-07 22:30:52 +08:00
Raja Subramanian
13ee1aca28 Delay getting forwarder state till migration is complete. (#2909) 2024-08-06 12:45:46 +05:30
Raja Subramanian
8c323330b6 Store subscriber forwarder state (#2907)
* Forwarder state for migrating participant.

* clean up

* update protocol deps

* cleanup debug
2024-08-05 21:13:07 +05:30
cnderrauber
5e4c6d46fb rename log (#2906) 2024-08-05 13:46:56 +08:00
David Zhao
b1fbca066f Send the correct room closed reason to clients (#2901)
* Send the correct room closed reason to clients

* update go mod
2024-08-01 19:40:06 -07:00
Raja Subramanian
d68dd3033d Use extended sequence number in bucket (#2895) 2024-07-30 14:21:37 +05:30
Benjamin Pracht
0fd09d73c1 Instantiate default agent dispatches in rtc for better backward compatibility (#2886) 2024-07-22 08:44:13 -07:00
Raja Subramanian
bd616d6074 Split ICE candidate queue. (#2885)
Shared ICE candidate queue meant only one of PUBLISHER/SUBSCRIBER pc got
final candidate notification. Split the queue.
2024-07-20 10:25:06 +05:30
cnderrauber
0c5b5537b2 Don't create DDParser for non-svc codec (#2883) 2024-07-19 10:52:27 +08:00
Benjamin Pracht
a877ba2352 Partial support for agent dispatch management (#2872)
- Store agent dispaches independently of room agents on rtc.Room
- Serialize agent dispatches in rtc.Room
- Support for agent dispatch and job serialization in redis

The agent Job object references denormalized Room and ParticipantInfo object. When storing Jobs, this sets the Room to nil, and only stores the Participant identity field. When read back, these fields need to be set to their current value.
2024-07-18 13:36:43 -07:00
cnderrauber
e3597d780d Update pion to handle different extensions in two media section (#2878)
Also remove the code to disable DD extension for vp8/h264, it
cause DD can't be processed if the first video track is non-svc
codec.
2024-07-18 14:49:04 +08:00
Paul Wells
c905336fec mark final ice candidate (#2871)
* add IsFinal flag to last ice candidate

* deps
2024-07-16 09:50:55 -07:00
Paul Wells
9f42063fed use atomic pointer for MediaTrackReceiver TrackInfo (#2870) 2024-07-16 02:39:14 -07:00
Raja Subramanian
3621e9957e Prevent deadlock when adding down track. (#2869)
* Prevent deadlock when adding down track.

* revert down track lock scope change
2024-07-16 12:24:45 +05:30
Raja Subramanian
f7695cf9f4 Move track update methods to LocalParticipant. (#2868) 2024-07-16 08:09:46 +05:30
Raja Subramanian
f3d3ec1ce7 Record packet/octet count in sender report. (#2864)
Seeing cases of huge jumps in sender erport rtp time stamp
(of the order of minutes) a few hundred ms after start of track.
Only less than 20 packets have been published at that time as seen by
server. Adding these to sender report to check if client thinks it has
sent much more.
2024-07-16 07:59:27 +05:30
cnderrauber
e7424e5a8e don't send unknown signal message to rust sdk with protocol 9 (#2860)
rust sdk can't handle unknown message (ErrorResponse and
TrackSubscribed)
2024-07-16 00:03:54 +05:30
Raja Subramanian
affcd1ffdb Support updating local track features when pending. (#2863) 2024-07-15 23:51:39 +05:30
Raja Subramanian
faa66d1138 Make sender report pass through an option. (#2861)
Enabled by default.

Also, tweak the long term propagation delay a bit. The first propagation
delay itself was too high and the long term initialized with a high
value. Prevent that and also ensure large negtaives do not have an
effect by using a lower bound of 0. Lower bound of 0 is okay as the main
purpose is to track sustained high positive values.
2024-07-15 11:27:31 +05:30
Raja Subramanian
09e3aef859 Check size limits on metadata and name set from client. (#2850)
* Send error response when update metadata fails.

Keeping it simple for the first implementation.
- Send error response only if request_id != 0
- Two kinds of errors notified
  o does not have permissions - NOT_ALLOWED
  o attributes exceeds size limits -  INVALID_ARGUMENT

* Check size limits on metadata and name set from client.

Added a name length limit also.

* check name length in service update participant path also

* limit check in limit config

* update protocol

* longer keys
2024-07-12 09:57:17 +05:30
Raja Subramanian
b8847cd8e9 Send error response when update metadata fails. (#2849)
Keeping it simple for the first implementation.
- Send error response only if request_id != 0
- Two kinds of errors notified
  o does not have permissions - NOT_ALLOWED
  o attributes exceeds size limits -  INVALID_ARGUMENT
2024-07-10 23:26:44 +05:30
Denys Smirnov
40d7a8add0 Always forward DTMF data messages. (#2848) 2024-07-10 00:29:49 +03:00
cnderrauber
deee816d0a Forward correct payload type for mixed up red/primary payload (#2847)
* Forward correct payload type for mixed up red/primary payload

* empty line

* log field & test case
2024-07-09 23:04:47 +08:00
Benjamin Pracht
fb7eb3450e Update agents service to updated protocol (#2837)
- Deprecate namespace field
- Restore former semantic of starting a job for each registered namespace, for a given Agent Name
- Add agentName field
- Use "dispatcher" naming convention
2024-07-08 17:09:11 -07:00
cnderrauber
70fbba2844 Add track subscribed notification to publisher (#2834)
* Add track subscribed notification to publisher

* update go mod
2024-07-05 21:57:03 +08:00
cnderrauber
7a5c90dc01 log non-trickle candidate in details (#2832)
* log non-trickle candidate in details

* fix test
2024-07-03 14:16:58 +08:00
Paul Wells
e511464d3d add handler interface to receive agent worker updates (#2830)
* add handler interface to receive agent worker updates

* cleanup
2024-07-02 13:11:08 -07:00
Benjamin Pracht
32a4d03c9e Implement Agents protocol addition (#2786) 2024-06-27 19:20:52 -07:00
Denys Smirnov
6815d85c01 Broadcast attributes update. (#2825) 2024-06-27 17:39:05 +03:00
Raja Subramanian
fa88fbf028 Revert "Revert "use pending lock, no need for participant lock (#2793)" (#2818)" (#2820)
This reverts commit 6d9529431f.
2024-06-26 13:05:27 +05:30
Raja Subramanian
6d9529431f Revert "use pending lock, no need for participant lock (#2793)" (#2818)
This reverts commit f92e7e3db8.
2024-06-26 11:26:50 +05:30
David Zhao
7a774cc82a Support for participant attributes (#2806)
* Support for participant attributes

* move metadata setters to LocalParticipant

* address feedback

* forward error

* update go mod

* update attributes first
2024-06-19 23:14:19 -07:00
Lukas Herman
8a229fda9d add participant session duration metric (#2801) 2024-06-17 17:52:08 -04:00
Raja Subramanian
ef838e4fa2 Indicate if track is expectd to be resumed in onClose callback. (#2800)
That is the main change. Changed variable name to `isExpectedToResume`
everywhere to be consistent.

Planning to use the callback value in relays to determine if the down
track should be closed or switched to a different up track.
2024-06-17 23:51:00 +05:30
Raja Subramanian
f92e7e3db8 use pending lock, no need for participant lock (#2793) 2024-06-15 20:44:50 +05:30
David Colburn
29614cd4a1 clean up egress launcher (#2779) 2024-06-10 16:11:11 -07:00
Raja Subramanian
129ba62d61 Validate RTP packets. (#2778)
* Validate RTP packets.

Check version, payload type (if available) and SSRC (if available)
and drop bad packets. And let repair mechanisms take effect for those
packets.

* address data race reported by test

* fix an unlock and test packets
2024-06-10 15:43:59 +05:30
Raja Subramanian
73852d0a13 Reduce large sequence number jump threshold for logging. (#2770)
Seeing some unexplained large jumps on remotes across relay. Unclear if
there was a jump on origin side at some point. Reducing threshold for
large jump so that we can catch unexpected jumps more.
2024-06-07 12:36:02 +05:30
cnderrauber
908baeb942 initialize bucket size by publish bitrates (#2763) 2024-06-06 14:31:20 +08:00
Paul Wells
f1886ece42 update protocol (#2760)
* update protocol

* deps
2024-06-05 19:46:34 -07:00
Raja Subramanian
cfd3777f47 Use a safety net OnClose to remove track from peer connection. (#2758) 2024-06-05 21:54:22 +05:30
Raja Subramanian
49e1848d1d Move resync to TrackSender interface so that it can be called directly from up track (#2755) 2024-06-04 22:38:39 +05:30
Raja Subramanian
f9f761b223 Demote some less useful/noisy logs. (#2743) 2024-05-29 12:05:18 +05:30
Raja Subramanian
d9910ead61 Add back TrafficStats used by cloud. (#2736) 2024-05-27 13:43:20 +05:30
Raja Subramanian
991ad5a0ea Remove unused traffic load (#2734) 2024-05-27 10:53:23 +05:30
Raja Subramanian
721c36fbc0 Send telemetry events on track feature updates. (#2723)
* Send telemetry events on track feature updates.

* Do not process no change
2024-05-27 10:46:26 +05:30
Paul Wells
5e3b1e0f67 reduce participant lock scope (#2732) 2024-05-26 14:01:23 -07:00
cnderrauber
e6aa36fdd6 Add forward stats (#2725)
* Add forward metrics

* ignore packets was not forwarded

* rename
2024-05-24 17:43:28 +08:00
Raja Subramanian
80a4d021b9 Add simulate leave request close reason (#2713) 2024-05-10 20:02:25 +05:30