diff --git a/main/features.c b/main/features.c index a01f33afe1..084d101291 100644 --- a/main/features.c +++ b/main/features.c @@ -2795,7 +2795,9 @@ int ast_bridge_call(struct ast_channel *chan,struct ast_channel *peer,struct ast bridge_cdr = NULL; } } - ast_set_flag(chan, AST_FLAG_BRIDGE_HANGUP_RUN); + if (chan->priority != 1 || !spawn_error) { + ast_set_flag(chan, AST_FLAG_BRIDGE_HANGUP_RUN); + } ast_channel_unlock(chan); /* protect the lastapp/lastdata against the effects of the hangup/dialplan code */ if (bridge_cdr) {