73 #define LOOPBACK_COMMON \ 76 char *newexten=(char *)exten, *newcontext=(char *)context; \ 77 int newpriority=priority; \ 78 char *newpattern=NULL; \ 79 loopback_subst(buf, sizeof(buf), exten, context, priority, data); \ 80 loopback_parse(&newexten, &newcontext, &newpriority, &newpattern, buf); \ 81 ast_debug(1, "Parsed into %s @ %s priority %d pattern %s\n", newexten, newcontext, newpriority, newpattern); \ 82 if (!strcasecmp(newcontext, context)) return -1 90 snprintf(tmp,
sizeof(tmp),
"%d", priority);
113 *newpattern = strchr(buf,
'/');
115 *(*newpattern)++ =
'\0';
116 con = strchr(buf,
'@');
119 pri = strchr(con,
':');
121 pri = strchr(buf,
':');
127 sscanf(pri,
"%30d", priority);
171 .description =
"Loopback Dialplan Switch",
int ast_matchmore_extension(struct ast_channel *c, const char *context, const char *exten, int priority, const char *callerid)
Looks to see if adding anything to this extension might match something. (exists ^ canmatch) ...
static char exten[AST_MAX_EXTENSION]
Main Channel structure associated with a channel.
#define AST_MODULE_INFO_STANDARD(keystr, desc)
Asterisk locking-related definitions:
Asterisk main include file. File version handling, generic pbx functions.
static int loopback_exists(struct ast_channel *chan, const char *context, const char *exten, int priority, const char *callerid, const char *data)
static int loopback_canmatch(struct ast_channel *chan, const char *context, const char *exten, int priority, const char *callerid, const char *data)
static int loopback_matchmore(struct ast_channel *chan, const char *context, const char *exten, int priority, const char *callerid, const char *data)
void ast_unregister_switch(struct ast_switch *sw)
Unregister an alternative switch.
static char * loopback_subst(char *buf, int buflen, const char *exten, const char *context, int priority, const char *data)
Generic File Format Support. Should be included by clients of the file handling routines. File service providers should instead include mod_format.h.
I/O Management (derived from Cheops-NG)
int ast_canmatch_extension(struct ast_channel *c, const char *context, const char *exten, int priority, const char *callerid)
Looks for a valid matching extension.
#define ast_strlen_zero(foo)
static void loopback_parse(char **newexten, char **newcontext, int *priority, char **newpattern, char *buf)
Configuration File Parser.
General Asterisk PBX channel definitions.
Scheduler Routines (derived from cheops)
Asterisk internal frame definitions.
A set of macros to manage forward-linked lists.
#define AST_LIST_REMOVE_HEAD(head, field)
Removes and returns the head entry from a list.
int ast_exists_extension(struct ast_channel *c, const char *context, const char *exten, int priority, const char *callerid)
Determine whether an extension exists.
Core PBX routines and definitions.
static int loopback_exec(struct ast_channel *chan, const char *context, const char *exten, int priority, const char *callerid, const char *data)
static int unload_module(void)
void ast_var_delete(struct ast_var_t *var)
static int load_module(void)
#define AST_LIST_INSERT_HEAD(head, elm, field)
Inserts a list entry at the head of a list.
int ast_extension_match(const char *pattern, const char *extension)
Determine if a given extension matches a given pattern (in NXX format)
#define ast_var_assign(name, value)
int ast_register_switch(struct ast_switch *sw)
Register an alternative dialplan switch.
Module could not be loaded properly.
int ast_spawn_extension(struct ast_channel *c, const char *context, const char *exten, int priority, const char *callerid, int *found, int combined_find_spawn)
Launch a new extension (i.e. new stack)
Support for logging to various files, console and syslog Configuration in file logger.conf.
#define AST_LIST_HEAD_INIT_NOLOCK(head)
Initializes a list head structure.
Standard Command Line Interface.
static struct ast_switch loopback_switch
static char context[AST_MAX_CONTEXT]
#define ASTERISK_GPL_KEY
The text the key() function should return.
Asterisk module definitions.
Persistant data storage (akin to *doze registry)
void pbx_substitute_variables_varshead(struct varshead *headp, const char *cp1, char *cp2, int count)