Asterisk - The Open Source Telephony Project
18.5.0
|
Recording resources. More...
#include "asterisk.h"
#include "asterisk/app.h"
#include "asterisk/module.h"
#include "asterisk/stasis_app.h"
#include "ari/resource_recordings.h"
#include "ari/ari_model_validators.h"
Go to the source code of this file.
Macros | |
#define | MAX_VALS 128 |
Functions | |
static void | __reg_module (void) |
static void | __unreg_module (void) |
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}. More... | |
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. More... | |
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. More... | |
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}. More... | |
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}. More... | |
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}. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
struct ast_module * | AST_MODULE_SELF_SYM (void) |
static int | load_module (void) |
static int | unload_module (void) |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_DEFAULT , .description = "RESTful API module - Recording resources" , .key = "This paragraph is copyright (c) 2006 by Digium, Inc. \In order for your module to load, it must return this \key via a function called \"key\". Any code which \includes this paragraph must be licensed under the GNU \General Public License version 2 or later (at your \option). In addition to Digium's general reservations \of rights, Digium expressly reserves the right to \allow other parties to license this paragraph under \different terms. Any use of Digium, Inc. trademarks or \logos (including \"Asterisk\" or \"Digium\") without \express written permission of Digium, Inc. is prohibited.\n" , .buildopt_sum = "30ef0c93b36035ec78c9cfd712d36d9b" , .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, .requires = "res_ari,res_ari_model,res_stasis,res_stasis_recording", } |
static const struct ast_module_info * | ast_module_info = &__mod_info |
static struct stasis_rest_handlers | recordings |
REST handler for /api-docs/recordings.json. More... | |
static struct stasis_rest_handlers | recordings_live |
REST handler for /api-docs/recordings.json. More... | |
static struct stasis_rest_handlers | recordings_live_recordingName |
REST handler for /api-docs/recordings.json. More... | |
static struct stasis_rest_handlers | recordings_live_recordingName_mute |
REST handler for /api-docs/recordings.json. More... | |
static struct stasis_rest_handlers | recordings_live_recordingName_pause |
REST handler for /api-docs/recordings.json. More... | |
static struct stasis_rest_handlers | recordings_live_recordingName_stop |
REST handler for /api-docs/recordings.json. More... | |
static struct stasis_rest_handlers | recordings_stored |
REST handler for /api-docs/recordings.json. More... | |
static struct stasis_rest_handlers | recordings_stored_recordingName |
REST handler for /api-docs/recordings.json. More... | |
static struct stasis_rest_handlers | recordings_stored_recordingName_copy |
REST handler for /api-docs/recordings.json. More... | |
static struct stasis_rest_handlers | recordings_stored_recordingName_file |
REST handler for /api-docs/recordings.json. More... | |
Recording resources.
Definition in file res_ari_recordings.c.
#define MAX_VALS 128 |
Definition at line 52 of file res_ari_recordings.c.
|
static |
Definition at line 892 of file res_ari_recordings.c.
|
static |
Definition at line 892 of file res_ari_recordings.c.
|
static |
Parameter parsing callback for /recordings/live/{recordingName}.
get_params | GET parameters in the HTTP request. | |
path_vars | Path variables extracted from the request. | |
headers | HTTP headers. | |
[out] | response | Response to the HTTP request. |
Definition at line 426 of file res_ari_recordings.c.
References ast_ari_recordings_cancel(), ast_ari_response_error(), ast_ari_validate_void(), ast_log, LOG_ERROR, ast_ari_response::message, ast_variable::name, ast_variable::next, NULL, ast_ari_recordings_cancel_args::recording_name, ast_ari_response::response_code, and ast_variable::value.
|
static |
Parameter parsing callback for /recordings/stored/{recordingName}/copy.
get_params | GET parameters in the HTTP request. | |
path_vars | Path variables extracted from the request. | |
headers | HTTP headers. | |
[out] | response | Response to the HTTP request. |
Definition at line 299 of file res_ari_recordings.c.
References ast_ari_recordings_copy_stored(), ast_ari_recordings_copy_stored_parse_body(), ast_ari_response_alloc_failed(), ast_ari_response_error(), ast_ari_validate_stored_recording(), ast_log, ast_ari_recordings_copy_stored_args::destination_recording_name, LOG_ERROR, ast_ari_response::message, ast_variable::name, ast_variable::next, NULL, ast_ari_recordings_copy_stored_args::recording_name, ast_ari_response::response_code, and ast_variable::value.
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.
body | The JSON body from which to parse parameters. | |
[out] | args | The args structure to parse into. |
zero | on success |
non-zero | on failure |
Definition at line 279 of file res_ari_recordings.c.
References ast_json_object_get(), ast_json_string_get(), and ast_ari_recordings_copy_stored_args::destination_recording_name.
Referenced by ast_ari_recordings_copy_stored_cb().
|
static |
Parameter parsing callback for /recordings/stored/{recordingName}.
get_params | GET parameters in the HTTP request. | |
path_vars | Path variables extracted from the request. | |
headers | HTTP headers. | |
[out] | response | Response to the HTTP request. |
Definition at line 169 of file res_ari_recordings.c.
References ast_ari_recordings_delete_stored(), ast_ari_response_error(), ast_ari_validate_void(), ast_log, LOG_ERROR, ast_ari_response::message, ast_variable::name, ast_variable::next, NULL, ast_ari_recordings_delete_stored_args::recording_name, ast_ari_response::response_code, and ast_variable::value.
|
static |
Parameter parsing callback for /recordings/live/{recordingName}.
get_params | GET parameters in the HTTP request. | |
path_vars | Path variables extracted from the request. | |
headers | HTTP headers. | |
[out] | response | Response to the HTTP request. |
Definition at line 368 of file res_ari_recordings.c.
References ast_ari_recordings_get_live(), ast_ari_response_error(), ast_ari_validate_live_recording(), ast_log, LOG_ERROR, ast_ari_response::message, ast_variable::name, ast_variable::next, NULL, ast_ari_recordings_get_live_args::recording_name, ast_ari_response::response_code, and ast_variable::value.
|
static |
Parameter parsing callback for /recordings/stored/{recordingName}.
get_params | GET parameters in the HTTP request. | |
path_vars | Path variables extracted from the request. | |
headers | HTTP headers. | |
[out] | response | Response to the HTTP request. |
Definition at line 111 of file res_ari_recordings.c.
References ast_ari_recordings_get_stored(), ast_ari_response_error(), ast_ari_validate_stored_recording(), ast_log, LOG_ERROR, ast_ari_response::message, ast_variable::name, ast_variable::next, NULL, ast_ari_recordings_get_stored_args::recording_name, ast_ari_response::response_code, and ast_variable::value.
|
static |
Parameter parsing callback for /recordings/stored/{recordingName}/file.
get_params | GET parameters in the HTTP request. | |
path_vars | Path variables extracted from the request. | |
headers | HTTP headers. | |
[out] | response | Response to the HTTP request. |
Definition at line 227 of file res_ari_recordings.c.
References ast_ari_recordings_get_stored_file(), ast_ari_response_error(), ast_log, LOG_ERROR, ast_ari_response::message, ast_variable::name, ast_variable::next, NULL, ast_ari_recordings_get_stored_file_args::recording_name, ast_ari_response::response_code, and ast_variable::value.
|
static |
Parameter parsing callback for /recordings/stored.
get_params | GET parameters in the HTTP request. | |
path_vars | Path variables extracted from the request. | |
headers | HTTP headers. | |
[out] | response | Response to the HTTP request. |
Definition at line 61 of file res_ari_recordings.c.
References ast_ari_recordings_list_stored(), ast_ari_response_error(), ast_ari_validate_list(), ast_ari_validate_stored_recording_fn(), ast_log, LOG_ERROR, ast_ari_response::message, NULL, and ast_ari_response::response_code.
|
static |
Parameter parsing callback for /recordings/live/{recordingName}/mute.
get_params | GET parameters in the HTTP request. | |
path_vars | Path variables extracted from the request. | |
headers | HTTP headers. | |
[out] | response | Response to the HTTP request. |
Definition at line 660 of file res_ari_recordings.c.
References ast_ari_recordings_mute(), ast_ari_response_error(), ast_ari_validate_void(), ast_log, LOG_ERROR, ast_ari_response::message, ast_variable::name, ast_variable::next, NULL, ast_ari_recordings_mute_args::recording_name, ast_ari_response::response_code, and ast_variable::value.
|
static |
Parameter parsing callback for /recordings/live/{recordingName}/pause.
get_params | GET parameters in the HTTP request. | |
path_vars | Path variables extracted from the request. | |
headers | HTTP headers. | |
[out] | response | Response to the HTTP request. |
Definition at line 542 of file res_ari_recordings.c.
References ast_ari_recordings_pause(), ast_ari_response_error(), ast_ari_validate_void(), ast_log, LOG_ERROR, ast_ari_response::message, ast_variable::name, ast_variable::next, NULL, ast_ari_recordings_pause_args::recording_name, ast_ari_response::response_code, and ast_variable::value.
|
static |
Parameter parsing callback for /recordings/live/{recordingName}/stop.
get_params | GET parameters in the HTTP request. | |
path_vars | Path variables extracted from the request. | |
headers | HTTP headers. | |
[out] | response | Response to the HTTP request. |
Definition at line 484 of file res_ari_recordings.c.
References ast_ari_recordings_stop(), ast_ari_response_error(), ast_ari_validate_void(), ast_log, LOG_ERROR, ast_ari_response::message, ast_variable::name, ast_variable::next, NULL, ast_ari_recordings_stop_args::recording_name, ast_ari_response::response_code, and ast_variable::value.
|
static |
Parameter parsing callback for /recordings/live/{recordingName}/mute.
get_params | GET parameters in the HTTP request. | |
path_vars | Path variables extracted from the request. | |
headers | HTTP headers. | |
[out] | response | Response to the HTTP request. |
Definition at line 719 of file res_ari_recordings.c.
References ast_ari_recordings_unmute(), ast_ari_response_error(), ast_ari_validate_void(), ast_log, LOG_ERROR, ast_ari_response::message, ast_variable::name, ast_variable::next, NULL, ast_ari_recordings_unmute_args::recording_name, ast_ari_response::response_code, and ast_variable::value.
|
static |
Parameter parsing callback for /recordings/live/{recordingName}/pause.
get_params | GET parameters in the HTTP request. | |
path_vars | Path variables extracted from the request. | |
headers | HTTP headers. | |
[out] | response | Response to the HTTP request. |
Definition at line 601 of file res_ari_recordings.c.
References ast_ari_recordings_unpause(), ast_ari_response_error(), ast_ari_validate_void(), ast_log, LOG_ERROR, ast_ari_response::message, ast_variable::name, ast_variable::next, NULL, ast_ari_recordings_unpause_args::recording_name, ast_ari_response::response_code, and ast_variable::value.
struct ast_module* AST_MODULE_SELF_SYM | ( | void | ) |
Definition at line 892 of file res_ari_recordings.c.
|
static |
Definition at line 873 of file res_ari_recordings.c.
References ast_ari_add_handler(), AST_MODFLAG_DEFAULT, AST_MODULE_INFO(), AST_MODULE_LOAD_DECLINE, AST_MODULE_LOAD_SUCCESS, AST_MODULE_SUPPORT_CORE, ASTERISK_GPL_KEY, and unload_module().
|
static |
Definition at line 867 of file res_ari_recordings.c.
References ast_ari_remove_handler().
Referenced by load_module().
|
static |
Definition at line 892 of file res_ari_recordings.c.
|
static |
Definition at line 892 of file res_ari_recordings.c.
|
static |
REST handler for /api-docs/recordings.json.
Definition at line 859 of file res_ari_recordings.c.
Referenced by ast_ari_recordings_list_stored(), handle_scan_file(), and stasis_app_stored_recording_find_all().
|
static |
REST handler for /api-docs/recordings.json.
Definition at line 851 of file res_ari_recordings.c.
|
static |
REST handler for /api-docs/recordings.json.
Definition at line 840 of file res_ari_recordings.c.
|
static |
REST handler for /api-docs/recordings.json.
Definition at line 830 of file res_ari_recordings.c.
|
static |
REST handler for /api-docs/recordings.json.
Definition at line 820 of file res_ari_recordings.c.
|
static |
REST handler for /api-docs/recordings.json.
Definition at line 811 of file res_ari_recordings.c.
|
static |
REST handler for /api-docs/recordings.json.
Definition at line 802 of file res_ari_recordings.c.
|
static |
REST handler for /api-docs/recordings.json.
Definition at line 791 of file res_ari_recordings.c.
|
static |
REST handler for /api-docs/recordings.json.
Definition at line 782 of file res_ari_recordings.c.
|
static |
REST handler for /api-docs/recordings.json.
Definition at line 773 of file res_ari_recordings.c.