Asterisk - The Open Source Telephony Project
18.5.0
|
Asterisk Call Manager CDR records. More...
#include "asterisk.h"
#include <time.h>
#include "asterisk/channel.h"
#include "asterisk/cdr.h"
#include "asterisk/module.h"
#include "asterisk/utils.h"
#include "asterisk/manager.h"
#include "asterisk/config.h"
#include "asterisk/pbx.h"
Go to the source code of this file.
Macros | |
#define | CONF_FILE "cdr_manager.conf" |
#define | CUSTOM_FIELDS_BUF_SIZE 1024 |
#define | DATE_FORMAT "%Y-%m-%d %T" |
Functions | |
static void | __reg_module (void) |
static void | __unreg_module (void) |
struct ast_module * | AST_MODULE_SELF_SYM (void) |
static int | load_config (int reload) |
static int | load_module (void) |
static int | manager_log (struct ast_cdr *cdr) |
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 = "Asterisk Manager Interface CDR 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 = "cdr", } |
static const struct ast_module_info * | ast_module_info = &__mod_info |
static struct ast_str * | customfields |
static ast_rwlock_t | customfields_lock = { PTHREAD_RWLOCK_INITIALIZER , NULL, {1, 0} } |
static int | enablecdr = 0 |
static const char | name [] = "cdr_manager" |
#define CONF_FILE "cdr_manager.conf" |
Definition at line 180 of file cdr_manager.c.
Referenced by load_config().
#define CUSTOM_FIELDS_BUF_SIZE 1024 |
Definition at line 181 of file cdr_manager.c.
Referenced by load_config(), and manager_log().
#define DATE_FORMAT "%Y-%m-%d %T" |
Definition at line 179 of file cdr_manager.c.
Referenced by manager_log().
|
static |
Definition at line 375 of file cdr_manager.c.
|
static |
Definition at line 375 of file cdr_manager.c.
struct ast_module* AST_MODULE_SELF_SYM | ( | void | ) |
Definition at line 375 of file cdr_manager.c.
|
static |
Definition at line 192 of file cdr_manager.c.
References ast_category_browse(), ast_cdr_backend_suspend(), ast_cdr_backend_unsuspend(), ast_config_destroy(), ast_config_load, ast_free, ast_log, ast_rwlock_unlock, ast_rwlock_wrlock, ast_str_append(), ast_str_create, ast_str_size(), ast_str_strlen(), ast_strlen_zero, ast_true(), ast_variable_browse(), CONF_FILE, CONFIG_FLAG_FILEUNCHANGED, CONFIG_STATUS_FILEINVALID, CONFIG_STATUS_FILEUNCHANGED, CUSTOM_FIELDS_BUF_SIZE, customfields_lock, enablecdr, LOG_ERROR, LOG_NOTICE, LOG_WARNING, ast_variable::name, name, ast_variable::next, NULL, and ast_variable::value.
Referenced by load_module(), and reload().
|
static |
Definition at line 349 of file cdr_manager.c.
References ast_cdr_register(), ast_cdr_unregister(), AST_MODULE_LOAD_DECLINE, AST_MODULE_LOAD_SUCCESS, load_config(), manager_log(), and name.
Referenced by reload().
|
static |
Definition at line 273 of file cdr_manager.c.
References ast_cdr::accountcode, ast_cdr::amaflags, ast_cdr::answer, ast_cdr_disp2str(), ast_cdr_dup(), ast_channel_amaflags2string(), ast_channel_cdr_set(), ast_channel_unref, ast_dummy_channel_alloc, ast_localtime(), ast_log, ast_rwlock_rdlock, ast_rwlock_unlock, ast_str_buffer(), ast_str_strlen(), ast_strftime(), ast_cdr::billsec, buf, ast_cdr::channel, ast_cdr::clid, CUSTOM_FIELDS_BUF_SIZE, customfields_lock, DATE_FORMAT, ast_cdr::dcontext, ast_cdr::disposition, ast_cdr::dst, ast_cdr::dstchannel, dummy(), ast_cdr::duration, enablecdr, ast_cdr::end, EVENT_FLAG_CDR, ast_cdr::lastapp, ast_cdr::lastdata, LOG_ERROR, manager_event, NULL, pbx_substitute_variables_helper(), ast_cdr::src, ast_cdr::start, ast_cdr::uniqueid, and ast_cdr::userfield.
Referenced by load_module().
|
static |
Definition at line 363 of file cdr_manager.c.
References AST_MODFLAG_LOAD_ORDER, AST_MODPRI_CDR_DRIVER, AST_MODULE_INFO(), AST_MODULE_SUPPORT_CORE, ASTERISK_GPL_KEY, load_config(), load_module(), and unload_module().
|
static |
Definition at line 337 of file cdr_manager.c.
References ast_cdr_unregister(), ast_free, and name.
Referenced by reload().
|
static |
Definition at line 375 of file cdr_manager.c.
|
static |
Definition at line 375 of file cdr_manager.c.
|
static |
Definition at line 187 of file cdr_manager.c.
|
static |
Definition at line 188 of file cdr_manager.c.
Referenced by load_config(), and manager_log().
|
static |
Definition at line 185 of file cdr_manager.c.
Referenced by load_config(), and manager_log().
|
static |
Definition at line 183 of file cdr_manager.c.
Referenced by load_config(), load_module(), and unload_module().