166static char *
synopsis = 
"Syntax: ENUMLOOKUP(number[,Method-type[,options[,record#[,zone-suffix]]]])\n";
 
  181    unsigned int record = 1;
 
  204        args.zone = 
"e164.arpa";
 
  210        record = atoi(
args.record) ? atoi(
args.record) : record;
 
  214    for (s = p = 
args.number; *s; s++) {
 
  216            snprintf(tmp, 
sizeof(tmp), 
"%c", *s);
 
  217            strncat(num, tmp, 
sizeof(num) - strlen(num) - 1);
 
  223    p = strchr(dest, 
':');
 
  224    if (p && strcasecmp(tech, 
"ALL") && !strchr(
args.options, 
'u')) {
 
 
  268    char *parse, tech[128], dest[128];
 
  292        args.zone = 
"e164.zone";
 
  316    datastore->
data = erds;
 
 
  373    erds = datastore->
data;
 
  375    if (!strcasecmp(
args.resultnum, 
"getnum")) {
 
  381    if (sscanf(
args.resultnum, 
"%30u", &num) != 1) {
 
 
  418    .
name = 
"ENUMRESULT",
 
 
  423    .
name = 
"ENUMLOOKUP",
 
 
  428                   char *data, 
char *
buf, 
size_t len)
 
  450        args.zone = 
"e164.arpa";
 
 
  459    .
name = 
"TXTCIDNAME",
 
 
Asterisk main include file. File version handling, generic pbx functions.
#define ast_strdupa(s)
duplicate a string in memory from the stack
#define ast_calloc(num, len)
A wrapper for calloc()
General Asterisk PBX channel definitions.
int ast_channel_datastore_add(struct ast_channel *chan, struct ast_datastore *datastore)
Add a datastore to a channel.
#define ast_channel_lock(chan)
#define ast_channel_unlock(chan)
#define AST_MAX_EXTENSION
struct ast_datastore * ast_channel_datastore_find(struct ast_channel *chan, const struct ast_datastore_info *info, const char *uid)
Find a datastore on a channel.
#define ast_datastore_alloc(info, uid)
int ast_get_txt(struct ast_channel *chan, const char *number, char *txt, int maxtxt, char *suffix)
Lookup DNS TXT record (used by app TXTCIDnum)
int ast_get_enum(struct ast_channel *chan, const char *number, char *location, int maxloc, char *technology, int maxtech, char *suffix, char *options, unsigned int record, struct enum_context **argcontext)
Lookup entry in ENUM.
Generic File Format Support. Should be included by clients of the file handling routines....
static void erds_destroy(struct enum_result_datastore *data)
static struct ast_custom_function txtcidname_function
static struct ast_custom_function enum_query_function
static struct ast_custom_function enum_result_function
static int function_enum(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
static int enum_result_read(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
static void erds_destroy_cb(void *data)
static int load_module(void)
static int enum_query_read(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
static unsigned int enum_datastore_id
static int unload_module(void)
static struct ast_custom_function enum_function
static int function_txtcidname(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
static const struct ast_datastore_info enum_result_datastore_info
static int len(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t buflen)
Application convenience functions, designed to give consistent look and feel to Asterisk apps.
#define AST_APP_ARG(name)
Define an application argument.
#define AST_DECLARE_APP_ARGS(name, arglist)
Declare a structure to hold an application's arguments.
#define AST_STANDARD_APP_ARGS(args, parse)
Performs the 'standard' argument separation process for an application.
Asterisk locking-related definitions:
int ast_atomic_fetchadd_int(volatile int *p, int v)
Atomically add v to *p and return the previous value of *p.
Asterisk module definitions.
#define AST_MODULE_INFO(keystr, flags_to_set, desc, fields...)
@ AST_MODULE_SUPPORT_CORE
#define ASTERISK_GPL_KEY
The text the key() function should return.
Core PBX routines and definitions.
#define ast_custom_function_register(acf)
Register a custom function.
int ast_custom_function_unregister(struct ast_custom_function *acf)
Unregister a custom function.
static force_inline int attribute_pure ast_strlen_zero(const char *s)
void ast_copy_string(char *dst, const char *src, size_t size)
Size-limited null-terminating string copy.
Main Channel structure associated with a channel.
struct ast_tone_zone * zone
Data structure associated with a custom dialplan function.
Structure for a data store type.
Structure for a data store object.
struct enum_naptr_rr * naptr_rrs
struct enum_context * context