]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
If the "h" extension fails, give it another chance in main/pbx.c.
authorTilghman Lesher <tilghman@meg.abyt.es>
Fri, 19 Jun 2009 00:35:18 +0000 (00:35 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Fri, 19 Jun 2009 00:35:18 +0000 (00:35 +0000)
If the "h" extension fails, give it another chance in main/pbx.c, when it
returns from the bridge code.  Fixes an issue where the "h" extension may
occasionally not fire, when a Dial is executed from a Macro.
Debugged in #asterisk with user tompaw.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@201827 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/features.c

index 57fc12c0cd75f5c2045b5b38d47e4dea32d253d4..b4bc91646a611b35f4dfed0bff699255f398e90e 100644 (file)
@@ -2758,7 +2758,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) {