[Home]

Summary:ASTERISK-25240: bridge_native_rtp: Direct media wrongfully started when completing attended transfer
Reporter:Joshua C. Colp (jcolp)Labels:
Date Opened:2015-07-09 09:12:15Date Closed:2015-07-10 09:30:14
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Bridges/bridge_native_rtp
Versions:13.4.0 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:The bridge_native_rtp module adds a frame hook to channels which are in a native RTP bridge. This frame hook is used to intercept when a hold or unhold frame traverses the bridge so native RTP can be stopped or started as appropriate. This is expected but exposes a specific bug when attended transfers are involved.

Upon completion of an attended transfer an unhold frame is queued up to take one of the channels involved off hold. After this is done the channel is moved between bridges.

When the frame hook is involved in this case for the unhold it releases the channel lock and acquires the bridge lock. This allows the bridge core to step in and move the channel (potentially changing the bridging techology) from another thread. Once completed the bridge lock is released by the bridge core. The frame hook is then able to acquire the bridge lock and wrongfully starts native RTP again, despite the channel no longer being in the bridge or needing to start native RTP. In fact at this point the frame hook is no longer attached to the channel.

This results in a weird audio path as one channel may be directly sending media to another place while the other is sending through Asterisk.
Comments: