Asterisk - The Open Source Telephony Project GIT-master-b023714
|
Recording resources. More...
#include "asterisk.h"
#include "asterisk/app.h"
#include "asterisk/module.h"
#include "asterisk/stasis_app.h"
#include "ari/resource_recordings.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}. | |
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. | |
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. | |
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}. | |
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}. | |
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_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_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 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 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. | |
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 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. | |
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. | |
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 = ASTERISK_GPL_KEY , .buildopt_sum = AST_BUILDOPT_SUM, .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. | |
static struct stasis_rest_handlers | recordings_live |
REST handler for /api-docs/recordings.json. | |
static struct stasis_rest_handlers | recordings_live_recordingName |
REST handler for /api-docs/recordings.json. | |
static struct stasis_rest_handlers | recordings_live_recordingName_mute |
REST handler for /api-docs/recordings.json. | |
static struct stasis_rest_handlers | recordings_live_recordingName_pause |
REST handler for /api-docs/recordings.json. | |
static struct stasis_rest_handlers | recordings_live_recordingName_stop |
REST handler for /api-docs/recordings.json. | |
static struct stasis_rest_handlers | recordings_stored |
REST handler for /api-docs/recordings.json. | |
static struct stasis_rest_handlers | recordings_stored_recordingName |
REST handler for /api-docs/recordings.json. | |
static struct stasis_rest_handlers | recordings_stored_recordingName_copy |
REST handler for /api-docs/recordings.json. | |
static struct stasis_rest_handlers | recordings_stored_recordingName_file |
REST handler for /api-docs/recordings.json. | |
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 916 of file res_ari_recordings.c.
|
static |
Definition at line 916 of file res_ari_recordings.c.
|
static |
Parameter parsing callback for /recordings/live/{recordingName}.
ser | TCP/TLS session object | |
get_params | GET parameters in the HTTP request. | |
path_vars | Path variables extracted from the request. | |
headers | HTTP headers. | |
body | ||
[out] | response | Response to the HTTP request. |
Definition at line 440 of file res_ari_recordings.c.
References args, 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_response::response_code, and ast_variable::value.
|
static |
Parameter parsing callback for /recordings/stored/{recordingName}/copy.
ser | TCP/TLS session object | |
get_params | GET parameters in the HTTP request. | |
path_vars | Path variables extracted from the request. | |
headers | HTTP headers. | |
body | ||
[out] | response | Response to the HTTP request. |
Definition at line 309 of file res_ari_recordings.c.
References args, 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, LOG_ERROR, ast_ari_response::message, ast_variable::name, ast_variable::next, NULL, 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 287 of file res_ari_recordings.c.
References args, ast_json_object_get(), and ast_json_string_get().
Referenced by ast_ari_recordings_copy_stored_cb().
|
static |
Parameter parsing callback for /recordings/stored/{recordingName}.
ser | TCP/TLS session object | |
get_params | GET parameters in the HTTP request. | |
path_vars | Path variables extracted from the request. | |
headers | HTTP headers. | |
body | ||
[out] | response | Response to the HTTP request. |
Definition at line 175 of file res_ari_recordings.c.
References args, 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_response::response_code, and ast_variable::value.
|
static |
Parameter parsing callback for /recordings/live/{recordingName}.
ser | TCP/TLS session object | |
get_params | GET parameters in the HTTP request. | |
path_vars | Path variables extracted from the request. | |
headers | HTTP headers. | |
body | ||
[out] | response | Response to the HTTP request. |
Definition at line 380 of file res_ari_recordings.c.
References args, 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_response::response_code, and ast_variable::value.
|
static |
Parameter parsing callback for /recordings/stored/{recordingName}.
ser | TCP/TLS session object | |
get_params | GET parameters in the HTTP request. | |
path_vars | Path variables extracted from the request. | |
headers | HTTP headers. | |
body | ||
[out] | response | Response to the HTTP request. |
Definition at line 115 of file res_ari_recordings.c.
References args, 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_response::response_code, and ast_variable::value.
|
static |
Parameter parsing callback for /recordings/stored/{recordingName}/file.
ser | TCP/TLS session object | |
get_params | GET parameters in the HTTP request. | |
path_vars | Path variables extracted from the request. | |
headers | HTTP headers. | |
body | ||
[out] | response | Response to the HTTP request. |
Definition at line 235 of file res_ari_recordings.c.
References args, 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_response::response_code, and ast_variable::value.
|
static |
Parameter parsing callback for /recordings/stored.
ser | TCP/TLS session object | |
get_params | GET parameters in the HTTP request. | |
path_vars | Path variables extracted from the request. | |
headers | HTTP headers. | |
body | ||
[out] | response | Response to the HTTP request. |
Definition at line 63 of file res_ari_recordings.c.
References args, 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.
ser | TCP/TLS session object | |
get_params | GET parameters in the HTTP request. | |
path_vars | Path variables extracted from the request. | |
headers | HTTP headers. | |
body | ||
[out] | response | Response to the HTTP request. |
Definition at line 682 of file res_ari_recordings.c.
References args, 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_response::response_code, and ast_variable::value.
|
static |
Parameter parsing callback for /recordings/live/{recordingName}/pause.
ser | TCP/TLS session object | |
get_params | GET parameters in the HTTP request. | |
path_vars | Path variables extracted from the request. | |
headers | HTTP headers. | |
body | ||
[out] | response | Response to the HTTP request. |
Definition at line 560 of file res_ari_recordings.c.
References args, 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_response::response_code, and ast_variable::value.
|
static |
Parameter parsing callback for /recordings/live/{recordingName}/stop.
ser | TCP/TLS session object | |
get_params | GET parameters in the HTTP request. | |
path_vars | Path variables extracted from the request. | |
headers | HTTP headers. | |
body | ||
[out] | response | Response to the HTTP request. |
Definition at line 500 of file res_ari_recordings.c.
References args, 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_response::response_code, and ast_variable::value.
|
static |
Parameter parsing callback for /recordings/live/{recordingName}/mute.
ser | TCP/TLS session object | |
get_params | GET parameters in the HTTP request. | |
path_vars | Path variables extracted from the request. | |
headers | HTTP headers. | |
body | ||
[out] | response | Response to the HTTP request. |
Definition at line 743 of file res_ari_recordings.c.
References args, 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_response::response_code, and ast_variable::value.
|
static |
Parameter parsing callback for /recordings/live/{recordingName}/pause.
ser | TCP/TLS session object | |
get_params | GET parameters in the HTTP request. | |
path_vars | Path variables extracted from the request. | |
headers | HTTP headers. | |
body | ||
[out] | response | Response to the HTTP request. |
Definition at line 621 of file res_ari_recordings.c.
References args, 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_response::response_code, and ast_variable::value.
struct ast_module * AST_MODULE_SELF_SYM | ( | void | ) |
Definition at line 916 of file res_ari_recordings.c.
|
static |
Definition at line 897 of file res_ari_recordings.c.
References ast_ari_add_handler(), AST_MODULE_LOAD_DECLINE, AST_MODULE_LOAD_SUCCESS, recordings, and unload_module().
|
static |
Definition at line 891 of file res_ari_recordings.c.
References ast_ari_remove_handler(), and recordings.
Referenced by load_module().
|
static |
Definition at line 916 of file res_ari_recordings.c.
|
static |
Definition at line 916 of file res_ari_recordings.c.
|
static |
REST handler for /api-docs/recordings.json.
Definition at line 883 of file res_ari_recordings.c.
Referenced by ast_ari_recordings_list_stored(), handle_scan_file(), load_module(), stasis_app_stored_recording_find_all(), and unload_module().
|
static |
REST handler for /api-docs/recordings.json.
Definition at line 875 of file res_ari_recordings.c.
|
static |
REST handler for /api-docs/recordings.json.
Definition at line 864 of file res_ari_recordings.c.
|
static |
REST handler for /api-docs/recordings.json.
Definition at line 854 of file res_ari_recordings.c.
|
static |
REST handler for /api-docs/recordings.json.
Definition at line 844 of file res_ari_recordings.c.
|
static |
REST handler for /api-docs/recordings.json.
Definition at line 835 of file res_ari_recordings.c.
|
static |
REST handler for /api-docs/recordings.json.
Definition at line 826 of file res_ari_recordings.c.
|
static |
REST handler for /api-docs/recordings.json.
Definition at line 815 of file res_ari_recordings.c.
|
static |
REST handler for /api-docs/recordings.json.
Definition at line 806 of file res_ari_recordings.c.
|
static |
REST handler for /api-docs/recordings.json.
Definition at line 797 of file res_ari_recordings.c.