Updating a SIP dispatch rule or inbound trunk to new trunks or numbers skips the conflict check
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- go
- Lĩnh vực
- audio-video-rtc, backend
Hướng nghiên cứu
Start in the update handlers for SIP dispatch rules and inbound trunks, comparing them with the conflict check in the create path for CreateSIPDispatchRule. The bug is that the filter runs on the stored copy, not the updated object, so the conflict check misses the new trunk IDs or numbers. Pull request #4978 is already open against this, so check it before starting. Done means an update that would conflict returns InvalidArgument and leaves the stored rule unchanged.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
CreateSIPDispatchRule rejects a dispatch rule that conflicts with an existing rule for the same trunk, numbers, and PIN. UpdateSIPDispatchRule accepts the same conflict when the update changes the rule's trunk IDs. UpdateSIPInboundTrunk has the same gap when the update changes the trunk's numbers.
The update handlers list stored objects filtered by the new trunk IDs or numbers, and then swap in the updated object for its stored copy. The stored copy still has the old values, so the filter drops it, and the updated object is never validated.
To reproduce
- Create dispatch rule A with
trunk_ids: ["ST_2"]and a direct rule to rooma. - Create dispatch rule B with
trunk_ids: ["ST_1"]and a direct rule to roomb. - Call
UpdateSIPDispatchRulefor B withupdate.trunk_ids.set: ["ST_2"].
The update succeeds. Creating B with trunk_ids: ["ST_2"] in step 2 fails with Dispatch rule for the same trunk, inbound number, number, and PIN combination already exists.
After the update, inbound calls on ST_2 fail to match a dispatch rule, because MatchDispatchRuleIter reports the conflict at call time.
Expected behavior
The update returns InvalidArgument with the same conflict error as creation, and the stored rule is unchanged.
Server
- Version: current
master
- Ngôn ngữ chính
- Go
- Star
- 21.3k
- Fork
- 2.4k
- Merge trung bình
- 17 giờ 59 phút
- Pull request đã merge (30 ngày)
- 74
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của livekit/livekit
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 44/100
livekit/livekit#4982 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 12/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Abandoned pending tracks are never released, so long-lived participants permanently hit too many pending tracksCó thể đã có người làm @kevin-pan-skydio đã nhận 3 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 22/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
livekit/livekit#4959 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
livekit/livekit#4932 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của livekit/livekit
Issue tương tự
-
[docs] `/docs/identity-security/usage/alerts/`: docs reference a date that has already passedĐang mởdocumentation
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
gravitational/teleport#69869 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
cli: cav scene save treats unknown flags before path (e.g. --timeout) as the output filenameĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 63/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100