diff --git a/res/ari/resource_channels.c b/res/ari/resource_channels.c index 0ac53dd730..112607db6b 100644 --- a/res/ari/resource_channels.c +++ b/res/ari/resource_channels.c @@ -964,7 +964,9 @@ void ast_ari_channels_get_channel_var(struct ast_variable *headers, 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, "Error With Function", + "Unable to read provided function"); return; } } else {