mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-13 00:04:53 +00:00
ARI: Creating log channels
An http request can be sent to create a log channel in Asterisk. The command "curl -v -u user:pass -X POST 'http://localhost:088/ari/asterisk/logging/mylog? configuration=notice,warning'" can be run in the terminal to access the newly implemented functionality for ARI. * Ability to create log channels using ARI ASTERISK-25252 Change-Id: I9a20e5c75716dfbb6b62fd3474faf55be20bd782
This commit is contained in:
@@ -194,6 +194,32 @@ struct ast_ari_asterisk_reload_module_args {
|
||||
* \param[out] response HTTP response
|
||||
*/
|
||||
void ast_ari_asterisk_reload_module(struct ast_variable *headers, struct ast_ari_asterisk_reload_module_args *args, struct ast_ari_response *response);
|
||||
/*! Argument struct for ast_ari_asterisk_add_log() */
|
||||
struct ast_ari_asterisk_add_log_args {
|
||||
/*! The log channel to add */
|
||||
const char *log_channel_name;
|
||||
/*! levels of the log channel */
|
||||
const char *configuration;
|
||||
};
|
||||
/*!
|
||||
* \brief Body parsing function for /asterisk/logging/{logChannelName}.
|
||||
* \param body The JSON body from which to parse parameters.
|
||||
* \param[out] args The args structure to parse into.
|
||||
* \retval zero on success
|
||||
* \retval non-zero on failure
|
||||
*/
|
||||
int ast_ari_asterisk_add_log_parse_body(
|
||||
struct ast_json *body,
|
||||
struct ast_ari_asterisk_add_log_args *args);
|
||||
|
||||
/*!
|
||||
* \brief Adds a log channel.
|
||||
*
|
||||
* \param headers HTTP headers
|
||||
* \param args Swagger parameters
|
||||
* \param[out] response HTTP response
|
||||
*/
|
||||
void ast_ari_asterisk_add_log(struct ast_variable *headers, struct ast_ari_asterisk_add_log_args *args, struct ast_ari_response *response);
|
||||
/*! Argument struct for ast_ari_asterisk_delete_log() */
|
||||
struct ast_ari_asterisk_delete_log_args {
|
||||
/*! Log channels name */
|
||||
|
Reference in New Issue
Block a user