summaryrefslogtreecommitdiff
path: root/main/core_unreal.c
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2015-07-22 09:46:29 -0500
committerMark Michelson <mmichelson@digium.com>2015-07-22 09:55:58 -0500
commit0b7148e262c729f9cf07f140c27f04e647b80ef2 (patch)
treeb19a0425d736e1fdfae84067791259b7515c8fb0 /main/core_unreal.c
parent3143bb2e8846242607294048d29e1ded70172b04 (diff)
Local channels: Do not block control -1 payloads.
Control frames with a -1 payload are used as a special signal to stop playtones generators on channels. This indication is sent both by app_dial as well as by ast_answer() when a call is answered in case any tones were being generated on a calling channel. This control frame type was made to stop traversing local channel pairs as an optimization, because it was thought that it was unnecessary to send these indications, and allowing such unnecessary control frames to traverse the local channels would cause the local channels to optimize away less quickly. As it turns out, through some special magic dialplan code, it is possible to have a tones being played on a non-local channel, and it is important for the local channel to convey that the tones should be stopped. The result of having tones continue to be played on the non-local channel is that the tones play even once the channel has been bridged. By not blocking the -1 control frame type, we can ensure that this situation does not happen. ASTERISK-25250 #close Reported by Etienne Lessard Change-Id: I0bcaac3d70b619afdbd0ca8a8dd708f33fd2f815
Diffstat (limited to 'main/core_unreal.c')
-rw-r--r--main/core_unreal.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/main/core_unreal.c b/main/core_unreal.c
index 55b4ea368..411cc5123 100644
--- a/main/core_unreal.c
+++ b/main/core_unreal.c
@@ -409,12 +409,7 @@ static int unreal_queue_indicate(struct ast_unreal_pvt *p, struct ast_channel *a
int isoutbound;
ao2_lock(p);
- /*
- * Block -1 stop tones events if we are to be optimized out. We
- * don't need a flurry of these events on an unreal channel chain
- * when initially connected to slow the optimization process.
- */
- if (0 <= condition || ast_test_flag(p, AST_UNREAL_NO_OPTIMIZATION)) {
+ if (ast_test_flag(p, AST_UNREAL_NO_OPTIMIZATION)) {
struct ast_frame f = {
.frametype = AST_FRAME_CONTROL,
.subclass.integer = condition,