summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzuul <zuul@gerrit.asterisk.org>2016-03-16 14:15:42 -0500
committerGerrit Code Review <gerrit2@gerrit.digium.api>2016-03-16 14:15:42 -0500
commitc9cd4b9aa7c3fcb3cefc2d879fd59ba5207cb510 (patch)
treefc64ae8b36320919c627846c45377a3947bb7344
parent739c28357e609a1893ba72d1c9c6544afa31e200 (diff)
parentd2c09ed73b8f22ef4d3432b1cec8030628ed71a6 (diff)
Merge "app_stasis: Don't hang up if app is not registered" into 13
-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 4f53aff78..1e5b5673c 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;