111 snprintf(varname,
VAR_SIZE,
"%s_%d", prefix, idx);
200 const char *while_pri =
NULL;
201 char *my_name =
NULL;
204 const char *
prefix =
"WHILE";
206 int used_index_i = -1, x=0;
232 snprintf(used_index,
VAR_SIZE,
"%d", used_index_i);
233 snprintf(new_index,
VAR_SIZE,
"%d", used_index_i + 1);
240 memset(my_name, 0, size);
250 snprintf(varname,
VAR_SIZE,
"%s_%s", prefix, label);
253 snprintf(end_varname,
VAR_SIZE,
"END_%s",varname);
260 const char *goto_str;
263 snprintf(end_varname,
VAR_SIZE,
"END_%s",varname);
271 ast_verb(3,
"Jumping to priority %d\n", pri);
281 if (!end && !while_pri) {
285 memset(goto_str, 0, size);
290 else if (end && while_pri) {
292 snprintf(end_varname,
VAR_SIZE,
"END_%s", varname);
297 memset(goto_str, 0, size);
322 const char *
prefix =
"WHILE", *while_pri=
NULL;
struct ast_party_caller * ast_channel_caller(struct ast_channel *chan)
ast_include: include= support in extensions.conf
int ast_unlock_context(struct ast_context *con)
#define ast_channel_lock(chan)
static char exten[AST_MAX_EXTENSION]
Main Channel structure associated with a channel.
int ast_get_extension_priority(struct ast_exten *exten)
#define AST_MODULE_INFO_STANDARD(keystr, desc)
Asterisk main include file. File version handling, generic pbx functions.
static const char * get_index(struct ast_channel *chan, const char *prefix, int idx)
ast_exten: An extension The dialplan is saved as a linked list with each context having it's own link...
const char * ast_get_context_name(struct ast_context *con)
static int while_start_exec(struct ast_channel *chan, const char *data)
static char * continue_app
const char * ast_get_extension_app(struct ast_exten *e)
static int load_module(void)
int pbx_checkcondition(const char *condition)
Evaluate a condition.
struct ast_context * ast_walk_contexts(struct ast_context *con)
int ast_rdlock_contexts(void)
Read locks the context list.
int ast_unregister_application(const char *app)
Unregister an application.
int ast_channel_priority(const struct ast_channel *chan)
#define ast_verb(level,...)
const char * pbx_builtin_getvar_helper(struct ast_channel *chan, const char *name)
Return a pointer to the value of the corresponding channel variable.
General Asterisk PBX channel definitions.
static int while_continue_exec(struct ast_channel *chan, const char *data)
int ast_parseable_goto(struct ast_channel *chan, const char *goto_string)
static int unload_module(void)
#define S_COR(a, b, c)
returns the equivalent of logic or for strings, with an additional boolean check: second one if not e...
#define ast_strdupa(s)
duplicate a string in memory from the stack
const char * ast_get_extension_cidmatch(struct ast_exten *e)
const char * ast_channel_exten(const struct ast_channel *chan)
Core PBX routines and definitions.
#define ast_alloca(size)
call __builtin_alloca to ensure we get gcc builtin semantics
int ast_context_includes_count(const struct ast_context *con)
int ast_unlock_contexts(void)
Unlocks contexts.
const char * ast_get_extension_name(struct ast_exten *exten)
struct ast_exten * ast_walk_context_extensions(struct ast_context *con, struct ast_exten *priority)
#define ast_channel_unlock(chan)
int ast_extension_match(const char *pattern, const char *extension)
Determine if a given extension matches a given pattern (in NXX format)
int pbx_builtin_setvar_helper(struct ast_channel *chan, const char *name, const char *value)
Add a variable to the channel variable stack, removing the most recently set value for the same name...
int ast_waitfordigit(struct ast_channel *c, int ms)
Waits for a digit.
static int while_exit_exec(struct ast_channel *chan, const char *data)
const char * ast_get_include_name(const struct ast_include *include)
struct ast_exten * ast_walk_extension_priorities(struct ast_exten *exten, struct ast_exten *priority)
static int _while_exec(struct ast_channel *chan, const char *data, int end)
static int while_end_exec(struct ast_channel *chan, const char *data)
const char * ast_channel_context(const struct ast_channel *chan)
static int find_matching_endwhile(struct ast_channel *chan)
#define ASTERISK_GPL_KEY
The text the key() function should return.
void ast_channel_priority_set(struct ast_channel *chan, int value)
int ast_get_extension_matchcid(struct ast_exten *e)
Asterisk module definitions.
static struct ast_exten * find_matching_priority(struct ast_context *c, const char *exten, int priority, const char *callerid)
ast_context: An extension context - must remain in sync with fake_context
const struct ast_include * ast_context_includes_get(const struct ast_context *con, int idx)
#define ast_register_application_xml(app, execute)
Register an application using XML documentation.
int ast_rdlock_context(struct ast_context *con)
Read locks a given context.
static char prefix[MAX_PREFIX]