Skip to content

Fix AMR answer fmtp mismatch for octet-align offers (#747) - #768

Open
lixuanqun wants to merge 2 commits into
livekit:mainfrom
lixuanqun:cursor/fix-amr-fmtp-answer-33f3
Open

Fix AMR answer fmtp mismatch for octet-align offers (#747)#768
lixuanqun wants to merge 2 commits into
livekit:mainfrom
lixuanqun:cursor/fix-amr-fmtp-answer-33f3

Conversation

@lixuanqun

Copy link
Copy Markdown

media-sdk answers AMR/AMR-WB with rtpmap only, so an octet-aligned offer was accepted as bandwidth-efficient and produced garbled audio.

Before answering, strip AMR formats we cannot support (e.g. octet-align=1); when accepting bandwidth-efficient AMR, echo RFC 4867 required fmtp params.

media-sdk answers AMR/AMR-WB with rtpmap only, so an octet-aligned offer
was accepted as bandwidth-efficient and produced garbled audio.

Before answering, strip AMR formats we cannot support (e.g. octet-align=1);
when accepting bandwidth-efficient AMR, echo RFC 4867 required fmtp params.

Co-authored-by: li xuanqun <793005378@qq.com>
@lixuanqun
lixuanqun requested a review from a team as a code owner August 3, 2026 07:44
devin-ai-integration[bot]

This comment was marked as resolved.

@codecov

codecov Bot commented Aug 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 78.10651% with 37 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.31%. Comparing base (0460b40) to head (5780c6a).
⚠️ Report is 340 commits behind head on main.

Files with missing lines Patch % Lines
pkg/sip/sdp_amr.go 79.14% 19 Missing and 15 partials ⚠️
pkg/sip/media_port.go 50.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #768      +/-   ##
==========================================
+ Coverage   65.25%   66.31%   +1.06%     
==========================================
  Files          51       42       -9     
  Lines        6588     8114    +1526     
==========================================
+ Hits         4299     5381    +1082     
- Misses       1915     2234     +319     
- Partials      374      499     +125     

☔ 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.

If filterAMROfferSDP cannot parse or re-serialize the offer, fall back to
the original SDP and continue negotiation instead of aborting the call.

Co-authored-by: li xuanqun <793005378@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants