From: Richard Mudgett Date: Wed, 29 Aug 2012 18:24:54 +0000 (+0000) Subject: Fix hangup cause passthrough regression. X-Git-Tag: 10.9.0-rc1~44 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aa7825958c47f1cbadf54d9cf875a6ed53ef083f;p=thirdparty%2Fasterisk.git Fix hangup cause passthrough regression. The v1.8 -r369258 change to fix the F and F(x) action logic introduced a regression in passing the hangup cause from the called channel to the caller channel. (closes issue ASTERISK-20287) Reported by: Konstantin Suvorov Patches: app_dial_hangupcause.patch (license #6421) patch uploaded by Konstantin Suvorov (modified) Tested by: rmudgett ........ Merged revisions 371860 from http://svn.asterisk.org/svn/asterisk/branches/1.8 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@371861 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_dial.c b/apps/app_dial.c index 2b0e2065cc..c3573f907d 100644 --- a/apps/app_dial.c +++ b/apps/app_dial.c @@ -2994,9 +2994,9 @@ static int dial_exec_full(struct ast_channel *chan, const char *data, struct ast /* The peer is now running its own PBX. */ goto out; } - } else { - chan->hangupcause = peer->hangupcause; } + } else if (!ast_check_hangup(chan)) { + chan->hangupcause = peer->hangupcause; } ast_hangup(peer); }