Custom SQLite3 CDR records.
More...
#include "asterisk.h"
#include <sqlite3.h>
#include "asterisk/cdr.h"
#include "asterisk/module.h"
#include "asterisk/res_cdrel_custom.h"
Go to the source code of this file.
|
| static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "SQLite3 Custom CDR Module" , .key = ASTERISK_GPL_KEY , .buildopt_sum = AST_BUILDOPT_SUM, .support_level = AST_MODULE_SUPPORT_EXTENDED, .load = load_module, .unload = unload_module, .reload = reload, .load_pri = AST_MODPRI_CDR_DRIVER, .requires = "cdr,res_cdrel_custom", } |
| |
| static const struct ast_module_info * | ast_module_info = &__mod_info |
| |
| static struct cdrel_configs * | configs |
| |
| static ast_rwlock_t | configs_lock |
| |
◆ CDREL_BACKEND_TYPE
◆ CDREL_RECORD_TYPE
◆ CONFIG
| #define CONFIG "cdr_sqlite3_custom.conf" |
◆ CUSTOM_BACKEND_NAME
| #define CUSTOM_BACKEND_NAME "CDR sqlite3 custom backend" |
◆ __reg_module()
| static void __reg_module |
( |
void |
| ) |
|
|
static |
◆ __unreg_module()
| static void __unreg_module |
( |
void |
| ) |
|
|
static |
◆ AST_MODULE_SELF_SYM()
◆ custom_log()
| static int custom_log |
( |
struct ast_cdr * |
cdr | ) |
|
|
static |
◆ load_module()
Definition at line 89 of file cdr_sqlite3_custom.c.
90{
93 }
94
96
98}
#define CDREL_RECORD_TYPE
static int custom_log(struct ast_cdr *cdr)
#define CDREL_BACKEND_TYPE
#define CUSTOM_BACKEND_NAME
#define ast_rwlock_init(rwlock)
wrapper for rwlock with tracking enabled
@ AST_MODULE_LOAD_SUCCESS
@ AST_MODULE_LOAD_DECLINE
Module has failed to load, may be in an inconsistent state.
struct cdrel_configs * cdrel_load_module(enum cdrel_backend_type backend_type, enum cdrel_record_type record_type, const char *config_filename, const char *backend_name, void *logging_cb)
Perform initial module load.
References AST_MODULE_LOAD_DECLINE, AST_MODULE_LOAD_SUCCESS, ast_rwlock_init, CDREL_BACKEND_TYPE, cdrel_load_module(), CDREL_RECORD_TYPE, CONFIG, configs_lock, CUSTOM_BACKEND_NAME, and custom_log().
◆ reload()
| static int reload |
( |
void |
| ) |
|
|
static |
◆ unload_module()
| static int unload_module |
( |
void |
| ) |
|
|
static |
Definition at line 75 of file cdr_sqlite3_custom.c.
76{
77 int res = 0;
78
82 if (res == 0) {
84 }
85
86 return res;
87}
#define ast_rwlock_destroy(rwlock)
int cdrel_unload_module(enum cdrel_backend_type backend_type, enum cdrel_record_type record_type, struct cdrel_configs *configs, const char *backend_name)
Perform module unload.
References ast_rwlock_destroy, ast_rwlock_unlock, ast_rwlock_wrlock, CDREL_BACKEND_TYPE, CDREL_RECORD_TYPE, cdrel_unload_module(), configs_lock, and CUSTOM_BACKEND_NAME.
◆ __mod_info
| struct ast_module_info __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "SQLite3 Custom CDR Module" , .key = ASTERISK_GPL_KEY , .buildopt_sum = AST_BUILDOPT_SUM, .support_level = AST_MODULE_SUPPORT_EXTENDED, .load = load_module, .unload = unload_module, .reload = reload, .load_pri = AST_MODPRI_CDR_DRIVER, .requires = "cdr,res_cdrel_custom", } |
|
static |
◆ ast_module_info
◆ configs
◆ configs_lock