85 if (recording ==
NULL) {
87 "Recording not found");
94 "Internal Server Error",
"Error building response");
121 "Recording not found");
128 "Format specified by recording not available or loaded");
133 if (response->
fd < 0) {
135 "Recording could not be opened");
158 if (src_recording ==
NULL) {
160 "Recording not found");
168 "A recording with the same name already exists on the system");
176 "Invalid destination recording name");
180 "Destination file path is forbidden");
193 "Internal Server Error",
198 "Unexpected error copying recording %s to %s: %s\n",
201 "Internal Server Error",
211 "Internal Server Error",
"Error building response");
228 if (recording ==
NULL) {
230 "Recording not found");
241 "Internal Server Error",
246 "Unexpected error deleting recording %s: %s\n",
249 "Internal Server Error",
267 if (recording ==
NULL) {
269 "Recording not found");
276 "Internal Server Error",
"Error building response");
291 if (recording ==
NULL) {
293 "Recording not found");
305 "Internal Server Error",
"Recording operation failed");
309 "Conflict",
"Recording not in session");
Stasis Application Recording API. See StasisApplication API" for detailed documentation.
struct ast_json * ast_json_ref(struct ast_json *value)
Increase refcount on value.
Asterisk main include file. File version handling, generic pbx functions.
const char * destination_recording_name
stasis_app_recording_media_operation
void ast_json_unref(struct ast_json *value)
Decrease refcount on value. If refcount reaches zero, value is freed.
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.
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.
Structure for variables, used for configurations and for channel variables.
static void control_recording(const char *name, enum stasis_app_recording_media_operation operation, struct ast_ari_response *response)
struct ast_json * stasis_app_stored_recording_to_json(struct stasis_app_stored_recording *recording)
Convert stored recording info to JSON.
int ast_str_append(struct ast_str **buf, ssize_t max_len, const char *fmt,...)
Append to a thread local dynamic string.
void ao2_iterator_destroy(struct ao2_iterator *iter)
Destroy a container iterator.
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
struct ao2_container * stasis_app_stored_recording_find_all(void)
Find all stored recordings on disk.
struct ast_json * ast_json_null(void)
Get the JSON null value.
struct ast_json * stasis_app_recording_to_json(const struct stasis_app_recording *recording)
Construct a JSON model of a recording.
const char * recording_name
static struct stasis_rest_handlers recordings
REST handler for /api-docs/recordings.json.
#define RAII_VAR(vartype, varname, initval, dtor)
Declare a variable that will call a destructor function when it goes out of scope.
const char * stasis_app_stored_recording_get_filename(struct stasis_app_stored_recording *recording)
Returns the full filename, with extension, for this recording.
void ast_ari_response_ok(struct ast_ari_response *response, struct ast_json *message)
Fill in an OK (200) ast_ari_response.
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.
describes a server instance
struct ast_json * ast_json_array_create(void)
Create a empty JSON array.
const char * stasis_app_stored_recording_get_extension(struct stasis_app_stored_recording *recording)
Returns the extension for this recording.
int ast_json_array_append(struct ast_json *array, struct ast_json *value)
Append to an array.
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.
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.
const char * recording_name
stasis_app_recording_oper_results
Possible results from a recording operation.
#define ao2_iterator_next(iter)
const char * recording_name
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.
int stasis_app_stored_recording_delete(struct stasis_app_stored_recording *recording)
Delete a recording from disk.
const char * recording_name
void ast_ari_response_no_content(struct ast_ari_response *response)
Fill in a No Content (204) ast_ari_response.
struct ast_format * ast_get_format_for_file_ext(const char *file_ext)
Get the ast_format associated with the given file extension.
struct ast_json * message
const char * recording_name
const char * recording_name
When we need to walk through a container, we use an ao2_iterator to keep track of the current positio...
Generated file - declares stubs to be implemented in res/ari/resource_recordings.c.
int stasis_app_stored_recording_copy(struct stasis_app_stored_recording *src_recording, const char *dst, struct stasis_app_stored_recording **dst_recording)
Copy a recording.
struct stasis_app_stored_recording * stasis_app_stored_recording_find_by_name(const char *name)
Creates a stored recording object, with the given name.
Abstract JSON element (object, array, string, int, ...).
struct stasis_app_recording * stasis_app_recording_find_by_name(const char *name)
Finds the recording object with the given name.
static snd_pcm_format_t format
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.
struct ao2_iterator ao2_iterator_init(struct ao2_container *c, int flags) attribute_warn_unused_result
Create an iterator for a container.
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.
enum stasis_app_recording_oper_results stasis_app_recording_operation(struct stasis_app_recording *recording, enum stasis_app_recording_media_operation operation)
Controls the media for a given recording operation.
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.
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
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.