Channel Variables. More...
#include "asterisk.h"
#include "asterisk/chanvars.h"
#include "asterisk/strings.h"
#include "asterisk/utils.h"
Go to the source code of this file.
Functions | |
struct ast_var_t * | ast_var_assign (const char *name, const char *value) |
void | ast_var_delete (struct ast_var_t *var) |
const char * | ast_var_full_name (const struct ast_var_t *var) |
const char * | ast_var_name (const struct ast_var_t *var) |
const char * | ast_var_value (const struct ast_var_t *var) |
Channel Variables.
Definition in file chanvars.c.
struct ast_var_t* ast_var_assign | ( | const char * | name, |
const char * | value | ||
) | [read] |
Definition at line 37 of file chanvars.c.
References __ast_calloc(), ast_calloc, ast_copy_string(), ast_var_t::name, ast_var_t::value, and var.
Referenced by acf_iaxvar_write(), add_user_extension(), ast_cdr_copy_vars(), ast_cdr_setvar(), ast_channel_inherit_variables(), ast_iax2_new(), authenticate_reply(), build_extension(), build_profile(), clone_variables(), do_say(), dundi_lookup_local(), frame_set_var(), iax2_dup_variable_datastore(), loopback_subst(), pbx_builtin_pushvar_helper(), pbx_builtin_setvar_helper(), phoneprov_callback(), set_config(), set_timezone_variables(), shared_write(), and socket_process().
{ struct ast_var_t *var; int name_len = strlen(name) + 1; int value_len = strlen(value) + 1; #ifdef MALLOC_DEBUG if (!(var = __ast_calloc(sizeof(*var) + name_len + value_len, sizeof(char), file, lineno, function))) { #else if (!(var = ast_calloc(sizeof(*var) + name_len + value_len, sizeof(char)))) { #endif return NULL; } ast_copy_string(var->name, name, name_len); var->value = var->name + name_len; ast_copy_string(var->value, value, value_len); return var; }
void ast_var_delete | ( | struct ast_var_t * | var | ) |
Definition at line 59 of file chanvars.c.
References ast_free.
Referenced by acf_iaxvar_write(), ast_cdr_free_vars(), ast_cdr_setvar(), ast_channel_free(), delete_extension(), do_say(), dundi_lookup_local(), gosub_release_frame(), loopback_subst(), pbx_builtin_clear_globals(), pbx_builtin_setvar_helper(), profile_destructor(), reload(), shared_variable_free(), shared_write(), sip_removeheader(), and unload_module().
{ if (var) ast_free(var); }
const char* ast_var_full_name | ( | const struct ast_var_t * | var | ) |
Definition at line 80 of file chanvars.c.
References ast_var_t::name.
Referenced by ast_channel_inherit_variables().
{ return (var ? var->name : NULL); }
const char* ast_var_name | ( | const struct ast_var_t * | var | ) |
Definition at line 65 of file chanvars.c.
References ast_var_t::name, and name.
Referenced by ast_cdr_copy_vars(), ast_cdr_getvar_internal(), ast_cdr_serialize_variables(), ast_cdr_setvar(), ast_channel_inherit_variables(), cdr_merge_vars(), clearvar_prefix(), frame_set_var(), gosub_release_frame(), handle_show_globals(), hashkeys_read(), iax2_call(), iax2_dup_variable_datastore(), local_read(), mgcp_call(), ospauth_exec(), ospfinished_exec(), osplookup_exec(), ospnext_exec(), pbx_builtin_getvar_helper(), pbx_builtin_serialize_variables(), pbx_builtin_setvar_helper(), pbx_retrieve_variable(), peek_read(), shared_read(), shared_write(), sip_call(), sip_removeheader(), and transmit_invite().
const char* ast_var_value | ( | const struct ast_var_t * | var | ) |
Definition at line 85 of file chanvars.c.
References ast_var_t::value.
Referenced by ast_cdr_copy_vars(), ast_cdr_getvar_internal(), ast_cdr_serialize_variables(), ast_channel_inherit_variables(), cdr_merge_vars(), handle_show_globals(), iax2_call(), iax2_dup_variable_datastore(), mgcp_call(), ospauth_exec(), ospfinished_exec(), osplookup_exec(), ospnext_exec(), pbx_builtin_getvar_helper(), pbx_builtin_serialize_variables(), pbx_retrieve_variable(), peek_read(), shared_read(), sip_call(), sip_removeheader(), and transmit_invite().
{ return (var ? var->value : NULL); }