aboutsummaryrefslogtreecommitdiffstats
path: root/pbx.c
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-12-13 05:14:27 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-12-13 05:14:27 +0000
commite4745a4ceed440048e2433351e3d05f83766adf7 (patch)
tree7b5b093dce37cb1f974182baa1e5f869fcfbb486 /pbx.c
parentd1919e6492cb15c1cb5d6cac0bd50c5e82ac10f8 (diff)
ensure that hangups while incoming calls are in early state are handled properly (issue #5919)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@7451 f38db490-d61c-443f-a65b-d21fe96a405b
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;
}