aboutsummaryrefslogtreecommitdiffstats
path: root/pbx.c
diff options
context:
space:
mode:
Diffstat (limited to 'pbx.c')
-rwxr-xr-xpbx.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/pbx.c b/pbx.c
index 98e1ade6a..cda3dd035 100755
--- a/pbx.c
+++ b/pbx.c
@@ -862,6 +862,9 @@ static void pbx_substitute_variables_temp(struct ast_channel *c,const char *var,
} else if (c && !strcmp(var, "UNIQUEID")) {
snprintf(workspace, workspacelen -1, "%s", c->uniqueid);
*ret = workspace;
+ } else if (c && !strcmp(var, "HANGUPCAUSE")) {
+ snprintf(workspace, workspacelen -1, "%i", c->hangupcause);
+ *ret = workspace;
} else {
if (c) {
AST_LIST_TRAVERSE(headp,variables,entries) {