From 3db1df301e5c91af1db474a35ee885c0e879bc1c Mon Sep 17 00:00:00 2001 From: Sean Bright Date: Tue, 11 Dec 2018 15:49:03 -0500 Subject: [PATCH] bridge_builtin_features.c: Set auto(mix)mon variables on both channels This is how features behaved up through Asterisk 11, but was changed when the new bridging framework was implemented in Asterisk 12. Reported by rrittgarn in #asterisk. Change-Id: I72cf86223947a8118c75f46e2c603dbc11e3125b --- CHANGES | 13 +++++++++++++ bridges/bridge_builtin_features.c | 2 ++ 2 files changed, 15 insertions(+) diff --git a/CHANGES b/CHANGES index 5a68001525..c9b8f5fb4b 100644 --- a/CHANGES +++ b/CHANGES @@ -71,6 +71,19 @@ Bridging ast_bridge_snapshot_update structure as it's data. It contains the last snapshot and the new one. +Features +------------------ + * Before Asterisk 12, when using the automon or automixmon features defined + in features.conf, a channel variable (TOUCH_MIXMONITOR_OUTPUT) was set on + both channels, indicating the filename of the recording. + + When bridging was overhauled in Asterisk 12, the behavior was changed such + that the variable was only set on the peer channel and not on the channel + that initiated the automon or automixmon. + + The previous behavior has been restored so both channels receive the + channel variable when one of these features is invoked. + ------------------------------------------------------------------------------ --- Functionality changes from Asterisk 16.0.0 to Asterisk 16.1.0 ------------ ------------------------------------------------------------------------------ diff --git a/bridges/bridge_builtin_features.c b/bridges/bridge_builtin_features.c index e9efb916cc..671cfb9385 100644 --- a/bridges/bridge_builtin_features.c +++ b/bridges/bridge_builtin_features.c @@ -213,6 +213,7 @@ static void start_automonitor(struct ast_bridge_channel *bridge_channel, struct ast_bridge_channel_write_playfile(bridge_channel, NULL, start_message, NULL); } + pbx_builtin_setvar_helper(bridge_channel->chan, "TOUCH_MONITOR_OUTPUT", touch_filename); pbx_builtin_setvar_helper(peer_chan, "TOUCH_MONITOR_OUTPUT", touch_filename); } @@ -400,6 +401,7 @@ static void start_automixmonitor(struct ast_bridge_channel *bridge_channel, stru ast_bridge_channel_write_playfile(bridge_channel, NULL, start_message, NULL); } + pbx_builtin_setvar_helper(bridge_channel->chan, "TOUCH_MIXMONITOR_OUTPUT", touch_filename); pbx_builtin_setvar_helper(peer_chan, "TOUCH_MIXMONITOR_OUTPUT", touch_filename); } -- 2.47.2