Asterisk - The Open Source Telephony Project  21.4.1
Functions | Variables
func_db.c File Reference

Functions for interaction with the Asterisk database. More...

#include "asterisk.h"
#include <regex.h>
#include "asterisk/module.h"
#include "asterisk/channel.h"
#include "asterisk/pbx.h"
#include "asterisk/utils.h"
#include "asterisk/app.h"
#include "asterisk/astdb.h"

Go to the source code of this file.

Functions

static void __reg_module (void)
 
static void __unreg_module (void)
 
struct ast_moduleAST_MODULE_SELF_SYM (void)
 
static int function_db_delete (struct ast_channel *chan, const char *cmd, char *parse, char *buf, size_t len)
 
static int function_db_delete_write (struct ast_channel *chan, const char *cmd, char *parse, const char *value)
 Wrapper to execute DB_DELETE from a write operation. Allows execution even if live_dangerously is disabled.
 
static int function_db_exists (struct ast_channel *chan, const char *cmd, char *parse, char *buf, size_t len)
 
static int function_db_keycount (struct ast_channel *chan, const char *cmd, char *parse, char *buf, size_t len)
 
static int function_db_keys (struct ast_channel *chan, const char *cmd, char *parse, struct ast_str **result, ssize_t maxlen)
 
static int function_db_read (struct ast_channel *chan, const char *cmd, char *parse, char *buf, size_t len)
 
static int function_db_write (struct ast_channel *chan, const char *cmd, char *parse, const char *value)
 
static int load_module (void)
 
static int unload_module (void)
 

Variables

static struct ast_module_info __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "Database (astdb) related dialplan functions" , .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 = "da6642af068ee5e6490c5b1d2cc1d238" , .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_DEFAULT, .support_level = AST_MODULE_SUPPORT_CORE, }
 
static const struct ast_module_infoast_module_info = &__mod_info
 
static struct ast_custom_function db_delete_function
 
static struct ast_custom_function db_exists_function
 
static struct ast_custom_function db_function
 
static struct ast_custom_function db_keycount_function
 
static struct ast_custom_function db_keys_function
 

Detailed Description

Functions for interaction with the Asterisk database.

Author
Russell Bryant russe.nosp@m.lb@c.nosp@m.lemso.nosp@m.n.ed.nosp@m.u

Definition in file func_db.c.

Variable Documentation

struct ast_custom_function db_delete_function
static
Initial value:
= {
.name = "DB_DELETE",
.read = function_db_delete,
}
static int function_db_delete_write(struct ast_channel *chan, const char *cmd, char *parse, const char *value)
Wrapper to execute DB_DELETE from a write operation. Allows execution even if live_dangerously is dis...
Definition: func_db.c:398

Definition at line 406 of file func_db.c.

struct ast_custom_function db_exists_function
static
Initial value:
= {
.name = "DB_EXISTS",
.read = function_db_exists,
.read_max = 2,
}

Definition at line 247 of file func_db.c.

struct ast_custom_function db_function
static
Initial value:
= {
.name = "DB",
.read = function_db_read,
.write = function_db_write,
}

Definition at line 209 of file func_db.c.

struct ast_custom_function db_keycount_function
static
Initial value:
= {
.name = "DB_KEYCOUNT",
.read = function_db_keycount,
}

Definition at line 354 of file func_db.c.

struct ast_custom_function db_keys_function
static
Initial value:
= {
.name = "DB_KEYS",
.read2 = function_db_keys,
}

Definition at line 303 of file func_db.c.