From: Jaco Kroon Date: Mon, 11 Apr 2016 19:02:36 +0000 (+0200) Subject: chan_local: Fix hangupcauses not getting set on Local channels X-Git-Tag: 11.23.0-rc1~36^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fchanges%2F68%2F2568%2F2;p=thirdparty%2Fasterisk.git chan_local: Fix hangupcauses not getting set on Local channels ASTERISK-25912 #close Change-Id: I9ec0d40bd0e8ff16ba9c3cfc4c1b52cc575f421b --- diff --git a/channels/chan_local.c b/channels/chan_local.c index 562c181702..423ca4c29c 100644 --- a/channels/chan_local.c +++ b/channels/chan_local.c @@ -785,6 +785,13 @@ static int local_indicate(struct ast_channel *ast, int condition, const void *da ast_debug(4, "Blocked indication %d\n", condition); } ao2_unlock(p); + + /* + * we need to return -1 here so that asterisk core will correctly set up hangupcauses. + */ + if (condition == AST_CONTROL_PVT_CAUSE_CODE) { + res = -1; + } } ao2_ref(p, -1);