struct ast_format_cap *request_cap;
struct ast_channel *originator;
- if (!ast_strlen_zero(args->originator) && !ast_strlen_zero(args->formats)) {
- ast_ari_response_error(response, 400, "Bad Request",
- "Originator and formats can't both be specified");
- return;
- }
-
- if (ast_strlen_zero(args->endpoint)) {
- ast_ari_response_error(response, 400, "Bad Request",
- "Endpoint must be specified");
- return;
- }
-
/* Parse any query parameters out of the body parameter */
if (args->variables) {
struct ast_json *json_variables;
}
}
+ if (!ast_strlen_zero(args->originator) && !ast_strlen_zero(args->formats)) {
+ ast_ari_response_error(response, 400, "Bad Request",
+ "Originator and formats can't both be specified");
+ return;
+ }
+
+ if (ast_strlen_zero(args->endpoint)) {
+ ast_ari_response_error(response, 400, "Bad Request",
+ "Endpoint must be specified");
+ return;
+ }
+
chan_data = ast_calloc(1, sizeof(*chan_data));
if (!chan_data) {
ast_ari_response_alloc_failed(response);