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
113 *newpattern = strchr(
buf,
'/');
115 *(*newpattern)++ =
'\0';
116 con = strchr(
buf,
'@');
119 pri = strchr(con,
':');
121 pri = strchr(
buf,
':');
171 .description =
"Loopback Dialplan Switch",
Persistent data storage (akin to *doze registry)
Asterisk main include file. File version handling, generic pbx functions.
General Asterisk PBX channel definitions.
#define ast_var_assign(name, value)
void ast_var_delete(struct ast_var_t *var)
Standard Command Line Interface.
Generic File Format Support. Should be included by clients of the file handling routines....
Configuration File Parser.
Asterisk internal frame definitions.
Support for logging to various files, console and syslog Configuration in file logger....
I/O Management (derived from Cheops-NG)
A set of macros to manage forward-linked lists.
#define AST_LIST_HEAD_INIT_NOLOCK(head)
Initializes a list head structure.
#define AST_LIST_INSERT_HEAD(head, elm, field)
Inserts a list entry at the head of a list.
#define AST_LIST_REMOVE_HEAD(head, field)
Removes and returns the head entry from a list.
Asterisk locking-related definitions:
Asterisk module definitions.
#define AST_MODULE_INFO_STANDARD(keystr, desc)
#define ASTERISK_GPL_KEY
The text the key() function should return.
@ AST_MODULE_LOAD_FAILURE
Module could not be loaded properly.
@ AST_MODULE_LOAD_SUCCESS
Core PBX routines and definitions.
void pbx_substitute_variables_varshead(struct varshead *headp, const char *cp1, char *cp2, int count)
void ast_unregister_switch(struct ast_switch *sw)
Unregister an alternative switch.
int ast_register_switch(struct ast_switch *sw)
Register an alternative dialplan switch.
int ast_exists_extension(struct ast_channel *c, const char *context, const char *exten, int priority, const char *callerid)
Determine whether an extension exists.
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.
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)
int ast_extension_match(const char *pattern, const char *extension)
Determine if a given extension matches a given pattern (in NXX format)
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 void loopback_parse(char **newexten, char **newcontext, int *priority, char **newpattern, char *buf)
static int loopback_exists(struct ast_channel *chan, const char *context, const char *exten, int priority, const char *callerid, const char *data)
static struct ast_switch loopback_switch
static int loopback_exec(struct ast_channel *chan, const char *context, const char *exten, int priority, const char *callerid, const char *data)
static char * loopback_subst(char *buf, int buflen, const char *exten, const char *context, int priority, 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)
static int load_module(void)
static int unload_module(void)
static int loopback_canmatch(struct ast_channel *chan, const char *context, const char *exten, int priority, const char *callerid, const char *data)
Scheduler Routines (derived from cheops)
static force_inline int attribute_pure ast_strlen_zero(const char *s)
Main Channel structure associated with a channel.