48 #if defined(AST_DEVMODE) 67 #if defined(AST_DEVMODE) 73 #if defined(AST_DEVMODE) 85 if (200 <= code && code <= 299) {
89 ast_log(
LOG_ERROR,
"Invalid error response %d for /recordings/stored\n", code);
97 "Internal Server Error",
"Response validation failed");
101 fin: __attribute__((unused))
118 #if defined(AST_DEVMODE) 123 for (i = path_vars; i; i = i->
next) {
124 if (strcmp(i->
name,
"recordingName") == 0) {
130 #if defined(AST_DEVMODE) 143 if (200 <= code && code <= 299) {
147 ast_log(
LOG_ERROR,
"Invalid error response %d for /recordings/stored/{recordingName}\n", code);
153 ast_log(
LOG_ERROR,
"Response validation failed for /recordings/stored/{recordingName}\n");
155 "Internal Server Error",
"Response validation failed");
159 fin: __attribute__((unused))
176 #if defined(AST_DEVMODE) 181 for (i = path_vars; i; i = i->
next) {
182 if (strcmp(i->
name,
"recordingName") == 0) {
188 #if defined(AST_DEVMODE) 201 if (200 <= code && code <= 299) {
205 ast_log(
LOG_ERROR,
"Invalid error response %d for /recordings/stored/{recordingName}\n", code);
211 ast_log(
LOG_ERROR,
"Response validation failed for /recordings/stored/{recordingName}\n");
213 "Internal Server Error",
"Response validation failed");
217 fin: __attribute__((unused))
234 #if defined(AST_DEVMODE) 239 for (i = path_vars; i; i = i->
next) {
240 if (strcmp(i->
name,
"recordingName") == 0) {
246 #if defined(AST_DEVMODE) 260 if (200 <= code && code <= 299) {
264 ast_log(
LOG_ERROR,
"Invalid error response %d for /recordings/stored/{recordingName}/file\n", code);
270 ast_log(
LOG_ERROR,
"Response validation failed for /recordings/stored/{recordingName}/file\n");
272 "Internal Server Error",
"Response validation failed");
276 fin: __attribute__((unused))
306 #if defined(AST_DEVMODE) 311 for (i = get_params; i; i = i->
next) {
312 if (strcmp(i->
name,
"destinationRecordingName") == 0) {
317 for (i = path_vars; i; i = i->
next) {
318 if (strcmp(i->
name,
"recordingName") == 0) {
328 #if defined(AST_DEVMODE) 342 if (200 <= code && code <= 299) {
346 ast_log(
LOG_ERROR,
"Invalid error response %d for /recordings/stored/{recordingName}/copy\n", code);
352 ast_log(
LOG_ERROR,
"Response validation failed for /recordings/stored/{recordingName}/copy\n");
354 "Internal Server Error",
"Response validation failed");
358 fin: __attribute__((unused))
375 #if defined(AST_DEVMODE) 380 for (i = path_vars; i; i = i->
next) {
381 if (strcmp(i->
name,
"recordingName") == 0) {
387 #if defined(AST_DEVMODE) 400 if (200 <= code && code <= 299) {
404 ast_log(
LOG_ERROR,
"Invalid error response %d for /recordings/live/{recordingName}\n", code);
410 ast_log(
LOG_ERROR,
"Response validation failed for /recordings/live/{recordingName}\n");
412 "Internal Server Error",
"Response validation failed");
416 fin: __attribute__((unused))
433 #if defined(AST_DEVMODE) 438 for (i = path_vars; i; i = i->
next) {
439 if (strcmp(i->
name,
"recordingName") == 0) {
445 #if defined(AST_DEVMODE) 458 if (200 <= code && code <= 299) {
462 ast_log(
LOG_ERROR,
"Invalid error response %d for /recordings/live/{recordingName}\n", code);
468 ast_log(
LOG_ERROR,
"Response validation failed for /recordings/live/{recordingName}\n");
470 "Internal Server Error",
"Response validation failed");
474 fin: __attribute__((unused))
491 #if defined(AST_DEVMODE) 496 for (i = path_vars; i; i = i->
next) {
497 if (strcmp(i->
name,
"recordingName") == 0) {
503 #if defined(AST_DEVMODE) 516 if (200 <= code && code <= 299) {
520 ast_log(
LOG_ERROR,
"Invalid error response %d for /recordings/live/{recordingName}/stop\n", code);
526 ast_log(
LOG_ERROR,
"Response validation failed for /recordings/live/{recordingName}/stop\n");
528 "Internal Server Error",
"Response validation failed");
532 fin: __attribute__((unused))
549 #if defined(AST_DEVMODE) 554 for (i = path_vars; i; i = i->
next) {
555 if (strcmp(i->
name,
"recordingName") == 0) {
561 #if defined(AST_DEVMODE) 575 if (200 <= code && code <= 299) {
579 ast_log(
LOG_ERROR,
"Invalid error response %d for /recordings/live/{recordingName}/pause\n", code);
585 ast_log(
LOG_ERROR,
"Response validation failed for /recordings/live/{recordingName}/pause\n");
587 "Internal Server Error",
"Response validation failed");
591 fin: __attribute__((unused))
608 #if defined(AST_DEVMODE) 613 for (i = path_vars; i; i = i->
next) {
614 if (strcmp(i->
name,
"recordingName") == 0) {
620 #if defined(AST_DEVMODE) 634 if (200 <= code && code <= 299) {
638 ast_log(
LOG_ERROR,
"Invalid error response %d for /recordings/live/{recordingName}/pause\n", code);
644 ast_log(
LOG_ERROR,
"Response validation failed for /recordings/live/{recordingName}/pause\n");
646 "Internal Server Error",
"Response validation failed");
650 fin: __attribute__((unused))
667 #if defined(AST_DEVMODE) 672 for (i = path_vars; i; i = i->
next) {
673 if (strcmp(i->
name,
"recordingName") == 0) {
679 #if defined(AST_DEVMODE) 693 if (200 <= code && code <= 299) {
697 ast_log(
LOG_ERROR,
"Invalid error response %d for /recordings/live/{recordingName}/mute\n", code);
703 ast_log(
LOG_ERROR,
"Response validation failed for /recordings/live/{recordingName}/mute\n");
705 "Internal Server Error",
"Response validation failed");
709 fin: __attribute__((unused))
726 #if defined(AST_DEVMODE) 731 for (i = path_vars; i; i = i->
next) {
732 if (strcmp(i->
name,
"recordingName") == 0) {
738 #if defined(AST_DEVMODE) 752 if (200 <= code && code <= 299) {
756 ast_log(
LOG_ERROR,
"Invalid error response %d for /recordings/live/{recordingName}/mute\n", code);
762 ast_log(
LOG_ERROR,
"Response validation failed for /recordings/live/{recordingName}/mute\n");
764 "Internal Server Error",
"Response validation failed");
768 fin: __attribute__((unused))
891 .requires =
"res_ari,res_ari_model,res_stasis,res_stasis_recording",
struct ast_variable * next
Asterisk main include file. File version handling, generic pbx functions.
const char * destination_recording_name
static struct stasis_rest_handlers recordings_live
REST handler for /api-docs/recordings.json.
const char * recording_name
void ast_ari_recordings_copy_stored(struct ast_variable *headers, struct ast_ari_recordings_copy_stored_args *args, struct ast_ari_response *response)
Copy a stored recording.
static int unload_module(void)
void ast_ari_recordings_pause(struct ast_variable *headers, struct ast_ari_recordings_pause_args *args, struct ast_ari_response *response)
Pause a live recording.
static void ast_ari_recordings_get_live_cb(struct ast_tcptls_session_instance *ser, struct ast_variable *get_params, struct ast_variable *path_vars, struct ast_variable *headers, struct ast_json *body, struct ast_ari_response *response)
Parameter parsing callback for /recordings/live/{recordingName}.
Structure for variables, used for configurations and for channel variables.
static void ast_ari_recordings_get_stored_cb(struct ast_tcptls_session_instance *ser, struct ast_variable *get_params, struct ast_variable *path_vars, struct ast_variable *headers, struct ast_json *body, struct ast_ari_response *response)
Parameter parsing callback for /recordings/stored/{recordingName}.
static void ast_ari_recordings_list_stored_cb(struct ast_tcptls_session_instance *ser, struct ast_variable *get_params, struct ast_variable *path_vars, struct ast_variable *headers, struct ast_json *body, struct ast_ari_response *response)
Parameter parsing callback for /recordings/stored.
static struct stasis_rest_handlers recordings_live_recordingName
REST handler for /api-docs/recordings.json.
static void ast_ari_recordings_delete_stored_cb(struct ast_tcptls_session_instance *ser, struct ast_variable *get_params, struct ast_variable *path_vars, struct ast_variable *headers, struct ast_json *body, struct ast_ari_response *response)
Parameter parsing callback for /recordings/stored/{recordingName}.
Generated file - Build validators for ARI model objects.
void ast_ari_response_alloc_failed(struct ast_ari_response *response)
Fill in response with a 500 message for allocation failures.
const char * recording_name
int ast_ari_validate_void(struct ast_json *json)
Validator for native Swagger void.
static struct stasis_rest_handlers recordings_stored_recordingName_file
REST handler for /api-docs/recordings.json.
const char * recording_name
static void ast_ari_recordings_stop_cb(struct ast_tcptls_session_instance *ser, struct ast_variable *get_params, struct ast_variable *path_vars, struct ast_variable *headers, struct ast_json *body, struct ast_ari_response *response)
Parameter parsing callback for /recordings/live/{recordingName}/stop.
static struct stasis_rest_handlers recordings_live_recordingName_stop
REST handler for /api-docs/recordings.json.
static struct stasis_rest_handlers recordings
REST handler for /api-docs/recordings.json.
static struct stasis_rest_handlers recordings_stored_recordingName_copy
REST handler for /api-docs/recordings.json.
const char * ast_json_string_get(const struct ast_json *string)
Get the value of a JSON string.
void ast_ari_recordings_stop(struct ast_variable *headers, struct ast_ari_recordings_stop_args *args, struct ast_ari_response *response)
Stop a live recording and store it.
static void ast_ari_recordings_copy_stored_cb(struct ast_tcptls_session_instance *ser, struct ast_variable *get_params, struct ast_variable *path_vars, struct ast_variable *headers, struct ast_json *body, struct ast_ari_response *response)
Parameter parsing callback for /recordings/stored/{recordingName}/copy.
describes a server instance
void ast_ari_recordings_unmute(struct ast_variable *headers, struct ast_ari_recordings_unmute_args *args, struct ast_ari_response *response)
Unmute a live recording.
const char * recording_name
void ast_ari_recordings_delete_stored(struct ast_variable *headers, struct ast_ari_recordings_delete_stored_args *args, struct ast_ari_response *response)
Delete a stored recording.
static void ast_ari_recordings_mute_cb(struct ast_tcptls_session_instance *ser, struct ast_variable *get_params, struct ast_variable *path_vars, struct ast_variable *headers, struct ast_json *body, struct ast_ari_response *response)
Parameter parsing callback for /recordings/live/{recordingName}/mute.
static struct stasis_rest_handlers recordings_stored
REST handler for /api-docs/recordings.json.
void ast_ari_recordings_list_stored(struct ast_variable *headers, struct ast_ari_recordings_list_stored_args *args, struct ast_ari_response *response)
List recordings that are complete.
void ast_ari_recordings_get_stored(struct ast_variable *headers, struct ast_ari_recordings_get_stored_args *args, struct ast_ari_response *response)
Get a stored recording's details.
int ast_ari_add_handler(struct stasis_rest_handlers *handler)
const char * recording_name
static struct stasis_rest_handlers recordings_live_recordingName_pause
REST handler for /api-docs/recordings.json.
const char * recording_name
int ast_ari_remove_handler(struct stasis_rest_handlers *handler)
const char * recording_name
void ast_ari_response_error(struct ast_ari_response *response, int response_code, const char *response_text, const char *message_fmt,...)
Fill in an error ast_ari_response.
static struct stasis_rest_handlers recordings_live_recordingName_mute
REST handler for /api-docs/recordings.json.
Module has failed to load, may be in an inconsistent state.
const char * recording_name
ari_validator ast_ari_validate_stored_recording_fn(void)
Function pointer to ast_ari_validate_stored_recording().
int ast_ari_validate_live_recording(struct ast_json *json)
Validator for LiveRecording.
struct ast_json * message
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_GLOBAL_SYMBOLS|AST_MODFLAG_LOAD_ORDER, "HTTP Phone Provisioning",.support_level=AST_MODULE_SUPPORT_EXTENDED,.load=load_module,.unload=unload_module,.reload=reload,.load_pri=AST_MODPRI_CHANNEL_DEPEND,.requires="http",)
const char * recording_name
static void ast_ari_recordings_cancel_cb(struct ast_tcptls_session_instance *ser, struct ast_variable *get_params, struct ast_variable *path_vars, struct ast_variable *headers, struct ast_json *body, struct ast_ari_response *response)
Parameter parsing callback for /recordings/live/{recordingName}.
static void ast_ari_recordings_unpause_cb(struct ast_tcptls_session_instance *ser, struct ast_variable *get_params, struct ast_variable *path_vars, struct ast_variable *headers, struct ast_json *body, struct ast_ari_response *response)
Parameter parsing callback for /recordings/live/{recordingName}/pause.
const char * path_segment
const char * recording_name
static void ast_ari_recordings_get_stored_file_cb(struct ast_tcptls_session_instance *ser, struct ast_variable *get_params, struct ast_variable *path_vars, struct ast_variable *headers, struct ast_json *body, struct ast_ari_response *response)
Parameter parsing callback for /recordings/stored/{recordingName}/file.
static void ast_ari_recordings_unmute_cb(struct ast_tcptls_session_instance *ser, struct ast_variable *get_params, struct ast_variable *path_vars, struct ast_variable *headers, struct ast_json *body, struct ast_ari_response *response)
Parameter parsing callback for /recordings/live/{recordingName}/mute.
struct ast_json * ast_json_object_get(struct ast_json *object, const char *key)
Get a field from a JSON object.
Generated file - declares stubs to be implemented in res/ari/resource_recordings.c.
Abstract JSON element (object, array, string, int, ...).
int ast_ari_recordings_copy_stored_parse_body(struct ast_json *body, struct ast_ari_recordings_copy_stored_args *args)
Body parsing function for /recordings/stored/{recordingName}/copy.
Stasis Application API. See Stasis Application API for detailed documentation.
int ast_ari_validate_list(struct ast_json *json, int(*fn)(struct ast_json *))
Validator for a Swagger List[]/JSON array.
#define ASTERISK_GPL_KEY
The text the key() function should return.
Asterisk module definitions.
Application convenience functions, designed to give consistent look and feel to Asterisk apps...
void ast_ari_recordings_mute(struct ast_variable *headers, struct ast_ari_recordings_mute_args *args, struct ast_ari_response *response)
Mute a live recording.
static struct stasis_rest_handlers recordings_stored_recordingName
REST handler for /api-docs/recordings.json.
void ast_ari_recordings_get_live(struct ast_variable *headers, struct ast_ari_recordings_get_live_args *args, struct ast_ari_response *response)
List live recordings.
static void ast_ari_recordings_pause_cb(struct ast_tcptls_session_instance *ser, struct ast_variable *get_params, struct ast_variable *path_vars, struct ast_variable *headers, struct ast_json *body, struct ast_ari_response *response)
Parameter parsing callback for /recordings/live/{recordingName}/pause.
void ast_ari_recordings_cancel(struct ast_variable *headers, struct ast_ari_recordings_cancel_args *args, struct ast_ari_response *response)
Stop a live recording and discard it.
Handler for a single RESTful path segment.
static int load_module(void)
void ast_ari_recordings_unpause(struct ast_variable *headers, struct ast_ari_recordings_unpause_args *args, struct ast_ari_response *response)
Unpause a live recording.
const char * recording_name
int ast_ari_validate_stored_recording(struct ast_json *json)
Validator for StoredRecording.
void ast_ari_recordings_get_stored_file(struct ast_tcptls_session_instance *ser, struct ast_variable *headers, struct ast_ari_recordings_get_stored_file_args *args, struct ast_ari_response *response)
Get the file associated with the stored recording.