Commit Graph

23 Commits

Author SHA1 Message Date
Raja Subramanian
4102568c88 Per resource webhook queue. (#1000)
* Per resource webhook queue.

With a worker based approach, an event on a resource (like a room) not
being handled could affect other resources (other rooms or ingress or
egress).

To prevent that, do a per resource queue with two kinds of limits
- age of event: when queuing, if the event at the front of the queue
  exceeds a certain limit (default: 5 seconds), the event is dropped
- depth of queue: drop event if the number of queued events exceeds some
  level (default: 200)

To reap the per resource queue, specific end events are tracked and the
resource is added to the reap queue and reaped after a configurable
timeout (default: 5 min). This is to ensure that events happening just
after end event (for example: participant_left happening after
room_finished) are handled without re-creating a new resource.

Also, deprecating `num_dropped` from proto.

Some other bits of notes/challenges:
- Keeping the old URL notifier also. Also, the default notifier is that.
  Can change to the new one before merging this PR if this approach
  looks good.
- Using string compares of event name to detect end. Not great.
- Needs a sweeper to reap the resource queue. I think 5 min default
  timeout to reap should be okay, but maybe there are things that can
  cause re-creation of a resource queue after reaping and those could
  leak? Needs more analysis.
- Storing `context.Context` in resource queue so that it can be used
  during posting to webhook from resource queue go routine. Storing that
  is not great, but we need it for analytics key.

* generated protobuf

* missed files

* generated protobuf

* fix test in data race

* generate

* generated protobuf

* paul feedback

* fixes

* race

* more Paul feedback

* make resource notifier the default

* generated protobuf

* stop

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2025-03-07 22:39:59 +05:30
Paul Wells
1a019aab5b add participant job type (#981)
* add participant job type

* internal rpc

* generated protobuf

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2025-02-18 00:33:17 -08:00
Raja Subramanian
9b6e5d703f Webhook analytics event. (#979)
* Webhook analytics event.

NOTE: Need a frostbyte73/core PR to merge and tag a release
PR pending: https://github.com/frostbyte73/core/pull/5

* sync submit

* generated protobuf

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2025-02-13 10:21:17 +05:30
David Colburn
82dadcf607 Egress audio mixing options (#978)
* audio mixing options

* generated protobuf

* remove multi

* move audio mixing

* generated protobuf

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2025-02-12 12:56:45 -05:00
Raja Subramanian
18fcdd87b3 Participant joined_at_ms to get higher resolution of join time. (#949)
* Participant joined_at_ms to get higher resolution of join time.

* generated protobuf

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2025-01-22 13:48:08 +05:30
Benjamin Pracht
70efefb425 Add EgressSourceType to EgressInfo (#894)
* WiP

* Define EgressSourceType and record it in the EgressInfo for proper biling

* generated protobuf

* Create shy-planets-impress.md

* generated protobuf

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-12-25 16:01:07 -06:00
Raja Subramanian
c87b1afc61 Update deque to 1.0.0 (#929)
* Update deque to 1.0.0

* generated protobuf

* keep pointer

* generated protobuf

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-12-19 17:43:50 -05:00
Denys Smirnov
a55d5a012a Regenerate replay protos. (#919) 2024-12-10 15:56:44 +02:00
Benjamin Pracht
40165b03e6 Report call enabled features in SIPCallInfo (#884)
---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-11-26 09:37:32 -08:00
Raja Subramanian
792495362f Utility to build livekit.MetricsBatch (#889)
* mbb WIP

* generated protobuf

* tweaks

* generated protobuf

* merge

* filters

* add IsEmpty

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-11-25 09:59:26 +05:30
Benjamin Pracht
ee0a12bd25 Add extra fields to SIP analytics events (#872)
---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-10-28 10:10:43 -07:00
David Colburn
32abc4d3e9 krisp for outbound trunks (#868)
* krisp for outbound trunks

* generated protobuf

* move to createSIPParticipantRequest

* fix tointernal

* Update protobufs/livekit_sip.proto

Co-authored-by: David Zhao <dz@livekit.io>

* generated protobuf

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: David Zhao <dz@livekit.io>
2024-10-25 13:10:50 -04:00
Benjamin Pracht
b75479104c Add SIP analytics events (#831)
---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-10-14 15:04:02 -07:00
Paul Wells
bc519801ab update psrpc (#820)
* update psrpc

* generated protobuf

* client

* gen

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-09-20 23:51:17 -07:00
Benjamin Pracht
71b9c184e5 Add TransferParticipant to sip and sip internal services (#816) 2024-09-20 11:47:53 -07:00
Denys Smirnov
1f5de7d620 Update SIP protocol (#805)
* Update SIP protocol. Pass headers and project ID.

* generated protobuf

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-09-13 10:45:25 +03:00
Raja Subramanian
22e60a7ce1 Add grant for canSubscribeMetrics. (#795)
* Add grant for canSubscribeMetrics.

* Move can subscribe metrics to video grant.

* generated protobuf

* set CanSubscribeMetrics from permissions

* generated protobuf

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-08-26 12:40:00 +05:30
Paul Wells
0072ee0c6e add roommanager service (#789)
* add roommanager service

* merge

* merge

* generated protobuf

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-08-13 05:38:48 -07:00
Raja Subramanian
77997d3438 Send non-error responses also. (#786)
* Send non-error responses also.

Settling on the name `RequestResponse` (after not being able to find a
solid candidate) as it is response sent only when `request_id != 0`.

Renaming `UNKNOWN` reason to `OK` as it was unused. Will bump up
protocol and send `OK` only to client supporting that protocol version.

* generated protobuf

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-08-12 15:31:47 +05:30
Benjamin Pracht
581b59b653 Add AgentDispatchInternal service. Add JobTerminate to AgentService (#782) 2024-08-08 20:07:22 +02:00
Raja Subramanian
5be7cb358e Proto to store forwarder state. (#781)
* Proto to store forwarder state.

* generated protobuf

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-08-05 17:44:16 +05:30
Benjamin Pracht
497688ff49 Internal agent protocol improvements (#764) 2024-07-16 15:53:17 -07:00
David Colburn
14b61d08b0 Replay (#755)
* rebase

* update replay api

* generated protobuf

* add comment

* changeset

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-08 15:39:54 -07:00