]> git.ipfire.org Git - thirdparty/asterisk.git/commit
bridge: Add a deferred queue.
authorJoshua Colp <jcolp@digium.com>
Thu, 8 Jun 2017 19:38:51 +0000 (19:38 +0000)
committerJoshua Colp <jcolp@digium.com>
Tue, 13 Jun 2017 22:05:28 +0000 (22:05 +0000)
commite414833f6e77345f4969116972e9cf1ad9b595fd
tree04132d145ffbf5116b2a08a73115bbd87d9ece4c
parent85dff8e26ee9bbe3ce781eefb9b1037e1fb9217a
bridge: Add a deferred queue.

This change adds a deferred queue to bridging. If a bridge
technology determines that a frame can not be written and
should be deferred it can indicate back to bridging to do so.
Bridging will then requeue any deferred frames upon a new
channel joining the bridge.

This change has been leveraged for T.38 request negotiate
control frames. Without the deferred queue there is a race
condition between the bridge receiving the T.38 request
negotiate and the second channel joining and being in the
bridge. If the channel is not yet in the bridge then the T.38
negotiation fails.

A unit test has also been added that confirms that a T.38
request negotiate control frame is deferred when no other
channel is in the bridge and that it is requeued when a new
channel joins the bridge.

ASTERISK-26923

Change-Id: Ie05b08523f399eae579130f4a5f562a344d2e415
bridges/bridge_native_rtp.c
bridges/bridge_simple.c
include/asterisk/bridge_channel.h
include/asterisk/bridge_channel_internal.h
include/asterisk/bridge_technology.h
main/bridge.c
main/bridge_channel.c
tests/test_bridging.c [new file with mode: 0644]