Commit Graph

574 Commits

Author SHA1 Message Date
Raja Subramanian
c8b7d486b9 Do not synthesise DISCONNECT on session change. (#2412)
* Do not synthesise DISCONNECT on session change.

v12 clients can handle session change based on identity.

* change for testf

* Squelch participant update if close reason is DUPLICATE_IDENTITY.

* fix test

* comment

* Clean up participant close reason a bit

* fix test

* test
2024-01-31 11:36:50 +05:30
Raja Subramanian
846121e781 Revert "Cache data synchronously for processing in worker." (#2425) 2024-01-29 12:36:27 +05:30
Raja Subramanian
efbc985c82 Cache data synchronously for processing in worker. (#2424)
It is possible that state of underlying object has changed between
event posting and event processing. So, cache data synchronously
and use it during event processing.

This is still not perfect as things like `hidden` and `IsClosed` is
accessed in worker. Ideally, it can be a snapshot of current state of
all required values that can be posted to the worker and the worker just
operates with data.
2024-01-29 10:57:41 +05:30
Benjamin Pracht
c2549081c8 Allow creating SRT URL pull ingress (#2416) 2024-01-26 14:03:46 -08:00
Raja Subramanian
d3da94c45e Augment LeaveRequest with alternate regions to connect. (#2408)
* Augment LeaveRequest with alternate regions to connect.

* update protocol and issue resume action on close if expected to resume

* use current protocol in tests

* address feedback
2024-01-25 22:22:46 +05:30
Denys Smirnov
89c7cec2ad SIP: New protocol for creating participants. (#2404) 2024-01-24 20:01:22 +02:00
Paul Wells
867325d120 restore legacy room delete behavior (#2400) 2024-01-22 05:18:12 -08:00
Paul Wells
cb42c6152c add psrpc redis keepalive (#2398)
* add psrpc redis keepalive

* deps
2024-01-21 06:16:40 -08:00
Raja Subramanian
8c932da678 Add ControllerNodeId and SelectionReason to StartSession. (#2396)
* Add ControllerNodeId and SelectionReason to StartSession.

Media node has that information and can log it in context.

* Update deps

* clean up and mage generate

* clean up and fix test

* clean up

* clean up
2024-01-19 17:06:09 +05:30
Sean DuBois
750d2b5765 Update livekit/protocol (#2390)
Fix API breakage with SIP
2024-01-17 10:03:47 -05:00
Paul Wells
3f2f850bdb clean up legacy rpc (#2384)
* clean up legacy rpc

* cleanup

* cleanup

* cleanup

* tidy

* cleanup

* cleanup
2024-01-14 01:49:26 -08:00
Paul Wells
2fe2a9c9f2 add session start time metric (#2377) 2024-01-11 23:23:51 -08:00
Paul Wells
d70a8e366c inject logger constructor into signal server (#2372)
* inject logger constructor into signal server

* tidy

* tidy

* test
2024-01-10 03:31:54 -08:00
Benjamin Pracht
4e30e1a86d Send telemetry events when switching to COMPLETE state (#2371) 2024-01-08 16:24:53 -08:00
Raja Subramanian
32bd75648f Wait for metadata update. (#2363) 2024-01-05 17:07:44 +05:30
Raja Subramanian
5429edd476 Record node selection reason. (#2346) 2023-12-25 23:03:39 +05:30
David Zhao
be526cc43e Adds callback to notify when workers are registered (#2328) 2023-12-20 08:10:35 -08:00
David Colburn
1bff4f387d Update io service (#2300)
* update io service

* consistency
2023-12-06 11:17:59 -08:00
Paul Wells
d4c4bc1100 fix signal response delivery after session start failure (#2294)
* fix signal response delivery after session start failure

* tidy
2023-12-04 19:11:55 -08:00
Denys Smirnov
ec2efa2dc4 SIP: Better debug logging. (#2293) 2023-12-04 20:03:20 +02:00
Denys Smirnov
1240c1670b SIP: Properly handle nil trunk. (#2291) 2023-12-04 10:21:21 -05:00
David Zhao
3fe124c87f Log cleanup pass (#2285)
* Log cleanup pass

Demoted a bunch of logs to DEBUG, consolidated logs.

* use context logger and fix context var usage

* moved common error types, fixed tests
2023-12-02 15:07:31 -08:00
Denys Smirnov
dd024571a1 SIP: Move dispatch rule evaluation to protocol package. (#2279) 2023-11-30 19:46:24 +02:00
Denys Smirnov
b9ab057c6b SIP: Update protocol for outbound calls. (#2263) 2023-11-29 16:13:33 +02:00
Raja Subramanian
fa061b47fc Logging adjustnments (#2273) 2023-11-29 15:40:01 +05:30
David Zhao
4ba4f5310b Use default psrpc client parameters (#2269) 2023-11-27 23:20:16 -08:00
Raja Subramanian
53542b09a0 Participant traffic load. (#2262)
* Participant traffic load.

Capturing information about participant traffic
- Upstream/Downstream
- Audio/Video/Data
- Packets/Bytes

This captures a notion of how much traffic load a participant is
generating.

Can be used to make allocation decisions.

* Clean up

* SIP patches

* reporter goroutine

* unlock

* move traffic stats from protocol

* check type
2023-11-26 23:05:00 +05:30
Raja Subramanian
56dd399684 Use a worker to report signal/data stats. (#2260)
* Use a worker to report signal/data stats.

Was checking if reporting is needed on every update.
The check is wasted work if volume of signal/data messages is high
as reporting happens only once in 10 seconds.

Changing to a worker based on a timer. And also aligning with
telemetry reporting interval which defaults to 30 seconds.

* Remove unused constant
2023-11-22 11:47:15 +05:30
Denys Smirnov
f18d6356e8 SIP: Update protocol, use NoPin flag. (#2250) 2023-11-20 10:18:59 -05:00
Denys Smirnov
7bcd6d4df0 SIP: Implement GetSIPTrunkAuthentication. (#2244) 2023-11-15 15:29:36 -05:00
Denys Smirnov
c6e467e903 Initial SIP Dispatch Rules implementation (#2241) 2023-11-15 09:35:05 -05:00
Sean DuBois
702e562f9f Add SIP Support (#2240) 2023-11-14 14:24:54 -05:00
Paul Wells
aa797c749c validate input to agent worker register (#2231)
* validate input to agent worker register

* prevent multiple registrations

* cleanup
2023-11-09 00:58:59 -08:00
Paul Wells
229c80ac17 retry jobs when agent ws write fails (#2230)
* retry jobs when agent ws write fails

* release lock before io
2023-11-09 00:29:21 -08:00
David Colburn
57643a42ed Agents enabled check (#2227)
* agents enabled check

* participant -> publisher

* nil check client

* add NumConnections

* add lock around agent check

* do not launch agents against other agents

* regen

* don't need atomic anymore

* update protocol
2023-11-07 19:19:07 -08:00
David Colburn
60374c6402 Agents (#2203)
* agents

* add test

* undo name changes

* remove debug logs

* fixes

* fix data race in test
2023-11-03 11:43:35 -07:00
Raja Subramanian
f165ae1fa0 Separate publish and subscribe enabled codecs for finer grained control. (#2217) 2023-11-03 10:14:11 +05:30
Paul Wells
de7532b5a1 split room and participant services (#2205)
* merge

* tidy

* deps
2023-10-31 21:28:21 -07:00
David Colburn
60c78affda clean up ioInfo (#2195) 2023-10-26 13:32:31 -07:00
Paul Wells
a5abf61a56 update psrpc (#2188) 2023-10-25 20:20:49 -07:00
Paul Wells
48dba9d589 reduce closing signal stream log level (#2182) 2023-10-24 17:46:07 -07:00
David Colburn
b8ac836b9b Only launch room egress once (#2175)
* only launch room egress once

* regenerate fakes
2023-10-24 13:05:23 -07:00
Paul Wells
f80e87b216 skip psrpc service registration unless the config is enabled (#2181) 2023-10-24 11:41:52 -07:00
Raja Subramanian
df9d6ee0f4 Update protocol. (#2177) 2023-10-24 12:59:25 +05:30
David Colburn
0f27dda281 move CreateEgress call (#2168) 2023-10-23 09:15:18 -07:00
cnderrauber
eca32792b8 Add configuration to limit MaxBufferedAmount for data channel (#2170)
* Add configuration to limit MaxBufferedAmount for data channel

* comment

* Fix generate flags

* fix test

* Don't disconnect slow subscriber
2023-10-23 15:03:58 +08:00
Paul Wells
0bc932e57e fix config typo (#2172)
* fix config typo

* tidy

* add sample config

* cleanup
2023-10-22 23:43:03 -07:00
Paul Wells
325e5ca753 add psrpc room service (#2171)
* add psrpc room service

* update deps

* disable by default

* feedback

* config

* test
2023-10-22 22:49:38 -07:00
David Colburn
b290c233ea fix CreateEgress not completing (#2156) 2023-10-18 23:18:53 -07:00
David Colburn
62b057b4c1 Egress store/IO cleanup (#2152)
* egress store cleanup

* client wrapper, regenerate

* put WithClusterID back

* rename clent

* infinite loops

* client wrapper -> interface

* remove StopEgress update

* remove Update from IOClient

* avoid duplicate EgressStarted events

* update protocol
2023-10-18 14:48:51 -07:00