Commit Graph

547 Commits

Author SHA1 Message Date
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
Raja Subramanian 11c9c56a4d Defer close of source and sink to prevent error logs. (#2149)
When a room is created via room service, when `StartSession`
runs, it sees a closed request source and returns an error
and that gets logged. It is not a real error.

Defer the sink and source close so that room creation can finish without
errors.
2023-10-17 11:37:34 +05:30
Benjamin Pracht 4253845505 Create stub for update outputs in egress service (#2132) 2023-10-05 12:00:47 -07:00
cnderrauber 92a355e1f3 Add SyncStreams flag to Room (#2110)
* Add SyncStreams flag to Room

* Increase protocol version

* Revert version change

* Move flags to internal & solve comment
2023-09-28 15:41:44 +08:00
cnderrauber 1200a960a2 Use generic type cast for IDs (#2095) 2023-09-20 17:09:24 +08:00
Raja Subramanian 281d2b674b Changing some log levels (#2094)
Logging expected WS close at Infow to understand reasons for closure.
Moving "read from ws" to Debugw as it happens when signalling closes.

Also filter out a data channel abort chunk log as it shows a bunch of
errors, but those are expected though.
2023-09-20 14:13:48 +05:30
cnderrauber e46da0705a Add max playout delay config (#2089)
* Add max playout delay

* config sample
2023-09-19 11:30:38 +08:00
David Colburn 8a0d417a8c Participant egress (#2070)
* participant egress

* remove hasPublished when participant leaves room
2023-09-18 12:47:57 -07:00
David Zhao 0b0431b765 Per-session TURN credentials (#2080)
Switching to using session specific TURN credentials instead of shared
credentials per Room. Also eliminates need to load Room from Redis
during TURN authentication
2023-09-17 10:08:35 -07:00
David Zhao f351f9b2ed Allow RoomService.SendData to use participant identities (#2051)
* Allow RoomService.SendData to use participant identities

* update protocol

* update webrtc to 3.2.19
2023-09-08 16:22:56 -07:00
cnderrauber 9b9298b927 Add batch i/o to improve throughput (#2033)
* Add batch i/o to improve throughput

* remove empty line

* Solve comments

* Change rtcconfig.UDPPort to PortRange

* Fix test
2023-09-06 10:18:20 +08:00
Raja Subramanian 6509bb0325 Add option to issue full reconnect on data channel error. (#2026)
* Add option to issue full reconnect on data channel error.

There are situations where send data packet fails because of "stream
closed". It is unclear when that happens. Seems to be after an
ICERestart after ICE failed and connection type switching to TURN
from ICE.

Once the failure happens, it is not recoverable. Potentially, it is
recoverable, but unclear where the problem lies. Attempts to reproduce
looking at the pattern of failures has been unsuccesful.

In the mean time, adding an option to issue full reconnect
when send data packet fails.

* typo
2023-09-01 17:59:25 +05:30
David Zhao d5808f96df Disconnect participant when signal proxy is closed (#2024)
When signal proxy is closed, we'd want to stop writing to it and sever
WS connection with the client. Client would go into a reconnect sequence
2023-08-31 09:39:45 -07:00
Raja Subramanian 7dc8a7f80c Remove sender report warp logs. (#2007)
* Remove sender report warp logs.

They are not useful.
Also replacing drift report with proper protocol and reporting
both packet ad report drift.

Need to dig more into out-of-order sender report sending.
That requires some digging and understanding.

* record time of anachronous report

* more logging around out-of-order repair

* log time of out-of-order received sender report

* Update deps and place holder StartParticipantEgress
2023-08-29 00:30:24 +05:30
David Zhao eed8e85008 Demote more logs to debug (#1998) 2023-08-27 19:17:38 -07:00
Benjamin Pracht ce418dc6b3 Do not generate a stream key for URL pull ingress (#1993) 2023-08-24 12:50:05 -07:00
Benjamin Pracht e3ed9ff53f Validate that url pull ingress are ready to use on creation (#1939) 2023-08-07 15:44:44 -07:00
Benjamin Pracht 98c1fb598c Add support for ingress URL pull (#1938)
Also prevent update of non reusable ingress
2023-08-04 11:41:36 -07:00
David Zhao debd75fa15 Integrate logger components (#1933)
* Integrate logger components

Dividing into the following components
* pub - publisher
* pub.sfu
* sub - subscriber
* transport
* transport.pion
* transport.cc
* api
* webhook

* update go modules
2023-08-03 13:31:17 -07:00
cnderrauber eadc910bff Add PlayoutDelay to CreateRoomRequest (#1930)
* Add PlayoutDelay to CreateRoomRequest

* Remove max delay from palyoutdelay
2023-08-03 16:32:59 +08:00
cnderrauber f7a1776f4c Add control of playout delay (#1838)
* Add control of playout delay

Add config to enable playout delay. The delay will be limited by
[min,max] in the config option and calculated by upstream & downstream
RTT.

* check protocol version to enable playout delay

* Move config to room, limit playout-delay update interval, solve comments

* Remove adaptive playout-delay

* Remove unused config
2023-08-02 16:12:23 +08:00
Raja Subramanian db3fbb57ae Do not log as error on connection reset by peer (#1923) 2023-08-01 19:04:54 +05:30
David Zhao 981fb7cac7 Adding license notices (#1913)
* Adding license notices

* remove from config
2023-07-27 16:43:19 -07:00
Raja Subramanian fc7d4bd01e E2EE trailer for server injected packets. (#1908)
* Ability to use trailer with server injected frames

A 32-byte trailer generated per room.
Trailer appended when track encryption is enabled.

* E2EE trailer for server injected packets.

- Generate a 32-byte per room trailer. Too reasons for longer length
  o Laziness: utils generates a 32 byte string.
  o Longer length random string reduces chances of colliding with real data.
- Trailer sent in JoinResponse
- Trailer added to server injected frames (not to padding only packets)

* generate

* add a length check

* pass trailer in as an argument
2023-07-27 16:50:18 +05:30
Paul Wells 6c20c7eb15 add test for removing disconnected participants on signal close (#1896)
* add test for removing disconnected participants on signal close

* cleanup
2023-07-20 21:21:40 -07:00
Paul Wells 3980d049c9 close disconnected participants when signal channel fails (#1895)
* close disconnected participants when signal channel fails

* fix typefake

* update reason
2023-07-20 19:23:35 -07:00
Paul Wells 6ad1e1598d move signal server start to server start (#1894)
* move signal server start to server start

* fix test
2023-07-20 19:13:27 -07:00
kannonski cf4801064d changing key file permissions control (#1893) 2023-07-19 14:23:30 -07:00