On Mon, Nov 20, 2017 at 7:03 AM, Steve Davies <[email protected]> wrote:
> Hi, > > Perhaps the answer to this will be pointing me at some documentation - > That is fine, but I've failed to find it so far, so forgive me if the > following is a dumb question. > > With Asterisk-11 I added a built-in feature which allowed a very > customised version of stopping call recording on a bridge, playing back > different messages to each channel, and so forth based on some channel > variables, and depending whether the feature was enabled per channel. > > I want to port this to Asterisk-15, but am struggling to understand the > new bridge playback methods. I variously see > ast_bridge_channel_queue_playfile(), > ast_bridge_channel_write_playfile(), or even one followed by the other. > > What I'd like to do is queue playback message(s) to both halves of a > bridge simultaneously so that the bridge will resume once all messages on > both channels are complete. > > An a first read-through, I was fairly convinced that I would be able to > just call ast_bridge_channel_queue_playfile() as many times as needed on > both the bridge, and peer channels, and magic would happen, until I saw the > code in bridges/bridge_builtin_features.c: start_automixmonitor(), after > which I became most confused :) > > Help please? > Reaching across the bridge is not allowed. A channel in a bridge is not supposed to know who it is exchanging frames with because the channel could be exchanging frames with zero or more other channels at any given time. Over time, the participant channels in the bridge could change. Channels could be added, removed, or swapped with other channels in the bridge. ast_bridge_channel_queue_playfile() - This function queues the playfile onto the channel itself for the channel to play the file. ast_bridge_channel_write_playfile() - This function puts the playfile request into the bridge for the other channels in the bridge to play the file. The bridge handles distributing the request to all other channels in the bridge according to the bridge technology. More information can be found here [1]. Richard [1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+12+Bridging+Project
-- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-dev mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev
