Asterisk - The Open Source Telephony Project
18.5.0
|
Custom Comma Separated Value CEL records. More...
#include "asterisk.h"
#include "asterisk/paths.h"
#include "asterisk/channel.h"
#include "asterisk/cel.h"
#include "asterisk/module.h"
#include "asterisk/config.h"
#include "asterisk/pbx.h"
#include "asterisk/utils.h"
#include "asterisk/lock.h"
#include "asterisk/threadstorage.h"
#include "asterisk/strings.h"
Go to the source code of this file.
Data Structures | |
struct | cel_config |
A container that holds all config-related information. More... | |
struct | sinks |
Macros | |
#define | CONFIG "cel_custom.conf" |
#define | CUSTOM_BACKEND_NAME "CEL Custom CSV Logging" |
#define | CUSTOM_LOG_DIR "/cel_custom" |
Functions | |
static void | __init_custom_buf (void) |
static void | __reg_module (void) |
static void | __unreg_module (void) |
struct ast_module * | AST_MODULE_SELF_SYM (void) |
static void | custom_log (struct ast_event *event) |
static void | free_config (void) |
static int | load_config (void) |
static enum ast_module_load_result | load_module (void) |
static int | reload (void) |
static int | unload_module (void) |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "Customizable Comma Separated Values CEL Backend" , .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, .reload = reload, .load_pri = AST_MODPRI_CDR_DRIVER, .requires = "cel", } |
static const struct ast_module_info * | ast_module_info = &__mod_info |
static struct ast_threadstorage | custom_buf = { .once = PTHREAD_ONCE_INIT , .key_init = __init_custom_buf , .custom_init = NULL , } |
static const char | name [] = "cel-custom" |
static struct sinks | sinks = { .first = NULL, .last = NULL, .lock = { PTHREAD_RWLOCK_INITIALIZER , NULL, {1, 0} } , } |
Custom Comma Separated Value CEL records.
Logs in LOG_DIR/cel_custom
Definition in file cel_custom.c.
#define CONFIG "cel_custom.conf" |
Definition at line 50 of file cel_custom.c.
Referenced by load_config().
#define CUSTOM_BACKEND_NAME "CEL Custom CSV Logging" |
Definition at line 65 of file cel_custom.c.
Referenced by load_module(), and unload_module().
#define CUSTOM_LOG_DIR "/cel_custom" |
Definition at line 49 of file cel_custom.c.
|
static |
Definition at line 52 of file cel_custom.c.
|
static |
Definition at line 227 of file cel_custom.c.
|
static |
Definition at line 227 of file cel_custom.c.
struct ast_module* AST_MODULE_SELF_SYM | ( | void | ) |
Definition at line 227 of file cel_custom.c.
|
static |
Definition at line 127 of file cel_custom.c.
References ast_cel_fabricate_channel_from_event(), ast_channel_unref, AST_LIST_TRAVERSE, ast_log, ast_mutex_lock, ast_mutex_unlock, AST_RWLIST_RDLOCK, AST_RWLIST_UNLOCK, ast_str_buffer(), ast_str_substitute_variables(), ast_str_thread_get(), config, custom_buf, dummy(), errno, cel_config::filename, cel_config::format, cel_config::lock, LOG_ERROR, out, and str.
Referenced by load_module().
|
static |
Definition at line 69 of file cel_custom.c.
References ast_free, ast_mutex_destroy, AST_RWLIST_REMOVE_HEAD, ast_string_field_free_memory, and cel_config::lock.
Referenced by load_module(), reload(), and unload_module().
|
static |
Definition at line 80 of file cel_custom.c.
References ast_calloc_with_stringfields, ast_config_AST_LOG_DIR, ast_config_destroy(), ast_config_load, ast_log, ast_mutex_init, AST_RWLIST_INSERT_TAIL, ast_string_field_build, ast_strlen_zero, ast_variable_browse(), ast_verb, CONFIG, CONFIG_STATUS_FILEINVALID, cel_config::filename, cel_config::format, ast_variable::lineno, cel_config::lock, LOG_ERROR, LOG_NOTICE, name, ast_variable::name, ast_variable::next, ast_variable::value, and var.
Referenced by load_module(), and reload().
|
static |
Definition at line 190 of file cel_custom.c.
References ast_cel_backend_register(), ast_log, AST_MODULE_LOAD_DECLINE, AST_MODULE_LOAD_SUCCESS, AST_RWLIST_UNLOCK, AST_RWLIST_WRLOCK, CUSTOM_BACKEND_NAME, custom_log(), free_config(), load_config(), and LOG_ERROR.
Referenced by reload().
|
static |
Definition at line 207 of file cel_custom.c.
References ast_log, AST_MODFLAG_LOAD_ORDER, AST_MODPRI_CDR_DRIVER, AST_MODULE_INFO(), AST_MODULE_LOAD_DECLINE, AST_MODULE_LOAD_SUCCESS, AST_MODULE_SUPPORT_CORE, AST_RWLIST_UNLOCK, AST_RWLIST_WRLOCK, ASTERISK_GPL_KEY, free_config(), load_config(), load_module(), LOG_ERROR, and unload_module().
|
static |
Definition at line 176 of file cel_custom.c.
References ast_cel_backend_unregister(), ast_log, AST_RWLIST_UNLOCK, AST_RWLIST_WRLOCK, CUSTOM_BACKEND_NAME, free_config(), and LOG_ERROR.
Referenced by reload().
|
static |
Definition at line 227 of file cel_custom.c.
|
static |
Definition at line 227 of file cel_custom.c.
|
static |
Definition at line 52 of file cel_custom.c.
Referenced by custom_log().
|
static |
Definition at line 54 of file cel_custom.c.
Referenced by load_config().