diff options
author | Ivan Poddubny <ivan.poddubny@gmail.com> | 2017-12-16 14:51:16 +0100 |
---|---|---|
committer | Ivan Poddubny <ivan.poddubny@gmail.com> | 2017-12-19 18:17:52 +0100 |
commit | 3b99a0332cae6f82e1961750fce44b7f1ac09b3a (patch) | |
tree | 652e7246add58f7e25b98740721d39ed281f02b5 /main | |
parent | 08440fd1d97dd50784800db9a45f71eda9ce485d (diff) |
bridge: Stop music on hold on adding an arbitrary channel to a bridge
When a channel that is on hold gets added to a bridge by
the Bridge AMI action or the dialplan application of the same name,
music continues to play, causing "robotic sound".
This commit adds a call to ast_moh_stop to stop the music.
Also, it makes the AMI Park action use the right MOH class when the
channel gets parked.
Reported by: Zane Conkle
ASTERISK-25079 #close
Change-Id: I4b129c5a20c15e63968842460ac5a1a85903cf9f
Diffstat (limited to 'main')
-rw-r--r-- | main/bridge.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/main/bridge.c b/main/bridge.c index 5d9c0c1f7..7a937ea59 100644 --- a/main/bridge.c +++ b/main/bridge.c @@ -2511,6 +2511,8 @@ int ast_bridge_add_channel(struct ast_bridge *bridge, struct ast_channel *chan, RAII_VAR(struct ast_bridge *, chan_bridge, NULL, ao2_cleanup); RAII_VAR(struct ast_channel *, yanked_chan, NULL, ao2_cleanup); + ast_moh_stop(chan); + ast_channel_lock(chan); chan_bridge = ast_channel_get_bridge(chan); ast_channel_unlock(chan); |