diff --git a/include/asterisk/rtp_engine.h b/include/asterisk/rtp_engine.h index c77be4584b7f8a40111f9ff1cce79dbb43c4b51a..3812cb159ed6c58142642a087cb3a77448c35665 100644 --- a/include/asterisk/rtp_engine.h +++ b/include/asterisk/rtp_engine.h @@ -122,6 +122,10 @@ enum ast_rtp_property { AST_RTP_PROPERTY_RTCP, /*! Enable Asymmetric RTP Codecs */ AST_RTP_PROPERTY_ASYMMETRIC_CODEC, + /*! Enable packet retransmission for received packets */ + AST_RTP_PROPERTY_RETRANS_RECV, + /*! Enable packet retransmission for sent packets */ + AST_RTP_PROPERTY_RETRANS_SEND, /*! * \brief Maximum number of RTP properties supported diff --git a/res/res_pjsip_sdp_rtp.c b/res/res_pjsip_sdp_rtp.c index ce8ed82dfe09ceee098e60c06ef3cd2fae52b9f7..9f0cdd300706ad0d3398975393fc919239800020 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));