summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzuul <zuul@gerrit.asterisk.org>2016-03-16 14:15:44 -0500
committerGerrit Code Review <gerrit2@gerrit.digium.api>2016-03-16 14:15:45 -0500
commit20d67cc6f5e792581455e49dbe87f8cf68a16755 (patch)
tree1e1783d3140f281d68e80b546c4a203ef65992c9
parent3fa60762151ba6cd711424f6dcaf172e75c3f4d1 (diff)
parent7964e260d364dd0bf57677e418de67b46fae1700 (diff)
Merge "app_stasis: Don't hang up if app is not registered"
-rw-r--r--apps/app_stasis.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/apps/app_stasis.c b/apps/app_stasis.c
index aa77a0d3c..ffe472779 100644
--- a/apps/app_stasis.c
+++ b/apps/app_stasis.c
@@ -110,10 +110,16 @@ static int app_exec(struct ast_channel *chan, const char *data)
args.app_argv);
}
- if (ret == -1) {
- pbx_builtin_setvar_helper(chan, "STASISSTATUS", "FAILED");
+ if (ret) {
+ /* set ret to 0 so pbx_core doesnt hangup the channel */
+ if (!ast_check_hangup(chan)) {
+ ret = 0;
+ } else {
+ ret = -1;
+ }
+ pbx_builtin_setvar_helper(chan, "STASISSTATUS", "FAILED");
} else {
- pbx_builtin_setvar_helper(chan, "STASISSTATUS", "SUCCESS");
+ pbx_builtin_setvar_helper(chan, "STASISSTATUS", "SUCCESS");
}
return ret;