[asterisk-dev] [Code Review] 3997: bridge_native_rtp: Fix odd audio issues when transitioning from native remote RTP bridge to softmix
Matt Jordan
reviewboard at asterisk.org
Mon Oct 13 12:32:50 CDT 2014
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3997/
-----------------------------------------------------------
(Updated Oct. 13, 2014, 12:32 p.m.)
Review request for Asterisk Developers.
Changes
-------
Update the patch to include changes from https://reviewboard.asterisk.org/r/4057/
This patch is now mostly just renaming of bridge_channel variables to be prefixed with a 'b'. The only real meat of the patch that is left is removal of the ast_channel_is_leaving_bridge checks done in the bridge stop callback. These were originally put in to prevent sending direct media re-INVITEs when a channel was going to be hung up; however, they actually interfere with legitimate direct media re-INVITEs when a smart bridge operation occurs, and neither party is leaving the bridging system.
Bugs: ASTERISK-24327
https://issues.asterisk.org/jira/browse/ASTERISK-24327
Repository: Asterisk
Description
-------
When a native RTP bridge that is remotely bridging its participants switches to a softmix bridge, it may not properly re-INVITE the media for one or both participants back to Asterisk. This is due to two factors:
(1) The current bridge_native_rtp code only re-INVITEs if it believes the channel will survive the bridge operation. Currently, that code is failing, as it expects the channels to have a soft hangup flag set on it indicating that a redirect has occurred or that the channel is going to leave the bridge. (The code did not take into account a smart bridge operation).
(2) When the bridge layer performs a smart bridge, it passes a dummy bridge down into the old mixing technology when it is stopped. That breaks the native RTP bridge, as it looks to bridge->channels to know which channels to re-INVITE back. That list has no entries, as the dummy bridge does not populate that value.
This patch modifies bridge_native_rtp such that it keeps track of the channels itself. Given how tricky this code is - both smart bridging and native RTP bridging - this keeps the mixing technology insulated from changes in the core, which is probably a good thing.
Diffs (updated)
-----
/branches/12/bridges/bridge_native_rtp.c 425404
Diff: https://reviewboard.asterisk.org/r/3997/diff/
Testing
-------
The tests that extercised this code the most are the PJSIP blind transfer tests, as they change the bridge mixing technology from native_rtp to simple and back in various tests. Shocking the callee_with_hold/caller_with_hold tests worked right off the bat. The direct media tests still fail, but this is not surprising as the messages from Asterisk arrive interleaved, which is not something SIPp handles well (at all).
Thanks,
Matt Jordan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20141013/fd2765ab/attachment.html>
More information about the asterisk-dev
mailing list