diff options
author | Andrew Nagy <andrew.nagy@the159.com> | 2016-03-15 11:31:19 -0700 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2016-03-16 11:17:54 -0500 |
commit | d2c09ed73b8f22ef4d3432b1cec8030628ed71a6 (patch) | |
tree | 10368d2df13198cd871ec66897960c5d625f3e0c /apps/app_stasis.c | |
parent | dcebcaa3da6efb4b09e1522c06baad3f901a7d77 (diff) |
app_stasis: Don't hang up if app is not registered
This prevents pbx_core from hanging up the channel if the app isn't
registered.
ASTERISK-25846 #close
Change-Id: I63216a61f30706d5362bc0906b50b6f0544aebce
Diffstat (limited to 'apps/app_stasis.c')
-rw-r--r-- | apps/app_stasis.c | 12 |
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; |