Merge "app_stasis: Don't hang up if app is not registered"

This commit is contained in:
zuul
2016-03-16 14:15:44 -05:00
committed by Gerrit Code Review

View File

@@ -110,10 +110,16 @@ static int app_exec(struct ast_channel *chan, const char *data)
args.app_argv); args.app_argv);
} }
if (ret == -1) { if (ret) {
pbx_builtin_setvar_helper(chan, "STASISSTATUS", "FAILED"); /* 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 { } else {
pbx_builtin_setvar_helper(chan, "STASISSTATUS", "SUCCESS"); pbx_builtin_setvar_helper(chan, "STASISSTATUS", "SUCCESS");
} }
return ret; return ret;