]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_rtp_asterisk: Add support for sending NACK requests.
authorBen Ford <bford@digium.com>
Thu, 10 May 2018 18:11:06 +0000 (13:11 -0500)
committerBenjamin Keith Ford <bford@digium.com>
Wed, 18 Jul 2018 18:35:08 +0000 (13:35 -0500)
commit4048e251949802af8431c6f8b0747d77ea1309f0
tree4aaf06f80d5f7e1b15ca04422388bdf86ee01872
parentf75eb30da41efc06975c66514e0f018445567643
res_rtp_asterisk: Add support for sending NACK requests.

Support has been added for receiving a NACK request and handling it.
Now, Asterisk can detect when a NACK request should be sent and knows
how to construct one based on the packets we've received from the remote
end. A buffer has been added that will store out of order packets until
we receive the packet we are expecting. Then, these packets are handled
like normal and frames are queued to the core like normal. Asterisk
knows which packets to request in the NACK request using a vector
which stores the sequence numbers of the packets we are currently missing.

If a missing packet is received, cycle through the buffer until we reach
another packet we have not received yet. If the buffer reaches a certain
size, send a NACK request. If the buffer reaches its max size, queue all
frames to the core and wipe the buffer and vector.

According to RFC3711, the NACK request must be sent out in a compound
packet. All compound packets must start with a sender or receiver
report, so some work was done to refactor the current sender / receiver
code to allow it to be used without having to also include sdes
information and automatically send the report.

Also added additional functionality to ast_data_buffer, along with some
testing.

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

ASTERISK-27810 #close

Change-Id: Idab644b08a1593659c92cda64132ccc203fe991d
include/asterisk/data_buffer.h
main/data_buffer.c
res/res_rtp_asterisk.c
tests/test_data_buffer.c