94 #define MACRO_BEGIN do {
95 #define MACRO_END } while (0)
97 #define RES_CONFIG_SQLITE_NAME "res_config_sqlite"
98 #define RES_CONFIG_SQLITE_DRIVER "sqlite"
99 #define RES_CONFIG_SQLITE_DESCRIPTION "Resource Module for SQLite 2"
100 #define RES_CONFIG_SQLITE_CONF_FILE "res_config_sqlite.conf"
114 #define SET_VAR(config, to, from) \
118 __error = set_var(&to, #to, from->value); \
121 ast_config_destroy(config); \
146 #define RES_CONFIG_SQLITE_MAX_LOOPS 10
153 #define RES_CONFIG_SQLITE_BEGIN \
157 for (__i = 0; __i < RES_CONFIG_SQLITE_MAX_LOOPS; __i++) {
164 #define RES_CONFIG_SQLITE_END(error) \
165 if (error != SQLITE_BUSY) \
262 static int add_cfg_entry(
void *arg,
int argc,
char **argv,
char **columnNames);
282 struct ast_config *cfg,
struct ast_flags flags,
const char *suggested_incl,
const char *who_asked);
307 static size_t get_params(va_list ap,
const char ***params_ptr,
308 const char ***vals_ptr,
int warn);
346 const char *
table, va_list ap);
383 const char *
table, va_list ap);
404 const char *keyfield,
const char *
entity, va_list ap);
445 const char *keyfield,
const char *
entity, va_list ap);
535 "CREATE TABLE '%q' (\n"
537 " clid VARCHAR(80) NOT NULL
DEFAULT '',\n"
538 " src VARCHAR(80) NOT NULL DEFAULT '',\n"
539 " dst VARCHAR(80) NOT NULL DEFAULT '',\n"
540 " dcontext VARCHAR(80) NOT NULL DEFAULT '',\n"
541 " channel VARCHAR(80) NOT NULL DEFAULT '',\n"
542 " dstchannel VARCHAR(80) NOT NULL DEFAULT '',\n"
543 " lastapp VARCHAR(80) NOT NULL DEFAULT '',\n"
544 " lastdata VARCHAR(80) NOT NULL DEFAULT '',\n"
545 " start DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',\n"
546 " answer DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',\n"
547 " end DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',\n"
548 " duration INT(11) NOT NULL DEFAULT 0,\n"
549 " billsec INT(11) NOT NULL DEFAULT 0,\n"
550 " disposition VARCHAR(45) NOT NULL DEFAULT '',\n"
551 "
amaflags INT(11) NOT NULL DEFAULT 0,\n"
553 " uniqueid VARCHAR(32) NOT NULL DEFAULT '',\n"
554 " userfield VARCHAR(255) NOT NULL DEFAULT '',\n"
555 " PRIMARY KEY (
id)\n"
561 #define sql_table_structure "SELECT sql FROM sqlite_master WHERE type='table' AND tbl_name='%s'"
569 #define sql_get_config_table \
572 " WHERE filename = '%q' AND commented = 0" \
573 " ORDER BY cat_metric ASC, var_metric ASC;"
589 static int find_table_cb(
void *vtblptr,
int argc,
char **argv,
char **columnNames)
591 struct sqlite_cache_tables *tblptr = vtblptr;
602 if ((start = strchr(sql,
'(')) && (end = strrchr(sql,
')'))) {
611 for (i = 0; i < fie.argc; i++) {
613 ast_debug(5,
"Found field: %s\n", fie.ld[i]);
614 if (strncasecmp(fie.ld[i],
"PRIMARY KEY", 11) == 0 && (start = strchr(fie.ld[i],
'(')) && (end = strchr(fie.ld[i],
')'))) {
624 for (type = fie.ld[i]; *type > 32; type++);
627 for (remainder = type; *remainder > 32; remainder++);
629 if (!(col =
ast_calloc(1,
sizeof(*col) + strlen(fie.ld[i]) + strlen(type) + 2))) {
632 col->
name = (
char *)col +
sizeof(*col);
633 col->
type = (
char *)col +
sizeof(*col) + strlen(fie.ld[i]) + 1;
634 strcpy(col->
name, fie.ld[i]);
635 strcpy(col->
type, type);
644 static struct sqlite_cache_tables *
find_table(
const char *tablename)
646 struct sqlite_cache_tables *tblptr;
648 char *sql, *errstr = NULL;
652 for (i = 0; i < 2; i++) {
654 if (strcmp(tblptr->
name, tablename) == 0) {
674 if (!(tblptr =
ast_calloc(1,
sizeof(*tblptr) + strlen(tablename) + 1))) {
680 tblptr->
name = (
char *)tblptr +
sizeof(*tblptr);
681 strcpy(tblptr->
name, tablename);
684 ast_debug(1,
"About to query table structure: %s\n", sql);
687 if ((err = sqlite_exec(db, sql,
find_table_cb, tblptr, &errstr))) {
711 #define release_table(a) AST_RWLIST_UNLOCK(&((a)->columns))
735 use_cdr = (cdr_table != NULL);
755 if (!strcasecmp(var->
name,
"dbfile"))
757 else if (!strcasecmp(var->
name,
"config_table"))
758 SET_VAR(config, config_table, var);
759 else if (!strcasecmp(var->
name,
"cdr_table")) {
760 SET_VAR(config, cdr_table, var);
778 struct sqlite_cache_tables *tbl;
794 char *errormsg = NULL, *tmp, workspace[500];
796 struct sqlite_cache_tables *tbl =
find_table(cdr_table);
806 ast_str_set(&sql1, 0,
"INSERT INTO %s (", cdr_table);
815 if (sscanf(tmp,
"%30d", &scannum) == 1) {
825 tmp = sqlite_mprintf(
"%Q", tmp);
841 error = sqlite_exec(db,
ast_str_buffer(sql1), NULL, NULL, &errormsg);
850 sqlite_freemem(errormsg);
853 sqlite_freemem(errormsg);
858 static int add_cfg_entry(
void *arg,
int argc,
char **argv,
char **columnNames)
918 struct ast_config *cfg,
struct ast_flags flags,
const char *suggested_incl,
const char *who_asked)
921 char *query, *errormsg = NULL;
949 error = sqlite_exec(db, query,
add_cfg_entry, &args, &errormsg);
955 sqlite_freemem(query);
959 sqlite_freemem(errormsg);
962 sqlite_freemem(errormsg);
967 static size_t get_params(va_list ap,
const char ***params_ptr,
const char ***vals_ptr,
int warn)
969 const char **tmp, *param, *
val, **params, **vals;
976 while ((param = va_arg(ap,
const char *)) && (val = va_arg(ap,
const char *))) {
977 if (!(tmp =
ast_realloc(params, (params_count + 1) *
sizeof(
char *)))) {
984 if (!(tmp =
ast_realloc(vals, (params_count + 1) *
sizeof(
char *)))) {
991 params[params_count] = param;
992 vals[params_count] = val;
996 if (params_count > 0) {
997 *params_ptr = params;
1003 return params_count;
1014 for (i = 0; i < argc; i++) {
1037 char *query, *errormsg = NULL, *op, *tmp_str;
1039 const char **params, **vals;
1040 size_t params_count;
1048 params_count =
get_params(ap, ¶ms, &vals, 1);
1050 if (params_count == 0)
1053 op = (strchr(params[0],
' ') == NULL) ?
" =" :
"";
1057 #define QUERY "SELECT * FROM '%q' WHERE%s %q%s '%q'"
1060 query = sqlite_mprintf(QUERY, table, (config_table && !strcmp(config_table, table)) ?
" commented = 0 AND" :
"", params[0], op, vals[0]);
1069 if (params_count > 1) {
1072 for (i = 1; i < params_count; i++) {
1073 op = (strchr(params[i],
' ') == NULL) ?
" =" :
"";
1074 tmp_str = sqlite_mprintf(
"%s AND %q%s '%q'", query, params[i], op, vals[i]);
1075 sqlite_freemem(query);
1091 tmp_str = sqlite_mprintf(
"%s LIMIT 1;", query);
1092 sqlite_freemem(query);
1112 sqlite_freemem(query);
1116 sqlite_freemem(errormsg);
1120 sqlite_freemem(errormsg);
1141 for (i = 0; i < argc; i++) {
1142 if (!strcmp(args->
initfield, columnNames[i]))
1158 for (i = 0; i < argc; i++) {
1175 const char *
table, va_list ap)
1177 char *query, *errormsg = NULL, *op, *tmp_str, *initfield;
1179 const char **params, **vals;
1181 size_t params_count;
1194 if (!(params_count =
get_params(ap, ¶ms, &vals, 1))) {
1206 tmp_str = strchr(initfield,
' ');
1211 op = (!strchr(params[0],
' ')) ?
" =" :
"";
1217 tmp_str = (!strcmp(vals[0],
"\\_%")) ?
"_%" : (
char *)vals[0];
1221 #define QUERY "SELECT * FROM '%q' WHERE%s %q%s '%q'"
1224 if (!(query = sqlite_mprintf(QUERY, table, (config_table && !strcmp(config_table, table)) ?
" commented = 0 AND" :
"", params[0], op, tmp_str))) {
1233 if (params_count > 1) {
1236 for (i = 1; i < params_count; i++) {
1237 op = (!strchr(params[i],
' ')) ?
" =" :
"";
1238 tmp_str = sqlite_mprintf(
"%s AND %q%s '%q'", query, params[i], op, vals[i]);
1239 sqlite_freemem(query);
1257 if (!(tmp_str = sqlite_mprintf(
"%s ORDER BY %q;", query, initfield))) {
1259 sqlite_freemem(query);
1265 sqlite_freemem(query);
1279 sqlite_freemem(query);
1284 sqlite_freemem(errormsg);
1288 sqlite_freemem(errormsg);
1294 const char *keyfield,
const char *
entity, va_list ap)
1296 char *query, *errormsg = NULL, *tmp_str;
1297 const char **params, **vals;
1298 size_t params_count;
1299 int error, rows_num;
1306 if (!(params_count =
get_params(ap, ¶ms, &vals, 1)))
1311 #define QUERY "UPDATE '%q' SET %q = '%q'"
1314 if (!(query = sqlite_mprintf(QUERY, table, params[0], vals[0]))) {
1321 if (params_count > 1) {
1324 for (i = 1; i < params_count; i++) {
1325 tmp_str = sqlite_mprintf(
"%s, %q = '%q'", query, params[i], vals[i]);
1326 sqlite_freemem(query);
1342 if (!(tmp_str = sqlite_mprintf(
"%s WHERE %q = '%q';", query, keyfield, entity))) {
1344 sqlite_freemem(query);
1348 sqlite_freemem(query);
1355 error = sqlite_exec(db, query, NULL, NULL, &errormsg);
1359 rows_num = sqlite_changes(db);
1365 sqlite_freemem(query);
1370 sqlite_freemem(errormsg);
1378 char *errormsg = NULL, *tmp1, *tmp2;
1379 int error, rows_num,
first = 1;
1382 const char *param, *
value;
1396 while ((param = va_arg(ap,
const char *))) {
1397 value = va_arg(ap,
const char *);
1399 first ?
"" :
" AND",
1400 tmp1 = sqlite_mprintf(
"%q", param),
1401 tmp2 = sqlite_mprintf(
"%Q", value));
1402 sqlite_freemem(tmp1);
1403 sqlite_freemem(tmp2);
1408 ast_log(
LOG_ERROR,
"No criteria specified on update to '%s@%s'!\n", table, database);
1413 while ((param = va_arg(ap,
const char *))) {
1414 value = va_arg(ap,
const char *);
1417 tmp1 = sqlite_mprintf(
"%q", param),
1418 tmp2 = sqlite_mprintf(
"%Q", value));
1419 sqlite_freemem(tmp1);
1420 sqlite_freemem(tmp2);
1430 error = sqlite_exec(db,
ast_str_buffer(sql), NULL, NULL, &errormsg);
1434 rows_num = sqlite_changes(db);
1444 sqlite_freemem(errormsg);
1451 char *errormsg = NULL, *tmp_str, *tmp_keys = NULL, *tmp_keys2 = NULL, *tmp_vals = NULL, *tmp_vals2 = NULL;
1452 const char **params, **vals;
1453 size_t params_count;
1462 if (!(params_count =
get_params(ap, ¶ms, &vals, 1)))
1467 #define QUERY "INSERT into '%q' (%s) VALUES (%s);"
1470 for (i = 0; i < params_count; i++) {
1472 tmp_keys = sqlite_mprintf(
"%s, %q", tmp_keys2, params[i]);
1473 sqlite_freemem(tmp_keys2);
1475 tmp_keys = sqlite_mprintf(
"%q", params[i]);
1479 sqlite_freemem(tmp_vals);
1486 tmp_vals = sqlite_mprintf(
"%s, '%q'", tmp_vals2, vals[i]);
1487 sqlite_freemem(tmp_vals2);
1489 tmp_vals = sqlite_mprintf(
"'%q'", vals[i]);
1493 sqlite_freemem(tmp_keys);
1500 tmp_keys2 = tmp_keys;
1501 tmp_vals2 = tmp_vals;
1507 if (!(tmp_str = sqlite_mprintf(QUERY, table, tmp_keys, tmp_vals))) {
1509 sqlite_freemem(tmp_keys);
1510 sqlite_freemem(tmp_vals);
1514 sqlite_freemem(tmp_keys);
1515 sqlite_freemem(tmp_vals);
1517 ast_debug(1,
"SQL query: %s\n", tmp_str);
1522 error = sqlite_exec(db, tmp_str, NULL, NULL, &errormsg);
1526 rows_id = sqlite_last_insert_rowid(db);
1533 sqlite_freemem(tmp_str);
1538 sqlite_freemem(errormsg);
1544 const char *keyfield,
const char *
entity, va_list ap)
1546 char *query, *errormsg = NULL, *tmp_str;
1547 const char **params = NULL, **vals = NULL;
1548 size_t params_count;
1549 int error, rows_num;
1557 params_count =
get_params(ap, ¶ms, &vals, 0);
1561 #define QUERY "DELETE FROM '%q' WHERE"
1564 if (!(query = sqlite_mprintf(QUERY, table))) {
1571 for (i = 0; i < params_count; i++) {
1572 tmp_str = sqlite_mprintf(
"%s %q = '%q' AND", query, params[i], vals[i]);
1573 sqlite_freemem(query);
1587 if (!(tmp_str = sqlite_mprintf(
"%s %q = '%q';", query, keyfield, entity))) {
1589 sqlite_freemem(query);
1592 sqlite_freemem(query);
1599 error = sqlite_exec(db, query, NULL, NULL, &errormsg);
1603 rows_num = sqlite_changes(db);
1610 sqlite_freemem(query);
1615 sqlite_freemem(errormsg);
1622 struct sqlite_cache_tables *tbl =
find_table(tablename);
1631 while ((elm = va_arg(ap,
char *))) {
1636 if (strcmp(col->
name, elm) == 0) {
1642 ast_log(
LOG_WARNING,
"Realtime table %s: column '%s' is an integer field, but Asterisk requires that it not be!\n", tablename, col->
name);
1649 ast_log(
LOG_WARNING,
"Realtime table %s requires column '%s', but that column does not exist!\n", tablename, elm);
1658 struct sqlite_cache_tables *tbl;
1661 if (!strcasecmp(tbl->
name, tablename)) {
1675 e->
command =
"sqlite show status";
1677 "Usage: sqlite show status\n"
1678 " Show status information about the SQLite 2 driver\n";
1687 ast_cli(a->
fd,
"SQLite database path: %s\n", dbfile);
1691 ast_cli(a->
fd,
"unspecified, must be present in extconfig.conf\n");
1698 ast_cli(a->
fd,
"unspecified, CDR support disabled\n");
1707 struct sqlite_cache_tables *tbl;
1713 e->
command =
"sqlite show tables";
1715 "Usage: sqlite show tables\n"
1716 " Show table information about the SQLite 2 driver\n";
1730 fprintf(stderr,
"%s\n", col->
name);
1737 ast_cli(a->
fd,
"No tables currently in cache\n");
1745 if (cli_status_registered)
1763 char *errormsg = NULL;
1768 cli_status_registered = 0;
1770 config_table = NULL;
1777 if (!(db = sqlite_open(dbfile, 0660, &errormsg))) {
1779 sqlite_freemem(errormsg);
1784 sqlite_freemem(errormsg);
1793 #define QUERY "SELECT COUNT(id) FROM %Q;"
1796 query = sqlite_mprintf(QUERY, cdr_table);
1807 error = sqlite_exec(db, query, NULL, NULL, &errormsg);
1810 sqlite_freemem(query);
1816 if (error != SQLITE_ERROR) {
1818 sqlite_freemem(errormsg);
1823 sqlite_freemem(errormsg);
1836 error = sqlite_exec(db, query, NULL, NULL, &errormsg);
1839 sqlite_freemem(query);
1843 sqlite_freemem(errormsg);
1848 sqlite_freemem(errormsg);
1868 cli_status_registered = 1;
#define RES_CONFIG_SQLITE_CONF_FILE
#define AST_THREADSTORAGE(name)
Define a thread storage variable.
static int find_table_cb(void *vtblptr, int argc, char **argv, char **columnNames)
static char accountcode[AST_MAX_ACCOUNT_CODE]
static int realtime_destroy_handler(const char *database, const char *table, const char *keyfield, const char *entity, va_list ap)
Asterisk callback function for RealTime configuration (destroys variable).
#define AST_CLI_DEFINE(fn, txt,...)
#define AST_RWLIST_HEAD_DESTROY(head)
Destroys an rwlist head structure.
static struct ast_threadstorage where_buf
static int set_var(char **var, const char *name, const char *value)
Allocate a variable.
Asterisk locking-related definitions:
Asterisk main include file. File version handling, generic pbx functions.
static struct ast_variable * realtime_handler(const char *database, const char *table, va_list ap)
Asterisk callback function for RealTime configuration.
#define RES_CONFIG_SQLITE_NAME
static const char config[]
struct ast_category * cat
static int unload_module(void)
#define RES_CONFIG_SQLITE_DRIVER
#define AST_RWLIST_HEAD_STATIC(name, type)
Defines a structure to be used to hold a read/write list of specified type, statically initialized...
static struct sqlite_cache_tables * find_table(const char *tablename)
int ast_cli_unregister_multiple(struct ast_cli_entry *e, int len)
Unregister multiple commands.
#define RES_CONFIG_SQLITE_BEGIN
static int realtime_store_handler(const char *database, const char *table, va_list ap)
Asterisk callback function for RealTime configuration (variable create/store).
#define AST_RWLIST_WRLOCK(head)
Write locks a list.
descriptor for a cli entry.
struct ast_variable * ast_variable_browse(const struct ast_config *config, const char *category)
Goes through variables.
char * ast_str_buffer(const struct ast_str *buf)
Returns the string buffer within the ast_str buf.
static int load_module(void)
#define sql_get_config_table
static char * handle_cli_show_sqlite_status(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
Asterisk callback function for the CLI status command.
#define AST_RWLIST_UNLOCK(head)
Attempts to unlock a read/write based list.
#define AST_DECLARE_APP_ARGS(name, arglist)
Declare a structure to hold an application's arguments.
static void unload_config(void)
Free resources related to configuration.
Structure for variables, used for configurations and for channel variables.
static void free_table(struct sqlite_cache_tables *tblptr)
static int add_rt_cfg_entry(void *arg, int argc, char **argv, char **columnNames)
SQLite callback function for RealTime configuration.
Configuration File Parser.
int ast_str_append(struct ast_str **buf, ssize_t max_len, const char *fmt,...)
Append to a thread local dynamic string.
static struct ast_threadstorage sql_buf
struct ast_str * ast_str_create(size_t init_len)
Create a malloc'ed dynamic length string.
#define AST_LIST_EMPTY(head)
Checks whether the specified list contains any entries.
#define ast_mutex_lock(a)
struct ast_variable * var
#define AST_MODULE_INFO(keystr, flags_to_set, desc, fields...)
void ast_variables_destroy(struct ast_variable *var)
Free variable list.
static int realtime_update2_handler(const char *database, const char *table, va_list ap)
#define AST_RWLIST_HEAD_INIT(head)
Initializes an rwlist head structure.
void ast_cli(int fd, const char *fmt,...)
void ast_config_destroy(struct ast_config *config)
Destroys a config.
static struct ast_config_engine sqlite_engine
Configuration engine structure, used to define realtime drivers.
struct ast_category * ast_category_new(const char *name, const char *in_file, int lineno)
Create a category structure.
#define CONFIG_STATUS_FILEMISSING
void ast_cdr_getvar(struct ast_cdr *cdr, const char *name, char **ret, char *workspace, int workspacelen, int recur, int raw)
int ast_str_set(struct ast_str **buf, ssize_t max_len, const char *fmt,...)
Set a dynamic string using variable arguments.
#define AST_RWLIST_RDLOCK(head)
Read locks a list.
#define ast_asprintf(a, b, c...)
#define ast_debug(level,...)
Log a DEBUG message.
void ast_category_destroy(struct ast_category *cat)
int ast_cdr_register(const char *name, const char *desc, ast_cdrbe be)
Register a CDR handling engine.
static int cli_status_registered
static char * config_table
#define ast_config_load(filename, flags)
Load a config file.
#define AST_RWLIST_TRAVERSE
static struct ast_cli_entry cli_status[]
static int cdr_registered
#define AST_RWLIST_REMOVE_CURRENT
A set of macros to manage forward-linked lists.
#define sql_table_structure
static int check_vars(void)
Core PBX routines and definitions.
#define AST_RWLIST_TRAVERSE_SAFE_BEGIN
struct sqlite_cache_tables::_columns columns
#define ast_strdupa(s)
duplicate a string in memory from the stack
Responsible for call detail data.
static int add_cfg_entry(void *arg, int argc, char **argv, char **columnNames)
SQLite callback function for static configuration.
struct ast_variable * last
#define AST_LIST_INSERT_TAIL(head, elm, field)
Appends a list entry to the tail of a list.
The descriptor of a dynamic string XXX storage will be optimized later if needed We use the ts field ...
void ast_variable_append(struct ast_category *category, struct ast_variable *variable)
char * ast_skip_blanks(const char *str)
Gets a pointer to the first non-whitespace character in a string.
struct sla_ringing_trunk * first
void ast_log(int level, const char *file, int line, const char *function, const char *fmt,...)
Used for sending a log message This is the standard logger function. Probably the only way you will i...
int ast_config_engine_register(struct ast_config_engine *newconfig)
Register config engine.
static char * handle_cli_sqlite_show_tables(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
struct ast_config * ast_config_new(void)
Create a new base configuration structure.
#define AST_RWLIST_REMOVE_HEAD
static struct ast_config * config_handler(const char *database, const char *table, const char *file, struct ast_config *cfg, struct ast_flags flags, const char *suggested_incl, const char *who_asked)
Asterisk callback function for static configuration.
Structure used to handle boolean flags.
static size_t get_params(va_list ap, const char ***params_ptr, const char ***vals_ptr, int warn)
Helper function to parse a va_list object into 2 dynamic arrays of strings, parameters and values...
Support for logging to various files, console and syslog Configuration in file logger.conf.
#define AST_RWLIST_INSERT_TAIL
static int realtime_unload_handler(const char *unused, const char *tablename)
static int realtime_update_handler(const char *database, const char *table, const char *keyfield, const char *entity, va_list ap)
Asterisk callback function for RealTime configuration (variable update).
static char * sql_create_cdr_table
Standard Command Line Interface.
int ast_rq_is_int(require_type type)
Check if require type is an integer type.
#define S_OR(a, b)
returns the equivalent of logic or for strings: first one if not empty, otherwise second one...
#define RES_CONFIG_SQLITE_DESCRIPTION
int ast_cli_register_multiple(struct ast_cli_entry *e, int len)
Register multiple commands.
#define ast_realloc(a, b)
#define SET_VAR(config, to, from)
Application convenience functions, designed to give consistent look and feel to Asterisk apps...
static int load_config(void)
Load the configuration file.
static int realtime_require_handler(const char *database, const char *table, va_list ap)
static int add_rt_multi_cfg_entry(void *arg, int argc, char **argv, char **columnNames)
SQLite callback function for RealTime configuration.
static struct ast_config * realtime_multi_handler(const char *database, const char *table, va_list ap)
Asterisk callback function for RealTime configuration.
#define RES_CONFIG_SQLITE_END(error)
#define AST_APP_ARG(name)
Define an application argument.
struct ast_variable * next
struct ast_str * ast_str_thread_get(struct ast_threadstorage *ts, size_t init_len)
Retrieve a thread locally stored dynamic string.
#define AST_STANDARD_APP_ARGS(args, parse)
Performs the 'standard' argument separation process for an application.
void ast_category_append(struct ast_config *config, struct ast_category *cat)
#define CONFIG_STATUS_FILEINVALID
struct ast_config * ast_config_internal_load(const char *configfile, struct ast_config *cfg, struct ast_flags flags, const char *suggested_incl_file, const char *who_asked)
#define ASTERISK_GPL_KEY
The text the key() function should return.
Asterisk module definitions.
char * strcasestr(const char *, const char *)
require_type
Types used in ast_realtime_require_field.
#define AST_RWLIST_TRAVERSE_SAFE_END
#define AST_MUTEX_DEFINE_STATIC(mutex)
void ast_cdr_unregister(const char *name)
Unregister a CDR handling engine.
struct ast_variable * ast_variable_new(const char *name, const char *value, const char *filename)
#define AST_RWLIST_HEAD(name, type)
Defines a structure to be used to hold a read/write list of specified type.
static int cdr_handler(struct ast_cdr *cdr)
Asterisk callback function for CDR support.
#define ASTERISK_FILE_VERSION(file, version)
Register/unregister a source code file with the core.
int ast_config_engine_deregister(struct ast_config_engine *del)
Deregister config engine.
#define ast_mutex_unlock(a)