52 char key[256],
result[256];
60 snprintf(key,
sizeof(key),
"%s/%s", dest, trimcid);
61 res =
ast_db_get(
"privacy", key, result,
sizeof(result));
63 if (!strcasecmp(result,
"allow"))
65 if (!strcasecmp(result,
"deny"))
67 if (!strcasecmp(result,
"kill"))
69 if (!strcasecmp(result,
"torture"))
100 snprintf(key,
sizeof(key),
"%s/%s", dest, trimcid);
#define AST_PRIVACY_ALLOW
Asterisk locking-related definitions:
Asterisk main include file. File version handling, generic pbx functions.
CallerID (and other GR30) management and generation Includes code and algorithms from the Zapata libr...
Convenient Signal Processing routines.
#define AST_PRIVACY_TORTURE
Persistant data storage (akin to *doze registry)
int ast_privacy_reset(char *dest)
Generic File Format Support. Should be included by clients of the file handling routines. File service providers should instead include mod_format.h.
#define ast_strlen_zero(foo)
General Asterisk PBX channel definitions.
int ast_privacy_check(char *dest, char *cid)
int ast_privacy_set(char *dest, char *cid, int status)
int ast_db_get(const char *family, const char *key, char *value, int valuelen)
Get key value specified by family/key.
#define AST_PRIVACY_UNKNOWN
int ast_db_del(const char *family, const char *key)
Delete entry in astdb.
void ast_copy_string(char *dst, const char *src, size_t size)
Size-limited null-terminating string copy.
int ast_db_put(const char *family, const char *key, const char *value)
Store value addressed by family/key.
void ast_shrink_phone_number(char *n)
Shrink a phone number in place to just digits (more accurately it just removes ()'s, .'s, and -'s...
Persistant data storage (akin to *doze registry)
Application convenience functions, designed to give consistent look and feel to Asterisk apps...
int ast_db_deltree(const char *family, const char *keytree)
Delete one or more entries in astdb.
int ast_callerid_parse(char *instr, char **name, char **location)
Destructively parse inbuf into name and location (or number)