Asterisk - The Open Source Telephony Project
18.5.0
|
Generated file - declares stubs to be implemented in res/ari/resource_asterisk.c. More...
#include "asterisk/ari.h"
Go to the source code of this file.
Data Structures | |
struct | ast_ari_asterisk_add_log_args |
struct | ast_ari_asterisk_delete_log_args |
struct | ast_ari_asterisk_delete_object_args |
struct | ast_ari_asterisk_get_global_var_args |
struct | ast_ari_asterisk_get_info_args |
struct | ast_ari_asterisk_get_module_args |
struct | ast_ari_asterisk_get_object_args |
struct | ast_ari_asterisk_list_log_channels_args |
struct | ast_ari_asterisk_list_modules_args |
struct | ast_ari_asterisk_load_module_args |
struct | ast_ari_asterisk_ping_args |
struct | ast_ari_asterisk_reload_module_args |
struct | ast_ari_asterisk_rotate_log_args |
struct | ast_ari_asterisk_set_global_var_args |
struct | ast_ari_asterisk_unload_module_args |
struct | ast_ari_asterisk_update_object_args |
Generated file - declares stubs to be implemented in res/ari/resource_asterisk.c.
Asterisk resources
Definition in file resource_asterisk.h.
void ast_ari_asterisk_add_log | ( | struct ast_variable * | headers, |
struct ast_ari_asterisk_add_log_args * | args, | ||
struct ast_ari_response * | response | ||
) |
Adds a log channel.
headers | HTTP headers | |
args | Swagger parameters | |
[out] | response | HTTP response |
Definition at line 705 of file resource_asterisk.c.
References ast_ari_response_error(), ast_ari_response_no_content(), ast_assert, AST_LOGGER_ALLOC_ERROR, ast_logger_create_channel(), AST_LOGGER_DECLINE, AST_LOGGER_FAILURE, ast_ari_asterisk_add_log_args::configuration, ast_ari_asterisk_add_log_args::log_channel_name, and NULL.
Referenced by ast_ari_asterisk_add_log_cb().
int ast_ari_asterisk_add_log_parse_body | ( | struct ast_json * | body, |
struct ast_ari_asterisk_add_log_args * | args | ||
) |
Body parsing function for /asterisk/logging/{logChannelName}.
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 783 of file res_ari_asterisk.c.
References ast_json_object_get(), ast_json_string_get(), and ast_ari_asterisk_add_log_args::configuration.
Referenced by ast_ari_asterisk_add_log_cb().
void ast_ari_asterisk_delete_log | ( | struct ast_variable * | headers, |
struct ast_ari_asterisk_delete_log_args * | args, | ||
struct ast_ari_response * | response | ||
) |
Deletes a log channel.
headers | HTTP headers | |
args | Swagger parameters | |
[out] | response | HTTP response |
Definition at line 757 of file resource_asterisk.c.
References ast_ari_response_error(), ast_ari_response_no_content(), ast_assert, AST_LOGGER_ALLOC_ERROR, AST_LOGGER_FAILURE, ast_logger_remove_channel(), ast_ari_asterisk_delete_log_args::log_channel_name, and NULL.
Referenced by ast_ari_asterisk_delete_log_cb().
void ast_ari_asterisk_delete_object | ( | struct ast_variable * | headers, |
struct ast_ari_asterisk_delete_object_args * | args, | ||
struct ast_ari_response * | response | ||
) |
Delete a dynamic configuration object.
headers | HTTP headers | |
args | Swagger parameters | |
[out] | response | HTTP response |
Definition at line 247 of file resource_asterisk.c.
References ao2_cleanup, ast_ari_response_error(), ast_ari_response_no_content(), ast_sorcery_delete(), ast_sorcery_get_object_type(), ast_sorcery_retrieve_by_id(), ast_sorcery_retrieve_by_module_name(), ast_sorcery_unref, ast_ari_asterisk_delete_object_args::config_class, ast_ari_asterisk_delete_object_args::id, NULL, ast_ari_asterisk_delete_object_args::object_type, RAII_VAR, and sorcery.
Referenced by ast_ari_asterisk_delete_object_cb().
void ast_ari_asterisk_get_global_var | ( | struct ast_variable * | headers, |
struct ast_ari_asterisk_get_global_var_args * | args, | ||
struct ast_ari_response * | response | ||
) |
Get the value of a global variable.
headers | HTTP headers | |
args | Swagger parameters | |
[out] | response | HTTP response |
Definition at line 780 of file resource_asterisk.c.
References ast_ari_response_alloc_failed(), ast_ari_response_error(), ast_ari_response_ok(), ast_assert, ast_free, ast_json_pack(), ast_json_ref(), ast_json_unref(), ast_str_create, ast_str_retrieve_variable(), ast_strlen_zero, NULL, RAII_VAR, S_OR, tmp(), value, and ast_ari_asterisk_get_global_var_args::variable.
Referenced by ast_ari_asterisk_get_global_var_cb().
int ast_ari_asterisk_get_global_var_parse_body | ( | struct ast_json * | body, |
struct ast_ari_asterisk_get_global_var_args * | args | ||
) |
Body parsing function for /asterisk/variable.
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 981 of file res_ari_asterisk.c.
References ast_json_object_get(), ast_json_string_get(), and ast_ari_asterisk_get_global_var_args::variable.
Referenced by ast_ari_asterisk_get_global_var_cb().
void ast_ari_asterisk_get_info | ( | struct ast_variable * | headers, |
struct ast_ari_asterisk_get_info_args * | args, | ||
struct ast_ari_response * | response | ||
) |
Gets Asterisk system information.
headers | HTTP headers | |
args | Swagger parameters | |
[out] | response | HTTP response |
Definition at line 294 of file resource_asterisk.c.
References ast_ari_response_alloc_failed(), ast_ari_response_ok(), ast_build_date, ast_build_kernel, ast_build_machine, ast_build_os, ast_build_user, AST_BUILDOPTS, ast_config_AST_RUN_GROUP, ast_config_AST_RUN_USER, ast_config_AST_SYSTEM_NAME, ast_defaultlanguage, ast_eid_default, ast_eid_to_str(), ast_get_version(), ast_json_integer_create(), ast_json_object_create(), ast_json_object_set(), ast_json_pack(), ast_json_real_create(), ast_json_ref(), ast_json_timeval(), ast_json_unref(), ast_lastreloadtime, ast_log, ast_option_maxcalls, ast_option_maxfiles, ast_option_maxload, ast_startuptime, config, LOG_WARNING, NULL, ast_ari_asterisk_get_info_args::only, ast_ari_asterisk_get_info_args::only_count, and RAII_VAR.
Referenced by ast_ari_asterisk_get_info_cb().
int ast_ari_asterisk_get_info_parse_body | ( | struct ast_json * | body, |
struct ast_ari_asterisk_get_info_args * | args | ||
) |
Body parsing function for /asterisk/info.
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 257 of file res_ari_asterisk.c.
References ast_free, AST_JSON_ARRAY, ast_json_array_get(), ast_json_array_size(), ast_json_object_get(), ast_json_string_get(), ast_json_typeof(), ast_malloc, ast_ari_asterisk_get_info_args::only, and ast_ari_asterisk_get_info_args::only_count.
Referenced by ast_ari_asterisk_get_info_cb().
void ast_ari_asterisk_get_module | ( | struct ast_variable * | headers, |
struct ast_ari_asterisk_get_module_args * | args, | ||
struct ast_ari_response * | response | ||
) |
Get Asterisk module information.
headers | HTTP headers | |
args | Swagger parameters | |
[out] | response | HTTP response |
Definition at line 484 of file resource_asterisk.c.
References ast_ari_response_alloc_failed(), ast_ari_response_error(), ast_ari_response_ok(), ast_assert, ast_json_object_create(), ast_json_unref(), ast_module_check(), ast_update_module_list_condition(), identify_module(), ast_ari_asterisk_get_module_args::module_name, and NULL.
Referenced by ast_ari_asterisk_get_module_cb().
void ast_ari_asterisk_get_object | ( | struct ast_variable * | headers, |
struct ast_ari_asterisk_get_object_args * | args, | ||
struct ast_ari_response * | response | ||
) |
Retrieve a dynamic configuration object.
headers | HTTP headers | |
args | Swagger parameters | |
[out] | response | HTTP response |
Definition at line 89 of file resource_asterisk.c.
References ao2_cleanup, ast_ari_response_error(), ast_sorcery_get_object_type(), ast_sorcery_retrieve_by_id(), ast_sorcery_retrieve_by_module_name(), ast_sorcery_unref, ast_ari_asterisk_get_object_args::config_class, ast_ari_asterisk_get_object_args::id, NULL, ast_ari_asterisk_get_object_args::object_type, RAII_VAR, return_sorcery_object(), and sorcery.
Referenced by ast_ari_asterisk_get_object_cb().
void ast_ari_asterisk_list_log_channels | ( | struct ast_variable * | headers, |
struct ast_ari_asterisk_list_log_channels_args * | args, | ||
struct ast_ari_response * | response | ||
) |
Gets Asterisk log channel information.
headers | HTTP headers | |
args | Swagger parameters | |
[out] | response | HTTP response |
Definition at line 680 of file resource_asterisk.c.
References ast_ari_response_error(), ast_ari_response_ok(), ast_json_array_create(), ast_json_unref(), AST_LOGGER_ALLOC_ERROR, AST_LOGGER_FAILURE, ast_logger_get_channels(), and process_log_list().
Referenced by ast_ari_asterisk_list_log_channels_cb().
void ast_ari_asterisk_list_modules | ( | struct ast_variable * | headers, |
struct ast_ari_asterisk_list_modules_args * | args, | ||
struct ast_ari_response * | response | ||
) |
List Asterisk modules.
headers | HTTP headers | |
args | Swagger parameters | |
[out] | response | HTTP response |
Definition at line 429 of file resource_asterisk.c.
References ast_ari_response_alloc_failed(), ast_ari_response_ok(), ast_json_array_create(), ast_update_module_list_data(), NULL, and process_module_list().
Referenced by ast_ari_asterisk_list_modules_cb().
void ast_ari_asterisk_load_module | ( | struct ast_variable * | headers, |
struct ast_ari_asterisk_load_module_args * | args, | ||
struct ast_ari_response * | response | ||
) |
Load an Asterisk module.
headers | HTTP headers | |
args | Swagger parameters | |
[out] | response | HTTP response |
Definition at line 519 of file resource_asterisk.c.
References ast_ari_response_error(), ast_ari_response_no_content(), ast_assert, ast_load_resource(), ast_module_check(), AST_MODULE_LOAD_DECLINE, AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_SKIP, ast_ari_asterisk_load_module_args::module_name, and NULL.
Referenced by ast_ari_asterisk_load_module_cb().
void ast_ari_asterisk_ping | ( | struct ast_variable * | headers, |
struct ast_ari_asterisk_ping_args * | args, | ||
struct ast_ari_response * | response | ||
) |
Response pong message.
headers | HTTP headers | |
args | Swagger parameters | |
[out] | response | HTTP response |
Definition at line 634 of file resource_asterisk.c.
References ast_ari_response_ok(), ast_assert, ast_eid_default, ast_eid_to_str(), ast_json_pack(), ast_json_timeval(), ast_tvnow(), and NULL.
Referenced by ast_ari_asterisk_ping_cb().
void ast_ari_asterisk_reload_module | ( | struct ast_variable * | headers, |
struct ast_ari_asterisk_reload_module_args * | args, | ||
struct ast_ari_response * | response | ||
) |
Reload an Asterisk module.
headers | HTTP headers | |
args | Swagger parameters | |
[out] | response | HTTP response |
Definition at line 584 of file resource_asterisk.c.
References ast_ari_response_accepted(), ast_ari_response_error(), ast_ari_response_no_content(), ast_assert, ast_module_check(), ast_module_reload(), AST_MODULE_RELOAD_ERROR, AST_MODULE_RELOAD_IN_PROGRESS, AST_MODULE_RELOAD_NOT_FOUND, AST_MODULE_RELOAD_NOT_IMPLEMENTED, AST_MODULE_RELOAD_QUEUED, AST_MODULE_RELOAD_UNINITIALIZED, ast_ari_asterisk_reload_module_args::module_name, and NULL.
Referenced by ast_ari_asterisk_reload_module_cb().
void ast_ari_asterisk_rotate_log | ( | struct ast_variable * | headers, |
struct ast_ari_asterisk_rotate_log_args * | args, | ||
struct ast_ari_response * | response | ||
) |
Rotates a log channel.
headers | HTTP headers | |
args | Swagger parameters | |
[out] | response | HTTP response |
Definition at line 732 of file resource_asterisk.c.
References ast_ari_response_error(), ast_ari_response_no_content(), ast_assert, AST_LOGGER_ALLOC_ERROR, AST_LOGGER_FAILURE, ast_logger_rotate_channel(), ast_ari_asterisk_rotate_log_args::log_channel_name, and NULL.
Referenced by ast_ari_asterisk_rotate_log_cb().
void ast_ari_asterisk_set_global_var | ( | struct ast_variable * | headers, |
struct ast_ari_asterisk_set_global_var_args * | args, | ||
struct ast_ari_response * | response | ||
) |
Set the value of a global variable.
headers | HTTP headers | |
args | Swagger parameters | |
[out] | response | HTTP response |
Definition at line 814 of file resource_asterisk.c.
References ast_ari_response_error(), ast_ari_response_no_content(), ast_assert, ast_strlen_zero, NULL, pbx_builtin_setvar_helper(), ast_ari_asterisk_set_global_var_args::value, and ast_ari_asterisk_set_global_var_args::variable.
Referenced by ast_ari_asterisk_set_global_var_cb().
int ast_ari_asterisk_set_global_var_parse_body | ( | struct ast_json * | body, |
struct ast_ari_asterisk_set_global_var_args * | args | ||
) |
Body parsing function for /asterisk/variable.
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 1056 of file res_ari_asterisk.c.
References ast_json_object_get(), ast_json_string_get(), ast_ari_asterisk_set_global_var_args::value, and ast_ari_asterisk_set_global_var_args::variable.
Referenced by ast_ari_asterisk_set_global_var_cb().
void ast_ari_asterisk_unload_module | ( | struct ast_variable * | headers, |
struct ast_ari_asterisk_unload_module_args * | args, | ||
struct ast_ari_response * | response | ||
) |
Unload an Asterisk module.
headers | HTTP headers | |
args | Swagger parameters | |
[out] | response | HTTP response |
Definition at line 556 of file resource_asterisk.c.
References ast_ari_response_error(), ast_ari_response_no_content(), ast_assert, AST_FORCE_SOFT, ast_module_check(), ast_unload_resource(), ast_ari_asterisk_unload_module_args::module_name, and NULL.
Referenced by ast_ari_asterisk_unload_module_cb().
void ast_ari_asterisk_update_object | ( | struct ast_variable * | headers, |
struct ast_ari_asterisk_update_object_args * | args, | ||
struct ast_ari_response * | response | ||
) |
Create or update a dynamic configuration object.
headers | HTTP headers | |
args | Swagger parameters | |
[out] | response | HTTP response |
Definition at line 128 of file resource_asterisk.c.
References ao2_cleanup, ao2_ref, ast_ari_response_alloc_failed(), ast_ari_response_error(), ast_debug, ast_json_array_get(), ast_json_array_size(), ast_json_object_get(), ast_json_string_get(), ast_sorcery_alloc(), ast_sorcery_copy(), ast_sorcery_create(), ast_sorcery_get_object_type(), ast_sorcery_objectset_apply(), ast_sorcery_retrieve_by_id(), ast_sorcery_retrieve_by_module_name(), ast_sorcery_unref, ast_sorcery_update(), ast_variable_list_append, ast_variable_new, ast_variables_destroy(), ast_ari_asterisk_update_object_args::config_class, copy(), ast_ari_asterisk_update_object_args::fields, ast_ari_asterisk_update_object_args::id, NULL, ast_ari_asterisk_update_object_args::object_type, RAII_VAR, return_sorcery_object(), and sorcery.
Referenced by ast_ari_asterisk_update_object_cb().
int ast_ari_asterisk_update_object_parse_body | ( | struct ast_json * | body, |
struct ast_ari_asterisk_update_object_args * | args | ||
) |
Body parsing function for /asterisk/config/dynamic/{configClass}/{objectType}/{id}.
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 117 of file res_ari_asterisk.c.