aboutsummaryrefslogtreecommitdiffstats
path: root/main/manager.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/manager.c')
-rw-r--r--main/manager.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/main/manager.c b/main/manager.c
index 3906f8a05..5ab9148ba 100644
--- a/main/manager.c
+++ b/main/manager.c
@@ -2047,13 +2047,24 @@ static int action_redirect(struct mansession *s, const struct message *m)
ast_channel_unlock(chan2);
return 0;
}
+ if (chan->pbx) {
+ ast_channel_lock(chan);
+ ast_set_flag(chan, AST_FLAG_BRIDGE_HANGUP_DONT); /* don't let the after-bridge code run the h-exten */
+ ast_channel_unlock(chan);
+ }
res = ast_async_goto(chan, context, exten, pi);
if (!res) {
if (!ast_strlen_zero(name2)) {
- if (chan2)
+ if (chan2) {
+ if (chan2->pbx) {
+ ast_channel_lock(chan2);
+ ast_set_flag(chan2, AST_FLAG_BRIDGE_HANGUP_DONT); /* don't let the after-bridge code run the h-exten */
+ ast_channel_unlock(chan2);
+ }
res = ast_async_goto(chan2, context, exten, pi);
- else
+ } else {
res = -1;
+ }
if (!res)
astman_send_ack(s, m, "Dual Redirect successful");
else