]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
chan_pjsip: Disable SSRC change for WebRTC endpoints.
authorGeorge Joseph <gjoseph@sangoma.com>
Tue, 21 Oct 2025 15:34:23 +0000 (09:34 -0600)
committergithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Mon, 27 Oct 2025 17:41:18 +0000 (17:41 +0000)
Commit b333ee3b introduced a fix to chan_pjsip that addressed RTP issues with
blind transfers and some SBCs.  Unfortunately, the fix broke some WebRTC
clients that are sensitive to SSRC changes and non-monotonic timestamps so
the fix is now disabled for endpoints with the "bundle" parameter set to true.

Resolves: #1535

channels/chan_pjsip.c

index ae3f58a9b02e54635cb57f7711d95a7511dd18c6..f44c51edaea90a4570227cce93637ce3ee7e8f58 100644 (file)
@@ -1820,12 +1820,14 @@ static int chan_pjsip_indicate(struct ast_channel *ast, int condition, const voi
        case AST_CONTROL_SRCUPDATE:
                break;
        case AST_CONTROL_SRCCHANGE:
-               /* Generate a new SSRC due to media source change and RTP timestamp reset.
-                  Ensures RFC 3550 compliance and avoids SBC interoperability issues (Sonus/Ribbon)*/
-               for (i = 0; i < AST_VECTOR_SIZE(&channel->session->active_media_state->sessions); ++i) {
-                       media = AST_VECTOR_GET(&channel->session->active_media_state->sessions, i);
-                       if (media && media->rtp) {
-                               ast_rtp_instance_change_source(media->rtp);
+               if (!channel->session->endpoint->media.bundle) {
+                       /* Generate a new SSRC due to media source change and RTP timestamp reset.
+                          Ensures RFC 3550 compliance and avoids SBC interoperability issues (Sonus/Ribbon)*/
+                       for (i = 0; i < AST_VECTOR_SIZE(&channel->session->active_media_state->sessions); ++i) {
+                               media = AST_VECTOR_GET(&channel->session->active_media_state->sessions, i);
+                               if (media && media->rtp) {
+                                       ast_rtp_instance_change_source(media->rtp);
+                               }
                        }
                }
                break;