res_pjsip_sdp_rtp: Only enable abs-send-time when WebRTC is enabled.
authorJoshua Colp <jcolp@digium.com>
Mon, 7 Jan 2019 14:06:37 +0000 (14:06 +0000)
committerJoshua C. Colp <jcolp@digium.com>
Mon, 7 Jan 2019 15:35:18 +0000 (10:35 -0500)
For video streams it was possible for the abs-send-time information
to be placed into RTP streams even if not negotiated. Depending on
the endpoint in use this could cause video to not flow.

We now only enable abs-send-time for negotiation if WebRTC is enabled.

ASTERISK-28230

Change-Id: I0eb682302f8da3a4ea3c42e839208d55f825ed0c

res/res_pjsip_sdp_rtp.c

index 2889615..c18627e 100644 (file)
@@ -272,7 +272,9 @@ static int create_rtp(struct ast_sip_session *session, struct ast_sip_session_me
                ast_rtp_instance_set_prop(session_media->rtp, AST_RTP_PROPERTY_RETRANS_RECV, session->endpoint->media.webrtc);
                ast_rtp_instance_set_prop(session_media->rtp, AST_RTP_PROPERTY_RETRANS_SEND, session->endpoint->media.webrtc);
                ast_rtp_instance_set_prop(session_media->rtp, AST_RTP_PROPERTY_REMB, session->endpoint->media.webrtc);
-               enable_rtp_extension(session, session_media, AST_RTP_EXTENSION_ABS_SEND_TIME, AST_RTP_EXTENSION_DIRECTION_SENDRECV, sdp);
+               if (session->endpoint->media.webrtc) {
+                       enable_rtp_extension(session, session_media, AST_RTP_EXTENSION_ABS_SEND_TIME, AST_RTP_EXTENSION_DIRECTION_SENDRECV, sdp);
+               }
                if (session->endpoint->media.tos_video || session->endpoint->media.cos_video) {
                        ast_rtp_instance_set_qos(session_media->rtp, session->endpoint->media.tos_video,
                                        session->endpoint->media.cos_video, "SIP RTP Video");