diff options
author | Joshua Colp <jcolp@digium.com> | 2017-06-08 19:38:51 +0000 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2017-06-13 22:05:28 +0000 |
commit | e414833f6e77345f4969116972e9cf1ad9b595fd (patch) | |
tree | 04132d145ffbf5116b2a08a73115bbd87d9ece4c /include/asterisk/bridge_channel.h | |
parent | 85dff8e26ee9bbe3ce781eefb9b1037e1fb9217a (diff) |
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
Diffstat (limited to 'include/asterisk/bridge_channel.h')
-rw-r--r-- | include/asterisk/bridge_channel.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/asterisk/bridge_channel.h b/include/asterisk/bridge_channel.h index 55c2b3a76..a16695e07 100644 --- a/include/asterisk/bridge_channel.h +++ b/include/asterisk/bridge_channel.h @@ -145,6 +145,8 @@ struct ast_bridge_channel { AST_LIST_ENTRY(ast_bridge_channel) entry; /*! Queue of outgoing frames to the channel. */ AST_LIST_HEAD_NOLOCK(, ast_frame) wr_queue; + /*! Queue of deferred frames, queued onto channel when other party joins. */ + AST_LIST_HEAD_NOLOCK(, ast_frame) deferred_queue; /*! Pipe to alert thread when frames are put into the wr_queue. */ int alert_pipe[2]; /*! |