res_rtp_asterisk: Add support for receiving and handling NACK requests.

Adds the ability to receive and handle incoming NACK requests if
retransmissions are enabled. If retransmissions are enabled, a data
buffer is allocated that stores packets being sent. If a NACK request
is received, the packet requested for retransmission is sent if it is
still in the buffer. In the same request, if any of the following 16
packets are marked as not received, those will be sent as well if
available, as outlined in RFC4585.

Also changes RTCP RR and SR to use media source SSRC instead of packet
source SSRC when determining which instance to use for RTCP reports.

For more information, refer to the wiki page:
https://wiki.asterisk.org/wiki/display/AST/WebRTC+User+Experience+Improvements

ASTERISK-27806 #close

Change-Id: I7f7f124af3b9d5d2fd9cffc6ba8cb48a6fff06ec
This commit is contained in:
Ben Ford
2018-04-09 17:09:03 -05:00
committed by Benjamin Keith Ford
parent 38dae51b78
commit f5d5083ea7
3 changed files with 170 additions and 10 deletions

View File

@@ -1096,6 +1096,9 @@ static void add_rtcp_fb_to_stream(struct ast_sip_session *session,
attr = pjmedia_sdp_attr_create(pool, "rtcp-fb", pj_cstr(&stmp, "* goog-remb"));
pjmedia_sdp_attr_add(&media->attr_count, media->attr, attr);
attr = pjmedia_sdp_attr_create(pool, "rtcp-fb", pj_cstr(&stmp, "* nack"));
pjmedia_sdp_attr_add(&media->attr_count, media->attr, attr);
}
/*! \brief Function which negotiates an incoming media stream */