aboutsummaryrefslogtreecommitdiffstats
path: root/pbx.c
diff options
context:
space:
mode:
Diffstat (limited to 'pbx.c')
-rw-r--r--pbx.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/pbx.c b/pbx.c
index 5a95e9a05..7f5fef1ee 100644
--- a/pbx.c
+++ b/pbx.c
@@ -5513,6 +5513,8 @@ static int pbx_builtin_setamaflags(struct ast_channel *chan, void *data)
static int pbx_builtin_hangup(struct ast_channel *chan, void *data)
{
/* Just return non-zero and it will hang up */
+ if (!chan->hangupcause)
+ chan->hangupcause = AST_CAUSE_NORMAL_CLEARING;
return -1;
}