]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
app_dial: Honor the 'c' flag when the calling party hangs up
authorJonathan Rose <jrose@digium.com>
Fri, 22 Feb 2013 15:41:31 +0000 (15:41 +0000)
committerJonathan Rose <jrose@digium.com>
Fri, 22 Feb 2013 15:41:31 +0000 (15:41 +0000)
Apparently this feature became broken in 11, probably as a result
of the Hangup Cause project.

(closes issue ASTERISK-21113)
Reprted by: Heiko Wundram
Patches:
app_dial.patch uploaded by Heiko Wundram (license 5822)

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

apps/app_dial.c

index b464c9d90218f8521c06573652bf87ddc8b509d2..0204fffb91cf801d6e2d728ee2bb51d6c336993c 100644 (file)
@@ -3094,7 +3094,7 @@ out:
        }
 
        ast_channel_early_bridge(chan, NULL);
-       hanguptree(&out_chans, NULL, ast_channel_hangupcause(chan)==AST_CAUSE_ANSWERED_ELSEWHERE ? 1 : 0 ); /* forward 'answered elsewhere' if we received it */
+       hanguptree(&out_chans, NULL, ast_channel_hangupcause(chan)==AST_CAUSE_ANSWERED_ELSEWHERE || ast_test_flag64(&opts, OPT_CANCEL_ELSEWHERE) ? 1 : 0 ); /* forward 'answered elsewhere' if we received it */
        pbx_builtin_setvar_helper(chan, "DIALSTATUS", pa.status);
        senddialendevent(chan, pa.status);
        ast_debug(1, "Exiting with DIALSTATUS=%s.\n", pa.status);