Skip to content

Navigation Menu

Sign in
Sign up

fix: reject codec-changing re-INVITE with 488 - #767

Open
lixuanqun wants to merge 1 commit into
livekit:main from
lixuanqun:cursor/fix-reinvite-codec-mismatch-33f3
Open

fix: reject codec-changing re-INVITE with 488 #767
lixuanqun wants to merge 1 commit into
livekit:main from
lixuanqun:cursor/fix-reinvite-codec-mismatch-33f3

Conversation

@lixuanqun

@lixuanqun lixuanqun commented Aug 3, 2026

Copy link
Copy Markdown

When an in-dialog re-INVITE offers SDP that no longer includes the currently negotiated audio codec/payload type, answer 488 Not Acceptable Here and leave the RTP destination unchanged.

Previously LiveKit returned 200 OK with the cached local SDP, which could advertise a codec that was not in the offer (RFC 3264 §6.1) and leave the call with no usable media. Address-only re-INVITEs that keep the negotiated codec continue to update the RTP destination as before.

Adds inbound/outbound regression coverage for codec mismatch.

Fixes #766

When an in-dialog re-INVITE offers SDP that no longer includes the
currently negotiated audio codec/payload type, answer 488 Not Acceptable
Here and leave the RTP destination unchanged.
Previously LiveKit returned 200 OK with the cached local SDP, which could
advertise a codec that was not in the offer (RFC 3264 §6.1) and leave the
call with no usable media. Address-only re-INVITEs that keep the
negotiated codec continue to update the RTP destination as before.
Adds inbound/outbound regression coverage for codec mismatch.
Fixes livekit#766
Co-authored-by: li xuanqun <793005378@qq.com>
lixuanqun requested a review from a team as a code owner August 3, 2026 07:19

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

codecov Bot commented Aug 3, 2026
edited
Loading

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.18182% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.19%. Comparing base (0460b40) to head (7aeb455).
⚠️ Report is 370 commits behind head on main.

Files with missing lines Patch % Lines
pkg/sip/inbound.go 92.85% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@ Coverage Diff @@
## main #767 +/- ##
==========================================
+ Coverage 65.25% 66.19% +0.93% 
==========================================
 Files 51 41 -10 
 Lines 6588 7981 +1393 
==========================================
+ Hits 4299 5283 +984 
- Misses 1915 2214 +299 
- Partials 374 484 +110 

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@devin-ai-integration devin-ai-integration[bot] devin-ai-integration[bot] left review comments

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Codec-changing re-INVITE gets 200 OK with stale SDP

AltStyle によって変換されたページ (->オリジナル) /