This prevents pbx_core from hanging up the channel if the app isn't
registered.
ASTERISK-25846 #close
Change-Id: I63216a61f30706d5362bc0906b50b6f0544aebce
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;