From 0be1c388e47ebb82d9b97eff45224c242ba4718e Mon Sep 17 00:00:00 2001 From: Ben Ford Date: Thu, 22 Feb 2018 14:27:26 -0600 Subject: Add extended properties to rtp_engine for RTP retransmission support. A couple of additional properties are needed in rtp_engine to enable support for packet retransmission: AST_RTP_PROPERTY_RETRANS_RECV and AST_RTP_PROPERTY_RETRANS_SEND. These will both be enabled automatically if an endpoint has the webrtc option enabled. While this adds no functionality currently, it will serve as a building block for future changes for RTP retransmission support. For more information, refer to the wiki page: https://wiki.asterisk.org/wiki/display/AST/WebRTC+User+Experience+Improvements Change-Id: Ic598acd042a045f9d10e5bdccb66f4efc9e587cc --- res/res_pjsip_sdp_rtp.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'res/res_pjsip_sdp_rtp.c') diff --git a/res/res_pjsip_sdp_rtp.c b/res/res_pjsip_sdp_rtp.c index ce8ed82df..9f0cdd300 100644 --- a/res/res_pjsip_sdp_rtp.c +++ b/res/res_pjsip_sdp_rtp.c @@ -219,10 +219,13 @@ static int create_rtp(struct ast_sip_session *session, struct ast_sip_session_me (session->endpoint->media.tos_audio || session->endpoint->media.cos_audio)) { ast_rtp_instance_set_qos(session_media->rtp, session->endpoint->media.tos_audio, session->endpoint->media.cos_audio, "SIP RTP Audio"); - } else if (session_media->type == AST_MEDIA_TYPE_VIDEO && - (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"); + } else if (session_media->type == AST_MEDIA_TYPE_VIDEO) { + 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); + 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"); + } } ast_rtp_instance_set_last_rx(session_media->rtp, time(NULL)); -- cgit v1.2.3