If a function fails to execute, it is most likely due to one of two reasons:
(1) The function doesn't exist or can't be read from
(2) The function is dangerous and is restricted based on the user's permissions
Currently we return allocation failure, which is incorrect. This updates the
reason code to more accurately reflect why the request failed.
ASTERISK-24215
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@421311
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
if (args->variable[strlen(args->variable) - 1] == ')') {
if (ast_func_read2(channel, args->variable, &value, 0)) {
- ast_ari_response_alloc_failed(response);
+ ast_ari_response_error(
+ response, 500, "Unable to read provided function");
return;
}
} else {