1117 Commits

Author SHA1 Message Date
Haibo Chen
8a6c6de1db update name of participant (#1213) 2022-12-15 22:03:59 -08:00
Raja Subramanian
c9cc45c8b0 Move log to debug as warn does not show anything bad (#1230) 2022-12-16 10:32:50 +05:30
Raja Subramanian
dfc0411908 Reverting some dynacast logs to Debugw (#1229) 2022-12-15 12:32:07 +05:30
cnderrauber
090c35ddfd change no response sink to info and not return (#1228) 2022-12-14 11:22:23 +08:00
cnderrauber
da829fcf8e diable prflx over relay for firefox (#1226)
* Disable prflx over relay for firefox

* remove ice lite change

* solve comment

* disable prflx for publisher too
2022-12-13 14:32:05 +08:00
Raja Subramanian
80a4dc574a Fallback to participant key if base62 is not available (#1223) 2022-12-13 05:01:23 +05:30
David Zhao
5af442ac10 Enable item sampler for Room logger (#1222) 2022-12-10 20:07:16 -08:00
Raja Subramanian
b2df257ac6 base62 encode user provided name/identity. (#1220) 2022-12-10 13:02:31 +05:30
David Zhao
7a1273151f Update to new logging library, using sampling participant logger (#1219) 2022-12-09 00:09:03 -08:00
David Zhao
b1ba917a01 Validate keys to ensure sufficient security. (#1217)
JWT tokens are signed with HS256, and they must be 256 bits or longer to
guarantee security.
2022-12-07 22:25:28 -08:00
cnderrauber
eb134dc535 Close migration muted track which is not fired (#1215) 2022-12-07 13:53:37 +08:00
Raja Subramanian
6bd5504bff Add option to issue full reconnect on a publication error. (#1214)
* Add option to issue full reconnect on a publication error.

Leaving the publication error timeout at 30 seconds as there
are some publications taking long. Also, there are cases
where the peer connection fails after 30 seconds. The peer
connection failure happens after publication error is detected.
But, 30 seconds is a good amount of time for publication to establish.

* prevent recursive lock
2022-12-06 14:46:59 +05:30
cnderrauber
6f27d683a9 Don't output error log if upstream closed while binding (#1211) 2022-12-05 15:32:30 +08:00
David Zhao
e9abb47020 Added logging fields for Ingress & Egress services (#1205) 2022-12-04 21:44:16 -08:00
David Zhao
14de2bec9c Fixed single-node routing breakage. (#1209)
* Fixed single-node routing breakage.

Due to a regression of a previous change, Redis was always enabled even
when no configuration was provided.

* updated go modules
2022-12-04 16:23:35 -08:00
Raja Subramanian
2cad63fe9a Create response channel before sending StartSession (#1208) 2022-12-05 00:11:52 +05:30
David Zhao
12ae179be2 Configurable RoomService execution timeout (#1206)
* API execution timeout is now configurable

In certain environments, it can take longer than the default 2s to
fully execute API requests. Making execution timeout a configurable option.

* do not expose api to YAML. internal for now.
2022-12-04 10:13:09 -08:00
David Zhao
d146ec7a1f Improve logging messages with RoomService (#1203) 2022-11-30 22:17:28 -08:00
David Zhao
1ac6311849 Suppress a few additional Pion logs (#1199)
* Suppress a few additional Pion logs

* remove dupe
2022-11-30 13:32:46 -08:00
cnderrauber
3c907ed460 Add stats for data channel and signal (#1198)
* Add stats for data channel and signal

* Solve comment
2022-11-30 14:53:19 +08:00
Mathew Kamkar
caae389717 node type prometheus metric labels (#1197) 2022-11-29 20:36:35 -08:00
cnderrauber
711799ecf8 Encoding primary packet only if red encoding don't have enough space (#1196)
* Encoding primary packet only if red encoding don't have enough space

* clean code
2022-11-28 13:58:01 +08:00
cnderrauber
aaeb3c933c Fix rtcp lost for downtrack used incorrect buffer factory (#1195)
* Fix rtcp lost for downtrack used incorrect buffer factory

In buffer factory change(#1173), every pariticipant has its own
buffer factory, can't use publisher's bufferfactory to create
DownTrack

* clean code
2022-11-28 13:04:56 +08:00
Raja Subramanian
086009f05a Do not forward media till peer connection is connected. (#1194)
There were some failures with missing media. The only thing I could
see between working and non-working case is when media forwarding
starts. So, delay media forwarding till peer connection is connected.

Also, add a subscribe op only if a subscribe/unsubscribe queuing is
successful. There was a recent change to not queue a subscribe when
the participant is closed/disconnected. This got the subscribe op
counter out of whack.
2022-11-26 21:42:19 +05:30
Raja Subramanian
55718724a9 Check forwarder started when seeing. (#1191)
When switching from local -> remote or remote -> local,
the forwarder state is cached and restored after the switch
to ensure continuity in sequence number /time stamp.
But, if the forwarder had not started before the switch,
the sequence number always starts at 1 because of seeding.
So, do not see unless forwarder was started before the switch.
2022-11-26 01:05:29 +05:30
Raja Subramanian
0256e071ad Promote dyancast logs for debugging (#1190) 2022-11-25 10:16:30 +05:30
cnderrauber
c28b07fd11 set stereo max bitrates to 510000 (#1188) 2022-11-24 22:51:15 +08:00
Raja Subramanian
3074cb862f Force 'allowed; even on subscription.' (#1187)
Also not holding lock while resolving by sid. Not pretty.
But, we should deprecate SID based permissions.

Also, wire changes, possibly due to redis cluster PR?
2022-11-23 14:13:20 +05:30
cnderrauber
6711060cdb Add enable loopback candidate option (#1185) 2022-11-23 16:01:36 +08:00
Raja Subramanian
491a15e49e Prevent subscription after participant close. (#1182) 2022-11-23 09:10:44 +05:30
Tom Xiong
e5dabd466e Support redis cluster mode (#1181)
* use redisConfig of protocol instead of redisConfig and use redis of protocol to create redis client to support redis cluster mode too
2022-11-22 10:36:43 -08:00
David Zhao
b118ba917c Set forceRelay to unset by default (#1184)
Setting it to `DISABLED` could cause clients to override user preference to use relay.
2022-11-22 10:07:56 -08:00
Raja Subramanian
aba18accd9 Prevent rtx buffer and forwarding path colliding (#1174)
* Prevent rtx buffer and forwarding path colliding

Received packets are put into RTX buffer which is
a circular buffer and the packet (sequence number) is
queued for forwarding. If the RTX buffer fills up
and cycles before forwarding happens, forwarding
would pick the wrong packet (as it is holding a
reference to a byte slice in the RTX buffer) to forward.

Prevent it by moving reading from RTX buffer just
before forwarding. Adds an extra copy from RTX buffer
-> temp buffer for forwarding, but ensures that forwarding
buffer is not used by another go routine.

* Revert some changes from previous commit

Details:
- Do all forward processing as before.
- One difference is not load raw packet into ExtPacket.
- Load raw packet into provided buffer when module that reads
using ReadExtended calls that function. If the packet is
not there in the retransmission buffer, that packet will be
dropped. This is the case we are trying to fix, i. e. the RTX
buffer has cycled before ReadExtended could pull the packet.
This makes a copy into the provided buffer so that the data
does not change underneath.

* Remove debug comment

* Oops missed a function call
2022-11-19 13:19:49 +05:30
cnderrauber
a52a295cf3 Fix potential ssrc collision between participants (#1173) 2022-11-18 10:39:17 +08:00
Raja Subramanian
fd1cc36bdc Force full reconnect when there is no previous answer during migration. (#1168) 2022-11-17 10:17:56 +05:30
Mathew Kamkar
8c8a4d245c command to show help with hidden generated flags (#1171) 2022-11-16 19:20:22 -08:00
Benjamin Pracht
2c2c6f9da2 Do not append the stream key to the ingress URL for rtmp (#1167) 2022-11-15 09:19:25 -08:00
cnderrauber
a72cbea352 fix memory leak on long run room/participant (#1169)
* Fix memory leak

* update pion

* clean code
2022-11-15 19:34:39 +08:00
Raja Subramanian
bea1c77d05 Lmit failed send to specific error type (#1164) 2022-11-15 08:02:11 +05:30
Raja Subramanian
9f4e7ee4bd Check for ignored with fully formatted log message (#1163) 2022-11-14 11:16:01 +05:30
Raja Subramanian
379301c0bc A few more log tweaks (#1159) 2022-11-11 13:44:14 +05:30
Raja Subramanian
fe0502c886 Demote some stable logs to Debugw (#1158)
* Demote some stable logs to Debugw

* Add 'discard message from' to ignore list
2022-11-11 10:17:47 +05:30
David Zhao
e2d775588f Confirm room creation prior to returning from CreateRoom (#1157) 2022-11-09 23:47:41 -08:00
David Zhao
e5d21cb1d9 CreateRoom API to actually create the room on an RTC node (#1155)
Previously, CreateRoom only created the room in storage, but did not
hydrate it on an RTC node. This has caused strange behaviors such as
emptyTimeout not working correctly (#1109).

Also reduced room reap worker to consistently reap rooms. Fixes #241
2022-11-09 23:35:35 -08:00
MaxnSter
7e89ad3fbd RedisStore: make UnlockRoom atomic (#1044)
Co-authored-by: David Zhao <dz@livekit.io>
2022-11-07 23:04:46 -08:00
Benjamin Pracht
c735668f67 Use the redis.UniversalClient interface instead of *redis.Client when interacting with go-redis (#1149)
* Use the redis.UniversalClient interface instead of *redis.Client when interacting with go-redis

* Update protocol to v1.2.1
2022-11-07 17:27:28 -08:00
cnderrauber
5a8a6d11b2 Set track level codec settings for all pending tracks (#1148) 2022-11-07 17:45:23 +08:00
cnderrauber
0310aa9250 Make sure client get participant info before track fired (#1147) 2022-11-07 14:50:45 +08:00
cnderrauber
34fd1a02e3 revert canclose method of red receivers (#1142) 2022-11-03 15:30:04 +08:00
Raja Subramanian
4d480fc05b Avoid divide-by-zero (#1141) 2022-11-02 22:38:18 +05:30