]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
chan_local: Fix hangupcauses not getting set on Local channels 68/2568/2
authorJaco Kroon <jaco@uls.co.za>
Mon, 11 Apr 2016 19:02:36 +0000 (21:02 +0200)
committerRichard Mudgett <rmudgett@digium.com>
Mon, 11 Apr 2016 19:49:44 +0000 (14:49 -0500)
ASTERISK-25912 #close

Change-Id: I9ec0d40bd0e8ff16ba9c3cfc4c1b52cc575f421b

channels/chan_local.c

index 562c181702b366bf97c1a705d7698d84b8c2a8ed..423ca4c29c68bbd7938af3ee2161f955f270f16b 100644 (file)
@@ -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);