镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

res_rtp_asterisk.c: Relearn Strict RTP after ICE source change - #2183

Open
seifzadeh wants to merge 1 commit into
asterisk:masterfrom
seifzadeh:master-issue-1955
Open

seifzadeh wants to merge 1 commit into
asterisk:masterfrom
seifzadeh:master-issue-1955

Conversation

@seifzadeh

@seifzadeh seifzadeh commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

When ICE moves media to another valid candidate pair, Strict RTP can
remain locked to the previous source and drop media from the new path.

Restart Strict RTP learning when PJPROJECT accepts RTP from a different
source after Strict RTP has closed.

Assisted-by: OpenAI ChatGPT

Resolves: #1955

UserNote: Strict RTP now handles media moving between valid ICE paths.

@seifzadeh

Copy link
Copy Markdown
Contributor Author

cherry-pick-to: 24
cherry-pick-to: 23
cherry-pick-to: 22
cherry-pick-to: 20

@github-actions github-actions 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.

Pull Request Checklist Complete

@github-actions github-actions Bot added the has-pr-checklist A PR Checklist is present on the PR label Sep 25, 2026
@github-actions

Copy link
Copy Markdown

Workflow Check completed successfully

@github-actions

Copy link
Copy Markdown

Workflow Check completed successfully

Comment thread res/res_rtp_asterisk.c Outdated
}

/*
* PJPROJECT only invokes the receive-data callback for application data

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is incorrect. We explicitly disabled such pjnath functionality because it conflicted with our own functionality and caused issues. Any sender would get through here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

thanks, i try to fix this report

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I updated the PR based on your feedback and tested it. Thanks.

When ICE moves media to another valid candidate pair, Strict RTP can
remain locked to the previous source and drop media from the new path.

Restart Strict RTP learning when PJPROJECT accepts RTP from a different
source after Strict RTP has closed.

Assisted-by: OpenAI ChatGPT

Resolves: asterisk#1955

UserNote: Strict RTP now handles media moving between valid ICE paths.
@github-actions

Copy link
Copy Markdown

Workflow Check completed successfully

Comment thread res/res_rtp_asterisk.c

if (transport_rtp->ice && transport_rtp->ice_media_started
&& transport_rtp->ice_active_remote_candidates
&& read_area == transport_rtp->rawdata + AST_FRIENDLY_OFFSET) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Add a comment here to explain that the read_area check is to do with the buffering

Comment thread res/res_rtp_asterisk.c
if (candidate) {
/* Tentatively pass this packet to SRTP authentication.
* The Strict RTP lock changes only after unprotect succeeds.
*/

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think this deserves a debug message

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[improvement]: Strict RTP drops valid WebRTC RTP after mid-call ICE candidate switch to TURN relay

2 participants