Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Updating a SIP dispatch rule or inbound trunk to new trunks or numbers skips the conflict check

Đang mở
#4,977 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@RaphaelFakhri đang làm issue này rồi.

Từ ngày 10/10/2026.

  • #4978 của @RaphaelFakhri — đang mở

Đá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

  1. Create dispatch rule A with trunk_ids: ["ST_2"] and a direct rule to room a.
  2. Create dispatch rule B with trunk_ids: ["ST_1"] and a direct rule to room b.
  3. Call UpdateSIPDispatchRule for B with update.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

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của livekit/livekit

Tất cả issue của livekit/livekit

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.