Asterisk - The Open Source Telephony Project
18.5.0
|
#include "asterisk.h"
#include "asterisk/compat.h"
#include "asterisk/paths.h"
#include <errno.h>
#include <time.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <sys/wait.h>
#include <stdarg.h>
#include <string.h>
#include <locale.h>
#include <ctype.h>
#include <err.h>
#include <regex.h>
#include <limits.h>
#include <pthread.h>
#include <netdb.h>
#include <sys/param.h>
#include <signal.h>
#include "asterisk/inline_api.h"
#include "asterisk/endian.h"
#include "asterisk/ast_expr.h"
#include "asterisk/extconf.h"
#include "asterisk/hashtab.h"
#include "asterisk/ael_structs.h"
#include "asterisk/pval.h"
Go to the source code of this file.
Data Structures | |
struct | ast_app |
ast_app: A registered application More... | |
struct | ast_category |
struct | ast_channel |
Main Channel structure associated with a channel. More... | |
struct | ast_comment |
Structure to keep comments for rewriting configuration files. More... | |
struct | ast_config |
struct | ast_config_engine |
Configuration engine structure, used to define realtime drivers. More... | |
struct | ast_config_include |
struct | ast_config_map |
struct | ast_context |
ast_context: An extension context - must remain in sync with fake_context More... | |
struct | ast_custom_function |
Data structure associated with a custom dialplan function. More... | |
struct | ast_exten |
ast_exten: An extension The dialplan is saved as a linked list with each context having it's own linked list of extensions - one item per priority. More... | |
struct | ast_flags |
Structure used to handle boolean flags. More... | |
struct | ast_hint |
Structure for dial plan hints. More... | |
struct | ast_ignorepat |
ast_ignorepat: Ignore patterns in dial plan More... | |
struct | ast_include |
ast_include: include= support in extensions.conf More... | |
struct | ast_state_cb |
ast_state_cb: An extension state notify register item More... | |
struct | ast_sw |
ast_sw: Switch statement in extensions.conf More... | |
struct | ast_switch |
struct | ast_timing |
struct | ast_var_t |
struct | ast_variable |
Structure for variables, used for configurations and for channel variables. More... | |
struct | hints |
struct | store_hint |
struct | store_hints |
struct | varshead |
Macros | |
#define | __AST_MUTEX_DEFINE(scope, mutex) scope ast_mutex_t mutex = AST_MUTEX_INIT_VALUE |
#define | __AST_RWLOCK_DEFINE(scope, rwlock) scope ast_rwlock_t rwlock = AST_RWLOCK_INIT_VALUE |
#define | __LOG_DEBUG 0 |
#define | __LOG_DTMF 6 |
#define | __LOG_ERROR 4 |
#define | __LOG_EVENT 1 |
#define | __LOG_NOTICE 2 |
#define | __LOG_VERBOSE 5 |
#define | __LOG_WARNING 3 |
#define | __MTX_PROF(a) return pthread_mutex_lock((a)) |
#define | _A_ __FILE__, __LINE__, __PRETTY_FUNCTION__ |
#define | _ASTERISK_LOCK_H /* A small indication that this is horribly wrong. */ |
#define | AST_API_MODULE 1 /* gimme the inline defs! */ |
#define | AST_CACHE_DIR_LEN 512 |
#define | AST_DEFAULT_OPTIONS AST_OPT_FLAG_TRANSCODE_VIA_SLIN |
#define | AST_FILENAME_MAX 80 |
#define | ast_fully_booted ast_test_flag(&ast_options, AST_OPT_FLAG_FULLY_BOOTED) |
#define | AST_LIST_APPEND_LIST(head, list, field) |
Appends a whole list to the tail of a list. More... | |
#define | AST_LIST_EMPTY(head) (AST_LIST_FIRST(head) == NULL) |
Checks whether the specified list contains any entries. More... | |
#define | AST_LIST_ENTRY(type) |
Declare a forward link structure inside a list entry. More... | |
#define | AST_LIST_FIRST(head) ((head)->first) |
Returns the first entry contained in a list. More... | |
#define | AST_LIST_HEAD(name, type) |
Defines a structure to be used to hold a list of specified type. More... | |
#define | AST_LIST_HEAD_INIT(head) |
Initializes a list head structure. More... | |
#define | AST_LIST_HEAD_INIT_NOLOCK(head) |
Initializes a list head structure. More... | |
#define | AST_LIST_HEAD_INIT_VALUE |
Defines initial values for a declaration of AST_LIST_HEAD. More... | |
#define | AST_LIST_HEAD_NOLOCK(name, type) |
Defines a structure to be used to hold a list of specified type (with no lock). More... | |
#define | AST_LIST_HEAD_NOLOCK_INIT_VALUE |
Defines initial values for a declaration of AST_LIST_HEAD_NOLOCK. More... | |
#define | AST_LIST_HEAD_NOLOCK_STATIC(name, type) |
Defines a structure to be used to hold a list of specified type, statically initialized. More... | |
#define | AST_LIST_HEAD_SET(head, entry) |
Initializes a list head structure with a specified first entry. More... | |
#define | AST_LIST_HEAD_SET_NOLOCK(head, entry) |
Initializes a list head structure with a specified first entry. More... | |
#define | AST_LIST_HEAD_STATIC(name, type) |
Defines a structure to be used to hold a list of specified type, statically initialized. More... | |
#define | AST_LIST_INSERT_AFTER(head, listelm, elm, field) |
Inserts a list entry after a given entry. More... | |
#define | AST_LIST_INSERT_BEFORE_CURRENT(head, elm, field) |
Inserts a list entry before the current entry during a traversal. More... | |
#define | AST_LIST_INSERT_HEAD(head, elm, field) |
Inserts a list entry at the head of a list. More... | |
#define | AST_LIST_INSERT_TAIL(head, elm, field) |
Appends a list entry to the tail of a list. More... | |
#define | AST_LIST_LAST(head) ((head)->last) |
Returns the last entry contained in a list. More... | |
#define | AST_LIST_NEXT(elm, field) ((elm)->field.next) |
Returns the next entry in the list after the given entry. More... | |
#define | AST_LIST_REMOVE(head, elm, field) |
Removes a specific entry from a list. More... | |
#define | AST_LIST_REMOVE_CURRENT(head, field) |
Removes the current entry from a list during a traversal. More... | |
#define | AST_LIST_REMOVE_HEAD(head, field) |
Removes and returns the head entry from a list. More... | |
#define | AST_LIST_TRAVERSE(head, var, field) for((var) = (head)->first; (var); (var) = (var)->field.next) |
Loops over (traverses) the entries in a list. More... | |
#define | AST_LIST_TRAVERSE_SAFE_BEGIN(head, var, field) |
Loops safely over (traverses) the entries in a list. More... | |
#define | AST_LIST_TRAVERSE_SAFE_END } |
Closes a safe loop traversal block. More... | |
#define | AST_MAX_EXTENSION 80 |
#define | AST_MUTEX_DEFINE_STATIC(mutex) __AST_MUTEX_DEFINE(static, mutex) |
#define | AST_MUTEX_INIT_VALUE ((ast_mutex_t) PTHREAD_MUTEX_INIT_VALUE) |
#define | AST_MUTEX_INITIALIZER __use_AST_MUTEX_DEFINE_STATIC_rather_than_AST_MUTEX_INITIALIZER__ |
#define | AST_MUTEX_KIND PTHREAD_MUTEX_RECURSIVE |
#define | ast_opt_always_fork ast_test_flag(&ast_options, AST_OPT_FLAG_ALWAYS_FORK) |
#define | ast_opt_cache_record_files ast_test_flag(&ast_options, AST_OPT_FLAG_CACHE_RECORD_FILES) |
#define | ast_opt_console ast_test_flag(&ast_options, AST_OPT_FLAG_CONSOLE) |
#define | ast_opt_dont_warn ast_test_flag(&ast_options, AST_OPT_FLAG_DONT_WARN) |
#define | ast_opt_dump_core ast_test_flag(&ast_options, AST_OPT_FLAG_DUMP_CORE) |
#define | ast_opt_exec ast_test_flag(&ast_options, AST_OPT_FLAG_EXEC) |
#define | ast_opt_exec_includes ast_test_flag(&ast_options, AST_OPT_FLAG_EXEC_INCLUDES) |
#define | ast_opt_high_priority ast_test_flag(&ast_options, AST_OPT_FLAG_HIGH_PRIORITY) |
#define | ast_opt_init_keys ast_test_flag(&ast_options, AST_OPT_FLAG_INIT_KEYS) |
#define | ast_opt_mute ast_test_flag(&ast_options, AST_OPT_FLAG_MUTE) |
#define | ast_opt_no_color ast_test_flag(&ast_options, AST_OPT_FLAG_NO_COLOR) |
#define | ast_opt_no_fork ast_test_flag(&ast_options, AST_OPT_FLAG_NO_FORK) |
#define | ast_opt_override_config ast_test_flag(&ast_options, AST_OPT_FLAG_OVERRIDE_CONFIG) |
#define | ast_opt_priority_jumping ast_test_flag(&ast_options, AST_OPT_FLAG_PRIORITY_JUMPING) |
#define | ast_opt_quiet ast_test_flag(&ast_options, AST_OPT_FLAG_QUIET) |
#define | ast_opt_reconnect ast_test_flag(&ast_options, AST_OPT_FLAG_RECONNECT) |
#define | ast_opt_remote ast_test_flag(&ast_options, AST_OPT_FLAG_REMOTE) |
#define | ast_opt_timestamp ast_test_flag(&ast_options, AST_OPT_FLAG_TIMESTAMP) |
#define | ast_opt_transcode_via_slin ast_test_flag(&ast_options, AST_OPT_FLAG_TRANSCODE_VIA_SLIN) |
#define | ast_opt_transmit_silence ast_test_flag(&ast_options, AST_OPT_FLAG_TRANSMIT_SILENCE) |
#define | ast_pthread_mutex_init(pmutex, a) pthread_mutex_init(pmutex,a) |
#define | AST_PTHREADT_NULL (pthread_t) -1 |
#define | AST_PTHREADT_STOP (pthread_t) -2 |
#define | AST_RWLIST_APPEND_LIST AST_LIST_APPEND_LIST |
#define | AST_RWLIST_EMPTY AST_LIST_EMPTY |
#define | AST_RWLIST_ENTRY AST_LIST_ENTRY |
#define | AST_RWLIST_FIRST AST_LIST_FIRST |
#define | AST_RWLIST_HEAD(name, type) |
Defines a structure to be used to hold a read/write list of specified type. More... | |
#define | AST_RWLIST_HEAD_DESTROY(head) |
Destroys an rwlist head structure. More... | |
#define | AST_RWLIST_HEAD_INIT(head) |
Initializes an rwlist head structure. More... | |
#define | AST_RWLIST_HEAD_INIT_VALUE |
Defines initial values for a declaration of AST_RWLIST_HEAD. More... | |
#define | AST_RWLIST_HEAD_SET(head, entry) |
Initializes an rwlist head structure with a specified first entry. More... | |
#define | AST_RWLIST_HEAD_STATIC(name, type) |
Defines a structure to be used to hold a read/write list of specified type, statically initialized. More... | |
#define | AST_RWLIST_INSERT_AFTER AST_LIST_INSERT_AFTER |
#define | AST_RWLIST_INSERT_BEFORE_CURRENT AST_LIST_INSERT_BEFORE_CURRENT |
#define | AST_RWLIST_INSERT_HEAD AST_LIST_INSERT_HEAD |
#define | AST_RWLIST_INSERT_TAIL AST_LIST_INSERT_TAIL |
#define | AST_RWLIST_LAST AST_LIST_LAST |
#define | AST_RWLIST_NEXT AST_LIST_NEXT |
#define | AST_RWLIST_RDLOCK(head) ast_rwlock_rdlock(&(head)->lock) |
Read locks a list. More... | |
#define | AST_RWLIST_REMOVE AST_LIST_REMOVE |
#define | AST_RWLIST_REMOVE_CURRENT AST_LIST_REMOVE_CURRENT |
#define | AST_RWLIST_REMOVE_HEAD AST_LIST_REMOVE_HEAD |
#define | AST_RWLIST_TRAVERSE AST_LIST_TRAVERSE |
#define | AST_RWLIST_TRAVERSE_SAFE_BEGIN AST_LIST_TRAVERSE_SAFE_BEGIN |
#define | AST_RWLIST_TRAVERSE_SAFE_END AST_LIST_TRAVERSE_SAFE_END |
#define | AST_RWLIST_UNLOCK(head) ast_rwlock_unlock(&(head)->lock) |
Attempts to unlock a read/write based list. More... | |
#define | AST_RWLIST_WRLOCK(head) ast_rwlock_wrlock(&(head)->lock) |
Write locks a list. More... | |
#define | AST_RWLOCK_DEFINE_STATIC(rwlock) __AST_RWLOCK_DEFINE(static, rwlock) |
#define | AST_RWLOCK_INIT_VALUE PTHREAD_RWLOCK_INITIALIZER |
#define | ast_set2_flag(p, value, flag) |
#define | ast_test_flag(p, flag) |
#define | ASTMM_LIBC ASTMM_IGNORE |
#define | BACKGROUND_MATCHEXTEN (1 << 2) |
#define | BACKGROUND_NOANSWER (1 << 1) |
#define | BACKGROUND_PLAYBACK (1 << 3) |
#define | BACKGROUND_SKIP (1 << 0) |
#define | CB_INCR 250 |
#define | COMMENT_END "--;" |
#define | COMMENT_META ';' |
#define | COMMENT_START ";--" |
#define | COMMENT_TAG '-' |
#define | DEBUG_M(a) |
#define | EVENTLOG "event_log" |
#define | EXT_DATA_SIZE 8192 |
#define | gethostbyname __gethostbyname__is__not__reentrant__use__ast_gethostbyname__instead__ |
#define | LOG_DEBUG __LOG_DEBUG, _A_ |
#define | LOG_DTMF __LOG_DTMF, _A_ |
#define | LOG_ERROR __LOG_ERROR, _A_ |
#define | LOG_EVENT __LOG_EVENT, _A_ |
#define | LOG_NOTICE __LOG_NOTICE, _A_ |
#define | LOG_VERBOSE __LOG_VERBOSE, _A_ |
#define | LOG_WARNING __LOG_WARNING, _A_ |
#define | MAX_INCLUDE_LEVEL 10 |
#define | MAX_NESTED_COMMENTS 128 |
#define | ONE_MILLION 1000000 |
#define | PRIORITY_HINT -1 |
#define | pthread_cond_t use_ast_cond_t_instead_of_pthread_cond_t |
#define | pthread_create __use_ast_pthread_create_instead__ |
#define | pthread_mutex_init use_ast_mutex_init_instead_of_pthread_mutex_init |
#define | PTHREAD_MUTEX_INIT_VALUE PTHREAD_MUTEX_INITIALIZER |
#define | pthread_mutex_t use_ast_mutex_t_instead_of_pthread_mutex_t |
#define | QUEUELOG "queue_log" |
#define | S_OR(a, b) (!ast_strlen_zero(a) ? (a) : (b)) |
#define | STATUS_NO_CONTEXT 1 |
#define | STATUS_NO_EXTENSION 2 |
#define | STATUS_NO_LABEL 4 |
#define | STATUS_NO_PRIORITY 3 |
#define | STATUS_SUCCESS 5 |
#define | SWITCH_DATA_LENGTH 256 |
#define | VAR_BUF_SIZE 4096 |
#define | VAR_HARDTRAN 3 |
#define | VAR_NORMAL 1 |
#define | VAR_SOFTTRAN 2 |
#define | VERBOSE_PREFIX_1 " " |
#define | VERBOSE_PREFIX_2 " == " |
#define | VERBOSE_PREFIX_3 " -- " |
#define | VERBOSE_PREFIX_4 " > " |
Typedefs | |
typedef pthread_cond_t | ast_cond_t |
typedef pthread_mutex_t | ast_mutex_t |
typedef pthread_rwlock_t | ast_rwlock_t |
typedef int(* | ast_state_cb_type) (char *context, char *id, enum ast_extension_states state, void *data) |
typedef int() | ast_switch_f(struct ast_channel *chan, const char *context, const char *exten, int priority, const char *callerid, const char *data) |
typedef struct ast_config * | config_load_func(const char *database, const char *table, const char *configfile, struct ast_config *config, int withcomments, const char *suggested_include_file) |
typedef struct ast_config * | realtime_multi_get(const char *database, const char *table, va_list ap) |
typedef int | realtime_update(const char *database, const char *table, const char *keyfield, const char *entity, va_list ap) |
typedef struct ast_variable * | realtime_var_get(const char *database, const char *table, va_list ap) |
Functions | |
static struct ast_context * | __ast_context_create (struct ast_context **extcontexts, const char *name, const char *registrar, int existsokay) |
static void | __ast_context_destroy (struct ast_context *con, const char *registrar) |
static int | _extension_match_core (const char *pattern, const char *data, enum ext_match_t mode) |
static void | _null_sig_handler (int sig) |
NULL handler so we can collect the child exit status. More... | |
static int | add_pri (struct ast_context *con, struct ast_exten *tmp, struct ast_exten *el, struct ast_exten *e, int replace) |
add the extension in the priority chain. returns 0 on success, -1 on failure More... | |
static struct ast_comment * | ALLOC_COMMENT (const char *buffer) |
static int | ast_add_extension2 (struct ast_context *con, int replace, const char *extension, int priority, const char *label, const char *callerid, const char *application, void *data, void(*datad)(void *), const char *registrar) |
Main interface to add extensions to the list for out context. More... | |
static int | ast_add_hint (struct ast_exten *e) |
ast_add_hint: Add hint to hint list, check initial extension state More... | |
static unsigned int | ast_app_separate_args (char *buf, char delim, char **array, int arraylen) |
int | ast_atomic_dec_and_test (volatile int *p) |
decrement *p by 1 and return true if the variable has reached 0. Useful e.g. to check if a refcount has reached 0. More... | |
int | ast_atomic_fetchadd_int (volatile int *p, int v) |
Atomically add v to *p and return * the previous value of *p. This can be used to handle reference counts, and the return value can be used to generate unique identifiers. More... | |
int | ast_build_timing (struct ast_timing *i, const char *info_in) |
Construct a timing bitmap, for use in time-based conditionals. More... | |
static void | ast_category_append (struct ast_config *config, struct ast_category *category) |
static char * | ast_category_browse (struct ast_config *config, const char *prev) |
static void | ast_category_destroy (struct ast_category *cat) |
static struct ast_category * | ast_category_get (const struct ast_config *config, const char *category_name) |
static struct ast_category * | ast_category_new (const char *name, const char *in_file, int lineno) |
static int | ast_change_hint (struct ast_exten *oe, struct ast_exten *ne) |
ast_change_hint: Change hint for an extension More... | |
int | ast_check_timing (const struct ast_timing *i) |
Evaluate a pre-constructed bitmap as to whether the current time falls within the range specified. More... | |
static void | ast_config_destroy (struct ast_config *cfg) |
struct ast_category * | ast_config_get_current_category (const struct ast_config *cfg) |
Retrieve the current category name being built. More... | |
static struct ast_config * | ast_config_internal_load (const char *filename, struct ast_config *cfg, int withcomments, const char *suggested_incl_file) |
static struct ast_config * | ast_config_new (void) |
void | ast_config_set_current_category (struct ast_config *cfg, const struct ast_category *cat) |
Set the category within the configuration as being current. More... | |
void | ast_console_puts (const char *string) |
write the string to the root console, and all attached network console clients More... | |
static int | ast_context_add_ignorepat2 (struct ast_context *con, const char *value, const char *registrar) |
static int | ast_context_add_include2 (struct ast_context *con, const char *value, const char *registrar) |
static int | ast_context_add_switch2 (struct ast_context *con, const char *value, const char *data, int eval, const char *registrar) |
static struct ast_context * | ast_context_find (const char *name) |
static struct ast_context * | ast_context_find_or_create (struct ast_context **extcontexts, void *tab, const char *name, const char *registrar) |
int | ast_context_ignorepats_count (struct ast_context *con) |
int | ast_context_includes_count (struct ast_context *con) |
int | ast_context_switches_count (struct ast_context *con) |
static int | ast_context_verify_includes (struct ast_context *con) |
void | ast_copy_string (char *dst, const char *src, size_t size) |
static int | ast_extension_match (const char *pattern, const char *data) |
static int | ast_findlabel_extension2 (struct ast_channel *c, struct ast_context *con, const char *exten, const char *label, const char *callerid) |
static int | ast_func_read (struct ast_channel *chan, const char *function, char *workspace, size_t len) |
static int | ast_func_write (struct ast_channel *chan, const char *function, const char *value) |
static const char * | ast_get_context_name (struct ast_context *con) |
static const char * | ast_get_extension_app (struct ast_exten *e) |
static const char * | ast_get_extension_name (struct ast_exten *exten) |
static struct ast_config_include * | ast_include_find (struct ast_config *conf, const char *included_file) |
static struct ast_config_include * | ast_include_new (struct ast_config *conf, const char *from_file, const char *included_file, int is_exec, const char *exec_file, int from_lineno, char *real_included_file_name, int real_included_file_name_size) |
static void | ast_includes_destroy (struct ast_config_include *incls) |
static void | ast_log (int level, const char *file, int line, const char *function, const char *fmt,...) |
void | ast_log_backtrace (void) |
Log a backtrace of the current thread's execution stack to the Asterisk log. More... | |
void | ast_mark_lock_failed (void *lock_addr) |
Mark the last lock as failed (trylock) More... | |
static void | ast_merge_contexts_and_delete (struct ast_context **extcontexts, const char *registrar) |
static int | ast_mutex_init (ast_mutex_t *pmutex) |
static char * | ast_process_quotes_and_slashes (char *start, char find, char replace_with) |
void | ast_queue_log (const char *queuename, const char *callid, const char *agent, const char *event, const char *fmt,...) |
static int | ast_remove_hint (struct ast_exten *e) |
ast_remove_hint: Remove hint from extension More... | |
void | ast_replace_sigchld (void) |
Replace the SIGCHLD handler. More... | |
static int | ast_rwlock_destroy (ast_rwlock_t *prwlock) |
static int | ast_rwlock_init (ast_rwlock_t *prwlock) |
static int | ast_rwlock_rdlock (ast_rwlock_t *prwlock) |
static int | ast_rwlock_unlock (ast_rwlock_t *prwlock) |
static int | ast_rwlock_wrlock (ast_rwlock_t *prwlock) |
int | ast_safe_system (const char *s) |
Safely spawn an OS shell command while closing file descriptors. More... | |
static void | ast_shrink_phone_number (char *n) |
Clean up phone string remove '(', ' ', ')', non-trailing '.', and '-' not in square brackets. Basically, remove anything that could be invalid in a pattern. More... | |
char * | ast_skip_blanks (const char *str) |
char * | ast_strip (char *s) |
Strip leading/trailing whitespace from a string. More... | |
static force_inline int | ast_strlen_zero (const char *s) |
char * | ast_trim_blanks (char *str) |
Trims trailing whitespace characters from a string. More... | |
static int | ast_true (const char *s) |
struct timeval | ast_tvadd (struct timeval a, struct timeval b) |
Returns the sum of two timevals a + b. More... | |
struct timeval | ast_tvnow (void) |
struct timeval | ast_tvsub (struct timeval a, struct timeval b) |
Returns the difference of two timevals a - b. More... | |
static int | ast_unlock_context (struct ast_context *con) |
static int | ast_unlock_contexts (void) |
void | ast_unreplace_sigchld (void) |
Restore the SIGCHLD handler. More... | |
static struct ast_var_t * | ast_var_assign (const char *name, const char *value) |
static void | ast_var_delete (struct ast_var_t *var) |
static const char * | ast_var_name (const struct ast_var_t *var) |
static const char * | ast_var_value (const struct ast_var_t *var) |
static void | ast_variable_append (struct ast_category *category, struct ast_variable *variable) |
static struct ast_variable * | ast_variable_browse (const struct ast_config *config, const char *category) |
static struct ast_variable * | ast_variable_new (const char *name, const char *value, const char *filename) |
static const char * | ast_variable_retrieve (const struct ast_config *config, const char *category, const char *variable) |
static void | ast_variables_destroy (struct ast_variable *v) |
void | ast_verbose (const char *fmt,...) |
static struct ast_exten * | ast_walk_context_extensions (struct ast_context *con, struct ast_exten *exten) |
static struct ast_ignorepat * | ast_walk_context_ignorepats (struct ast_context *con, struct ast_ignorepat *ip) |
static struct ast_include * | ast_walk_context_includes (struct ast_context *con, struct ast_include *inc) |
static struct ast_sw * | ast_walk_context_switches (struct ast_context *con, struct ast_sw *sw) |
static struct ast_context * | ast_walk_contexts (struct ast_context *con) |
static struct ast_exten * | ast_walk_extension_priorities (struct ast_exten *exten, struct ast_exten *priority) |
static int | ast_wrlock_context (struct ast_context *con) |
static int | ast_wrlock_contexts (void) |
static struct ast_category * | category_get (const struct ast_config *config, const char *category_name, int ignored) |
static void | CB_ADD (char *str) |
static void | CB_ADD_LEN (char *str, int len) |
static void | CB_INIT (void) |
static void | CB_RESET (void) |
static struct ast_config * | config_text_file_load (const char *database, const char *table, const char *filename, struct ast_config *cfg, int withcomments, const char *suggested_include_file) |
static void | destroy_exten (struct ast_exten *e) |
static int | ext_cmp (const char *a, const char *b) |
the full routine to compare extensions in rules. More... | |
static int | ext_cmp1 (const char **p) |
helper functions to sort extensions and patterns in the desired way, so that more specific patterns appear first. More... | |
static int | ext_strncpy (char *dst, const char *src, int len) |
copy a string skipping whitespace More... | |
static int | extension_match_core (const char *pattern, const char *data, enum ext_match_t mode) |
static struct ast_config_engine * | find_engine (const char *family, char *database, int dbsiz, char *table, int tabsiz) |
Find realtime engine for realtime family. More... | |
static void | gen_header (FILE *f1, const char *configfile, const char *fn, const char *generator) |
static unsigned | get_range (char *src, int max, char *const names[], const char *msg) |
helper function to return a range up to max (7, 12, 31 respectively). names, if supplied, is an array of names that should be mapped to numbers. More... | |
static void | get_timerange (struct ast_timing *i, char *times) |
store a bitmask of valid times, one bit each 2 minute More... | |
static int | include_valid (struct ast_include *i) |
static void | inherit_category (struct ast_category *new, const struct ast_category *base) |
static void | LLB_ADD (char *str) |
int | localized_add_extension2 (struct ast_context *con, int replace, const char *extension, int priority, const char *label, const char *callerid, const char *application, void *data, void(*datad)(void *), const char *registrar) |
void | localized_ast_include_rename (struct ast_config *conf, const char *from_file, const char *to_file) |
struct ast_category * | localized_category_get (const struct ast_config *config, const char *category_name) |
struct ast_config * | localized_config_load (const char *filename) |
struct ast_config * | localized_config_load_with_comments (const char *filename) |
int | localized_config_text_file_save (const char *configfile, const struct ast_config *cfg, const char *generator) |
int | localized_context_add_ignorepat2 (struct ast_context *con, const char *value, const char *registrar) |
int | localized_context_add_include2 (struct ast_context *con, const char *value, const char *registrar) |
int | localized_context_add_switch2 (struct ast_context *con, const char *value, const char *data, int eval, const char *registrar) |
void | localized_context_destroy (struct ast_context *con, const char *registrar) |
struct ast_context * | localized_context_find_or_create (struct ast_context **extcontexts, void *tab, const char *name, const char *registrar) |
int | localized_context_verify_includes (struct ast_context *con) |
struct ast_exten * | localized_find_extension (struct ast_context *bypass, struct pbx_find_info *q, const char *context, const char *exten, int priority, const char *label, const char *callerid, enum ext_match_t action) |
void | localized_merge_contexts_and_delete (struct ast_context **extcontexts, void *tab, const char *registrar) |
int | localized_pbx_builtin_setvar (struct ast_channel *chan, const void *data) |
int | localized_pbx_load_module (void) |
void | localized_use_conf_dir (void) |
void | localized_use_local_dir (void) |
struct ast_exten * | localized_walk_context_extensions (struct ast_context *con, struct ast_exten *exten) |
struct ast_include * | localized_walk_context_includes (struct ast_context *con, struct ast_include *inc) |
struct ast_sw * | localized_walk_context_switches (struct ast_context *con, struct ast_sw *sw) |
struct ast_context * | localized_walk_contexts (struct ast_context *con) |
struct ast_exten * | localized_walk_extension_priorities (struct ast_exten *exten, struct ast_exten *priority) |
static int | lookup_name (const char *s, char *const names[], int max) |
Helper for get_range. return the index of the matching entry, starting from 1. If names is not supplied, try numeric values. More... | |
static int | matchcid (const char *cidpattern, const char *callerid) |
static void | move_variables (struct ast_category *old, struct ast_category *new) |
static struct ast_category * | next_available_category (struct ast_category *cat) |
static void | null_datad (void *foo) |
static int | parse_variable_name (char *var, int *offset, int *length, int *isfunc) |
extract offset:length from variable name. Returns 1 if there is a offset:length part, which is trimmed off (values go into variables) More... | |
static int | pbx_builtin_setvar (struct ast_channel *chan, const void *data) |
static void | pbx_builtin_setvar_helper (struct ast_channel *chan, const char *name, const char *value) |
static int | pbx_extension_helper (struct ast_channel *c, struct ast_context *con, const char *context, const char *exten, int priority, const char *label, const char *callerid, enum ext_match_t action) |
The return value depends on the action: More... | |
static struct ast_exten * | pbx_find_extension (struct ast_channel *chan, struct ast_context *bypass, struct pbx_find_info *q, const char *context, const char *exten, int priority, const char *label, const char *callerid, enum ext_match_t action) |
static int | pbx_load_config (const char *config_file) |
static void | pbx_retrieve_variable (struct ast_channel *c, const char *var, char **ret, char *workspace, int workspacelen, struct varshead *headp) |
Support for Asterisk built-in variables in the dialplan. More... | |
static void | pbx_substitute_variables_helper (struct ast_channel *c, const char *cp1, char *cp2, int count) |
static void | pbx_substitute_variables_helper_full (struct ast_channel *c, struct varshead *headp, const char *cp1, char *cp2, int count) |
static int | process_text_line (struct ast_config *cfg, struct ast_category **cat, char *buf, int lineno, const char *configfile, int withcomments, const char *suggested_include_file) |
static void | set_fn (char *fn, int fn_size, const char *file, const char *configfile) |
static char * | substring (const char *value, int offset, int length, char *workspace, size_t workspace_len) |
takes a substring. It is ok to call with value == workspace. More... | |
static struct timeval | tvfix (struct timeval a) |
static struct ast_variable * | variable_clone (const struct ast_variable *old) |
Variables | |
char | ast_defaultlanguage [] |
int | ast_language_is_prefix |
The following variable controls the layout of localized sound files. If 0, use the historical layout with prefix just before the filename (i.e. digits/en/1.gsm , digits/it/1.gsm or default to digits/1.gsm), if 1 put the prefix at the beginning of the filename (i.e. en/digits/1.gsm, it/digits/1.gsm or default to digits/1.gsm). The latter permits a language to be entirely in one directory. More... | |
pid_t | ast_mainpid |
int | ast_option_maxcalls |
double | ast_option_maxload |
struct ast_flags | ast_options = { AST_DEFAULT_OPTIONS } |
static int | autofallthrough_config = 0 |
static int | clearglobalvars_config = 0 |
static char * | comment_buffer |
static int | comment_buffer_size |
static struct ast_config_engine * | config_engine_list |
static char * | config_filename = "extensions.conf" |
static struct ast_config_map * | config_maps = NULL |
static ast_rwlock_t | conlock = { PTHREAD_RWLOCK_INITIALIZER , NULL, {1, 0} } |
static struct ast_context * | contexts = NULL |
char * | days [] |
char | debug_filename [AST_FILENAME_MAX] |
static char * | extconfig_conf = "extconfig.conf" |
static char * | global_registrar = "conf2ael" |
static struct varshead | globals = AST_LIST_HEAD_NOLOCK_INIT_VALUE |
static ast_rwlock_t | globalslock = { PTHREAD_RWLOCK_INITIALIZER , NULL, {1, 0} } |
static struct hints | hints = { .first = NULL, .last = NULL, .lock = { PTHREAD_RWLOCK_INITIALIZER , NULL, {1, 0} } , } |
static char * | lline_buffer |
static int | lline_buffer_size |
static struct ast_context * | local_contexts = NULL |
char * | months [] |
static struct sigaction | null_sig_handler |
int | option_debug |
int | option_verbose |
char | record_cache_dir [AST_CACHE_DIR_LEN] |
static unsigned int | safe_system_level = 0 |
Keep track of how many threads are currently trying to wait*() on a child process. More... | |
static struct sigaction | safe_system_prev_handler |
static int | static_config = 0 |
static struct ast_config_engine | text_file_engine |
static int | use_local_dir = 1 |
static char | userscontext [AST_MAX_EXTENSION] = "default" |
static int | write_protect_config = 1 |
A condensation of the pbx_config stuff, to read into exensions.conf, and provide an interface to the data there, for operations outside of asterisk. A huge, awful hack.
Definition in file extconf.c.
#define __AST_MUTEX_DEFINE | ( | scope, | |
mutex | |||
) | scope ast_mutex_t mutex = AST_MUTEX_INIT_VALUE |
#define __AST_RWLOCK_DEFINE | ( | scope, | |
rwlock | |||
) | scope ast_rwlock_t rwlock = AST_RWLOCK_INIT_VALUE |
#define __MTX_PROF | ( | a | ) | return pthread_mutex_lock((a)) |
#define _ASTERISK_LOCK_H /* A small indication that this is horribly wrong. */ |
#define AST_DEFAULT_OPTIONS AST_OPT_FLAG_TRANSCODE_VIA_SLIN |
#define ast_fully_booted ast_test_flag(&ast_options, AST_OPT_FLAG_FULLY_BOOTED) |
#define AST_LIST_APPEND_LIST | ( | head, | |
list, | |||
field | |||
) |
Appends a whole list to the tail of a list.
head | This is a pointer to the list head structure |
list | This is a pointer to the list to be appended. |
field | This is the name of the field (declared using AST_LIST_ENTRY()) used to link entries of this list together. |
#define AST_LIST_EMPTY | ( | head | ) | (AST_LIST_FIRST(head) == NULL) |
#define AST_LIST_ENTRY | ( | type | ) |
Declare a forward link structure inside a list entry.
type | This is the type of each list entry. |
This macro declares a structure to be used to link list entries together. It must be used inside the definition of the structure named in type, as follows:
The field name list here is arbitrary, and can be anything you wish.
#define AST_LIST_FIRST | ( | head | ) | ((head)->first) |
Returns the first entry contained in a list.
head | This is a pointer to the list head structure |
Definition at line 1706 of file extconf.c.
Referenced by ast_walk_context_switches().
Defines a structure to be used to hold a list of specified type.
name | This will be the name of the defined structure. |
type | This is the type of each list entry. |
This macro creates a structure definition that can be used to hold a list of the entries of type type. It does not actually declare (allocate) a structure; to do that, either follow this macro with the desired name of the instance you wish to declare, or use the specified name to declare instances elsewhere.
Example usage:
This would define struct
entry_list
, and declare an instance of it named entries, all intended to hold a list of type struct
entry
.
#define AST_LIST_HEAD_INIT | ( | head | ) |
Initializes a list head structure.
head | This is a pointer to the list head structure |
This macro initializes a list head structure by setting the head entry to NULL (empty list) and recreating the embedded lock.
#define AST_LIST_HEAD_INIT_NOLOCK | ( | head | ) |
Initializes a list head structure.
head | This is a pointer to the list head structure |
This macro initializes a list head structure by setting the head entry to NULL (empty list). There is no embedded lock handling with this macro.
#define AST_LIST_HEAD_INIT_VALUE |
Defines initial values for a declaration of AST_LIST_HEAD.
Defines a structure to be used to hold a list of specified type (with no lock).
name | This will be the name of the defined structure. |
type | This is the type of each list entry. |
This macro creates a structure definition that can be used to hold a list of the entries of type type. It does not actually declare (allocate) a structure; to do that, either follow this macro with the desired name of the instance you wish to declare, or use the specified name to declare instances elsewhere.
Example usage:
This would define struct
entry_list
, and declare an instance of it named entries, all intended to hold a list of type struct
entry
.
#define AST_LIST_HEAD_NOLOCK_INIT_VALUE |
Defines a structure to be used to hold a list of specified type, statically initialized.
This is the same as AST_LIST_HEAD_STATIC, except without the lock included.
#define AST_LIST_HEAD_SET | ( | head, | |
entry | |||
) |
Initializes a list head structure with a specified first entry.
head | This is a pointer to the list head structure |
entry | pointer to the list entry that will become the head of the list |
This macro initializes a list head structure by setting the head entry to the supplied value and recreating the embedded lock.
#define AST_LIST_HEAD_SET_NOLOCK | ( | head, | |
entry | |||
) |
Initializes a list head structure with a specified first entry.
head | This is a pointer to the list head structure |
entry | pointer to the list entry that will become the head of the list |
This macro initializes a list head structure by setting the head entry to the supplied value.
Defines a structure to be used to hold a list of specified type, statically initialized.
name | This will be the name of the defined structure. |
type | This is the type of each list entry. |
This macro creates a structure definition that can be used to hold a list of the entries of type type, and allocates an instance of it, initialized to be empty.
Example usage:
This would define struct
entry_list
, intended to hold a list of type struct
entry
.
#define AST_LIST_INSERT_AFTER | ( | head, | |
listelm, | |||
elm, | |||
field | |||
) |
Inserts a list entry after a given entry.
head | This is a pointer to the list head structure |
listelm | This is a pointer to the entry after which the new entry should be inserted. |
elm | This is a pointer to the entry to be inserted. |
field | This is the name of the field (declared using AST_LIST_ENTRY()) used to link entries of this list together. |
#define AST_LIST_INSERT_BEFORE_CURRENT | ( | head, | |
elm, | |||
field | |||
) |
Inserts a list entry before the current entry during a traversal.
head | This is a pointer to the list head structure |
elm | This is a pointer to the entry to be inserted. |
field | This is the name of the field (declared using AST_LIST_ENTRY()) used to link entries of this list together. |
#define AST_LIST_INSERT_HEAD | ( | head, | |
elm, | |||
field | |||
) |
Inserts a list entry at the head of a list.
head | This is a pointer to the list head structure |
elm | This is a pointer to the entry to be inserted. |
field | This is the name of the field (declared using AST_LIST_ENTRY()) used to link entries of this list together. |
Definition at line 1957 of file extconf.c.
Referenced by pbx_builtin_setvar_helper().
#define AST_LIST_INSERT_TAIL | ( | head, | |
elm, | |||
field | |||
) |
Appends a list entry to the tail of a list.
head | This is a pointer to the list head structure |
elm | This is a pointer to the entry to be appended. |
field | This is the name of the field (declared using AST_LIST_ENTRY()) used to link entries of this list together. |
Note: The link field in the appended entry is not modified, so if it is actually the head of a list itself, the entire list will be appended temporarily (until the next AST_LIST_INSERT_TAIL is performed).
Definition at line 1977 of file extconf.c.
Referenced by ast_context_add_switch2().
#define AST_LIST_LAST | ( | head | ) | ((head)->last) |
#define AST_LIST_NEXT | ( | elm, | |
field | |||
) | ((elm)->field.next) |
Returns the next entry in the list after the given entry.
elm | This is a pointer to the current entry. |
field | This is the name of the field (declared using AST_LIST_ENTRY()) used to link entries of this list together. |
Definition at line 1724 of file extconf.c.
Referenced by ast_walk_context_switches().
#define AST_LIST_REMOVE | ( | head, | |
elm, | |||
field | |||
) |
Removes a specific entry from a list.
head | This is a pointer to the list head structure |
elm | This is a pointer to the entry to be removed. |
field | This is the name of the field (declared using AST_LIST_ENTRY()) used to link entries of this list together. |
Definition at line 2038 of file extconf.c.
Referenced by pbx_builtin_setvar_helper().
#define AST_LIST_REMOVE_CURRENT | ( | head, | |
field | |||
) |
Removes the current entry from a list during a traversal.
head | This is a pointer to the list head structure |
field | This is the name of the field (declared using AST_LIST_ENTRY()) used to link entries of this list together. |
#define AST_LIST_REMOVE_HEAD | ( | head, | |
field | |||
) |
Removes and returns the head entry from a list.
head | This is a pointer to the list head structure |
field | This is the name of the field (declared using AST_LIST_ENTRY()) used to link entries of this list together. |
Removes the head entry from the list, and returns a pointer to it. This macro is safe to call on an empty list.
Definition at line 2017 of file extconf.c.
Referenced by __ast_context_destroy().
#define AST_LIST_TRAVERSE | ( | head, | |
var, | |||
field | |||
) | for((var) = (head)->first; (var); (var) = (var)->field.next) |
Loops over (traverses) the entries in a list.
head | This is a pointer to the list head structure |
var | This is the name of the variable that will hold a pointer to the current list entry on each iteration. It must be declared before calling this macro. |
field | This is the name of the field (declared using AST_LIST_ENTRY()) used to link entries of this list together. |
This macro is use to loop over (traverse) the entries in a list. It uses a for loop, and supplies the enclosed code with a pointer to each list entry as it loops. It is typically used as follows:
Definition at line 1774 of file extconf.c.
Referenced by ast_context_add_switch2(), pbx_builtin_setvar_helper(), pbx_find_extension(), and pbx_retrieve_variable().
#define AST_LIST_TRAVERSE_SAFE_BEGIN | ( | head, | |
var, | |||
field | |||
) |
Loops safely over (traverses) the entries in a list.
head | This is a pointer to the list head structure |
var | This is the name of the variable that will hold a pointer to the current list entry on each iteration. It must be declared before calling this macro. |
field | This is the name of the field (declared using AST_LIST_ENTRY()) used to link entries of this list together. |
This macro is used to safely loop over (traverse) the entries in a list. It uses a for loop, and supplies the enclosed code with a pointer to each list entry as it loops. It is typically used as follows:
It differs from AST_LIST_TRAVERSE() in that the code inside the loop can modify (or even free, after calling AST_LIST_REMOVE_CURRENT()) the entry pointed to by the current pointer without affecting the loop traversal.
#define AST_LIST_TRAVERSE_SAFE_END } |
#define AST_MUTEX_DEFINE_STATIC | ( | mutex | ) | __AST_MUTEX_DEFINE(static, mutex) |
#define AST_MUTEX_INIT_VALUE ((ast_mutex_t) PTHREAD_MUTEX_INIT_VALUE) |
#define AST_MUTEX_INITIALIZER __use_AST_MUTEX_DEFINE_STATIC_rather_than_AST_MUTEX_INITIALIZER__ |
#define AST_MUTEX_KIND PTHREAD_MUTEX_RECURSIVE |
Definition at line 194 of file extconf.c.
Referenced by ast_mutex_init().
#define ast_opt_always_fork ast_test_flag(&ast_options, AST_OPT_FLAG_ALWAYS_FORK) |
#define ast_opt_cache_record_files ast_test_flag(&ast_options, AST_OPT_FLAG_CACHE_RECORD_FILES) |
#define ast_opt_console ast_test_flag(&ast_options, AST_OPT_FLAG_CONSOLE) |
#define ast_opt_dont_warn ast_test_flag(&ast_options, AST_OPT_FLAG_DONT_WARN) |
Definition at line 1385 of file extconf.c.
Referenced by pbx_load_config().
#define ast_opt_dump_core ast_test_flag(&ast_options, AST_OPT_FLAG_DUMP_CORE) |
#define ast_opt_exec ast_test_flag(&ast_options, AST_OPT_FLAG_EXEC) |
#define ast_opt_exec_includes ast_test_flag(&ast_options, AST_OPT_FLAG_EXEC_INCLUDES) |
Definition at line 1367 of file extconf.c.
Referenced by process_text_line().
#define ast_opt_high_priority ast_test_flag(&ast_options, AST_OPT_FLAG_HIGH_PRIORITY) |
#define ast_opt_init_keys ast_test_flag(&ast_options, AST_OPT_FLAG_INIT_KEYS) |
#define ast_opt_mute ast_test_flag(&ast_options, AST_OPT_FLAG_MUTE) |
#define ast_opt_no_color ast_test_flag(&ast_options, AST_OPT_FLAG_NO_COLOR) |
#define ast_opt_no_fork ast_test_flag(&ast_options, AST_OPT_FLAG_NO_FORK) |
#define ast_opt_override_config ast_test_flag(&ast_options, AST_OPT_FLAG_OVERRIDE_CONFIG) |
#define ast_opt_priority_jumping ast_test_flag(&ast_options, AST_OPT_FLAG_PRIORITY_JUMPING) |
#define ast_opt_quiet ast_test_flag(&ast_options, AST_OPT_FLAG_QUIET) |
#define ast_opt_reconnect ast_test_flag(&ast_options, AST_OPT_FLAG_RECONNECT) |
#define ast_opt_remote ast_test_flag(&ast_options, AST_OPT_FLAG_REMOTE) |
#define ast_opt_timestamp ast_test_flag(&ast_options, AST_OPT_FLAG_TIMESTAMP) |
#define ast_opt_transcode_via_slin ast_test_flag(&ast_options, AST_OPT_FLAG_TRANSCODE_VIA_SLIN) |
#define ast_opt_transmit_silence ast_test_flag(&ast_options, AST_OPT_FLAG_TRANSMIT_SILENCE) |
#define ast_pthread_mutex_init | ( | pmutex, | |
a | |||
) | pthread_mutex_init(pmutex,a) |
#define AST_RWLIST_APPEND_LIST AST_LIST_APPEND_LIST |
#define AST_RWLIST_EMPTY AST_LIST_EMPTY |
#define AST_RWLIST_ENTRY AST_LIST_ENTRY |
#define AST_RWLIST_FIRST AST_LIST_FIRST |
Defines a structure to be used to hold a read/write list of specified type.
name | This will be the name of the defined structure. |
type | This is the type of each list entry. |
This macro creates a structure definition that can be used to hold a list of the entries of type type. It does not actually declare (allocate) a structure; to do that, either follow this macro with the desired name of the instance you wish to declare, or use the specified name to declare instances elsewhere.
Example usage:
This would define struct
entry_list
, and declare an instance of it named entries, all intended to hold a list of type struct
entry
.
#define AST_RWLIST_HEAD_DESTROY | ( | head | ) |
Destroys an rwlist head structure.
head | This is a pointer to the list head structure |
This macro destroys a list head structure by setting the head entry to NULL (empty list) and destroying the embedded lock. It does not free the structure from memory.
#define AST_RWLIST_HEAD_INIT | ( | head | ) |
Initializes an rwlist head structure.
head | This is a pointer to the list head structure |
This macro initializes a list head structure by setting the head entry to NULL (empty list) and recreating the embedded lock.
#define AST_RWLIST_HEAD_INIT_VALUE |
Defines initial values for a declaration of AST_RWLIST_HEAD.
#define AST_RWLIST_HEAD_SET | ( | head, | |
entry | |||
) |
Initializes an rwlist head structure with a specified first entry.
head | This is a pointer to the list head structure |
entry | pointer to the list entry that will become the head of the list |
This macro initializes a list head structure by setting the head entry to the supplied value and recreating the embedded lock.
Defines a structure to be used to hold a read/write list of specified type, statically initialized.
name | This will be the name of the defined structure. |
type | This is the type of each list entry. |
This macro creates a structure definition that can be used to hold a list of the entries of type type, and allocates an instance of it, initialized to be empty.
Example usage:
This would define struct
entry_list
, intended to hold a list of type struct
entry
.
#define AST_RWLIST_INSERT_AFTER AST_LIST_INSERT_AFTER |
#define AST_RWLIST_INSERT_BEFORE_CURRENT AST_LIST_INSERT_BEFORE_CURRENT |
#define AST_RWLIST_INSERT_HEAD AST_LIST_INSERT_HEAD |
Definition at line 1964 of file extconf.c.
Referenced by ast_add_hint().
#define AST_RWLIST_INSERT_TAIL AST_LIST_INSERT_TAIL |
#define AST_RWLIST_LAST AST_LIST_LAST |
#define AST_RWLIST_NEXT AST_LIST_NEXT |
#define AST_RWLIST_RDLOCK | ( | head | ) | ast_rwlock_rdlock(&(head)->lock) |
#define AST_RWLIST_REMOVE AST_LIST_REMOVE |
#define AST_RWLIST_REMOVE_CURRENT AST_LIST_REMOVE_CURRENT |
Definition at line 1847 of file extconf.c.
Referenced by ast_remove_hint().
#define AST_RWLIST_REMOVE_HEAD AST_LIST_REMOVE_HEAD |
#define AST_RWLIST_TRAVERSE AST_LIST_TRAVERSE |
Definition at line 1777 of file extconf.c.
Referenced by ast_add_hint(), ast_change_hint(), and ast_check_timing().
#define AST_RWLIST_TRAVERSE_SAFE_BEGIN AST_LIST_TRAVERSE_SAFE_BEGIN |
Definition at line 1824 of file extconf.c.
Referenced by ast_remove_hint().
#define AST_RWLIST_TRAVERSE_SAFE_END AST_LIST_TRAVERSE_SAFE_END |
Definition at line 1877 of file extconf.c.
Referenced by ast_remove_hint().
#define AST_RWLIST_UNLOCK | ( | head | ) | ast_rwlock_unlock(&(head)->lock) |
Attempts to unlock a read/write based list.
head | This is a pointer to the list head structure |
This macro attempts to remove a read or write lock from the list head structure pointed to by head. If the list was not locked by this thread, this macro has no effect.
#define AST_RWLIST_WRLOCK | ( | head | ) | ast_rwlock_wrlock(&(head)->lock) |
#define AST_RWLOCK_DEFINE_STATIC | ( | rwlock | ) | __AST_RWLOCK_DEFINE(static, rwlock) |
#define ASTMM_LIBC ASTMM_IGNORE |
#define CB_INCR 250 |
#define COMMENT_META ';' |
Definition at line 699 of file extconf.c.
Referenced by config_text_file_load().
#define COMMENT_TAG '-' |
Definition at line 700 of file extconf.c.
Referenced by config_text_file_load().
#define gethostbyname __gethostbyname__is__not__reentrant__use__ast_gethostbyname__instead__ |
#define LOG_DEBUG __LOG_DEBUG, _A_ |
Definition at line 121 of file extconf.c.
Referenced by __ast_context_create(), __ast_context_destroy(), ast_add_extension2(), ast_add_hint(), ast_merge_contexts_and_delete(), config_text_file_load(), localized_config_text_file_save(), pbx_extension_helper(), and pbx_substitute_variables_helper_full().
#define LOG_DTMF __LOG_DTMF, _A_ |
#define LOG_ERROR __LOG_ERROR, _A_ |
Definition at line 145 of file extconf.c.
Referenced by ast_func_read(), config_text_file_load(), and process_text_line().
#define LOG_EVENT __LOG_EVENT, _A_ |
#define LOG_NOTICE __LOG_NOTICE, _A_ |
Definition at line 133 of file extconf.c.
Referenced by pbx_extension_helper(), and pbx_substitute_variables_helper_full().
#define LOG_VERBOSE __LOG_VERBOSE, _A_ |
#define LOG_WARNING __LOG_WARNING, _A_ |
Definition at line 139 of file extconf.c.
Referenced by __ast_context_create(), _extension_match_core(), add_pri(), ast_config_internal_load(), ast_context_verify_includes(), ast_include_new(), ast_merge_contexts_and_delete(), ast_safe_system(), config_text_file_load(), ext_cmp1(), find_engine(), get_range(), get_timerange(), pbx_builtin_setvar(), pbx_extension_helper(), pbx_find_extension(), pbx_load_config(), process_text_line(), and tvfix().
#define MAX_INCLUDE_LEVEL 10 |
Definition at line 895 of file extconf.c.
Referenced by ast_config_new().
#define MAX_NESTED_COMMENTS 128 |
Definition at line 696 of file extconf.c.
Referenced by config_text_file_load().
#define ONE_MILLION 1000000 |
Definition at line 2262 of file extconf.c.
Referenced by ast_tvadd(), ast_tvsub(), and tvfix().
#define PRIORITY_HINT -1 |
Special Priority for a hint
Definition at line 2083 of file extconf.c.
Referenced by add_pri(), ast_add_extension2(), destroy_exten(), and pbx_load_config().
#define pthread_cond_t use_ast_cond_t_instead_of_pthread_cond_t |
#define pthread_mutex_init use_ast_mutex_init_instead_of_pthread_mutex_init |
Definition at line 501 of file extconf.c.
Referenced by ast_mutex_init().
#define PTHREAD_MUTEX_INIT_VALUE PTHREAD_MUTEX_INITIALIZER |
#define pthread_mutex_t use_ast_mutex_t_instead_of_pthread_mutex_t |
Definition at line 957 of file extconf.c.
Referenced by pbx_load_config().
#define STATUS_NO_CONTEXT 1 |
Definition at line 2450 of file extconf.c.
Referenced by pbx_extension_helper(), and pbx_find_extension().
#define STATUS_NO_EXTENSION 2 |
Definition at line 2451 of file extconf.c.
Referenced by pbx_extension_helper(), and pbx_find_extension().
#define STATUS_NO_LABEL 4 |
Definition at line 2453 of file extconf.c.
Referenced by pbx_extension_helper(), and pbx_find_extension().
#define STATUS_NO_PRIORITY 3 |
Definition at line 2452 of file extconf.c.
Referenced by pbx_extension_helper(), and pbx_find_extension().
#define STATUS_SUCCESS 5 |
Definition at line 2454 of file extconf.c.
Referenced by pbx_find_extension().
#define SWITCH_DATA_LENGTH 256 |
Definition at line 3612 of file extconf.c.
Referenced by ast_context_add_switch2().
#define VAR_BUF_SIZE 4096 |
Definition at line 2320 of file extconf.c.
Referenced by pbx_substitute_variables_helper_full().
#define VERBOSE_PREFIX_2 " == " |
Definition at line 101 of file extconf.c.
Referenced by config_text_file_load(), localized_config_text_file_save(), and pbx_builtin_setvar_helper().
#define VERBOSE_PREFIX_3 " -- " |
Definition at line 102 of file extconf.c.
Referenced by __ast_context_create(), ast_add_extension2(), ast_context_add_include2(), and ast_context_add_switch2().
typedef pthread_cond_t ast_cond_t |
typedef pthread_mutex_t ast_mutex_t |
typedef pthread_rwlock_t ast_rwlock_t |
typedef int(* ast_state_cb_type) (char *context, char *id, enum ast_extension_states state, void *data) |
typedef int() ast_switch_f(struct ast_channel *chan, const char *context, const char *exten, int priority, const char *callerid, const char *data) |
typedef struct ast_config* config_load_func(const char *database, const char *table, const char *configfile, struct ast_config *config, int withcomments, const char *suggested_include_file) |
typedef struct ast_config* realtime_multi_get(const char *database, const char *table, va_list ap) |
typedef struct ast_variable* realtime_var_get(const char *database, const char *table, va_list ap) |
enum ast_extension_states |
Definition at line 2085 of file extconf.c.
enum ast_option_flags |
Definition at line 1309 of file extconf.c.
|
static |
Definition at line 4708 of file extconf.c.
References ast_calloc, ast_log(), ast_mutex_init(), ast_rwlock_init(), ast_unlock_contexts(), ast_verbose(), ast_wrlock_contexts(), contexts, ast_context::ignorepats, ast_context::includes, ast_context::lock, LOG_DEBUG, LOG_WARNING, ast_context::macrolock, ast_context::name, ast_context::next, NULL, registrar, ast_context::registrar, ast_context::root, tmp(), and VERBOSE_PREFIX_3.
Referenced by ast_context_find_or_create(), and localized_context_find_or_create().
|
static |
Definition at line 5504 of file extconf.c.
References AST_LIST_REMOVE_HEAD, ast_log(), ast_rwlock_destroy(), ast_unlock_context(), ast_wrlock_context(), destroy_exten(), el, free(), localized_context_destroy(), LOG_DEBUG, ast_context::name, ast_include::next, ast_ignorepat::next, ast_exten::next, ast_context::next, NULL, ast_exten::peer, and tmp().
Referenced by ast_merge_contexts_and_delete(), and localized_context_destroy().
|
static |
Definition at line 4193 of file extconf.c.
References ast_log(), E_MATCH, E_MATCH_MASK, E_MATCHMORE, end, LOG_WARNING, and NULL.
Referenced by extension_match_core().
|
static |
|
static |
add the extension in the priority chain. returns 0 on success, -1 on failure
Definition at line 3677 of file extconf.c.
References ast_add_hint(), ast_change_hint(), ast_log(), ast_exten::data, ast_exten::datad, ast_exten::exten, free(), LOG_WARNING, ast_context::name, ast_exten::next, NULL, ast_exten::peer, ast_exten::priority, PRIORITY_HINT, ast_context::root, and tmp().
Referenced by ast_add_extension2().
|
static |
Definition at line 877 of file extconf.c.
References ast_calloc, ast_comment::cmt, ast_config_map::next, and ast_channel::x.
Referenced by process_text_line().
|
static |
Main interface to add extensions to the list for out context.
We sort extensions in order of matching preference, so that we can stop the search as soon as we find a suitable match. This ordering also takes care of wildcards such as '.' (meaning "one or more of any character") and '!' (which is 'earlymatch', meaning "zero or more of any character" but also impacts the return value from CANMATCH and EARLYMATCH.
The extension match rules defined in the devmeeting 2006.05.05 are quite simple: WE SELECT THE LONGEST MATCH. In detail, "longest" means the number of matched characters in the extension. In case of ties (e.g. _XXX and 333) in the length of a pattern, we give priority to entries with the smallest cardinality (e.g, [5-9] comes before [2-8] before the former has only 5 elements, while the latter has 7, etc. In case of same cardinality, the first element in the range counts. If we still have a tie, any final '!' will make this as a possibly less specific pattern.
EBUSY - can't lock EEXIST - extension with the same priority exist and no replace is set
Definition at line 4776 of file extconf.c.
References add_pri(), ast_exten::app, ast_add_hint(), ast_calloc, ast_log(), ast_verbose(), ast_exten::cidmatch, ast_channel::data, ast_exten::data, ast_exten::datad, el, errno, ext_cmp(), ext_strncpy(), ast_exten::exten, ast_exten::label, localized_add_extension2(), LOG_DEBUG, ast_exten::matchcid, ast_context::name, ast_exten::next, NULL, null_datad(), ast_exten::parent, priority, ast_exten::priority, PRIORITY_HINT, registrar, ast_exten::registrar, ast_context::root, ast_exten::stuff, tmp(), and VERBOSE_PREFIX_3.
Referenced by localized_add_extension2(), and pbx_load_config().
|
static |
ast_add_hint: Add hint to hint list, check initial extension state
Definition at line 3644 of file extconf.c.
References ast_calloc, ast_get_extension_app(), ast_get_extension_name(), ast_log(), AST_RWLIST_INSERT_HEAD, AST_RWLIST_TRAVERSE, ast_hint::exten, and LOG_DEBUG.
Referenced by add_pri(), and ast_add_extension2().
|
static |
Definition at line 2488 of file extconf.c.
References buf, paren, and quote().
Referenced by pbx_builtin_setvar().
int ast_atomic_dec_and_test | ( | volatile int * | p | ) |
decrement *p by 1 and return true if the variable has reached 0. Useful e.g. to check if a refcount has reached 0.
Definition at line 634 of file extconf.c.
References a, ast_atomic_fetchadd_int(), ast_channel_lock, ast_channel_trylock, ast_channel_unlock, AST_INLINE_API, and SIZEOF_INT.
Referenced by ast_atomic_fetchadd_int().
int ast_atomic_fetchadd_int | ( | volatile int * | p, |
int | v | ||
) |
Atomically add v to *p and return * the previous value of *p. This can be used to handle reference counts, and the return value can be used to generate unique identifiers.
Definition at line 593 of file extconf.c.
References ast_atomic_dec_and_test(), AST_INLINE_API, HAVE_GCC_ATOMICS, and SIZEOF_INT.
Referenced by ast_atomic_dec_and_test().
int ast_build_timing | ( | struct ast_timing * | i, |
const char * | info_in | ||
) |
Construct a timing bitmap, for use in time-based conditionals.
i | Pointer to an ast_timing structure. |
info | Standard string containing a timerange, weekday range, monthday range, and month range, as well as an optional timezone. |
Returns | 1 on success or 0 on failure. |
/brief Build timing
/param i info /param info_in
Definition at line 3808 of file extconf.c.
References ast_strdup, ast_strdupa, ast_strlen_zero(), ast_timing::daymask, ast_timing::dowmask, get_range(), get_timerange(), sip_to_pjsip::info(), ast_timing::monthmask, NULL, strsep(), and ast_timing::timezone.
Referenced by ast_context_add_include2(), iftime(), include_alloc(), pbx_builtin_execiftime(), and pbx_builtin_gotoiftime().
|
static |
Definition at line 2835 of file extconf.c.
References ast_category_destroy(), ast_config::current, ast_config::last, ast_category::next, and ast_config::root.
Referenced by inherit_category(), and process_text_line().
|
static |
Definition at line 3328 of file extconf.c.
References ast_config_set_current_category(), ast_config::last_browse, ast_category::name, ast_category::next, next_available_category(), NULL, and ast_config::root.
Referenced by pbx_load_config().
|
static |
Definition at line 2847 of file extconf.c.
References ast_variables_destroy(), ast_category::file, free(), and ast_category::root.
Referenced by ast_category_append(), and process_text_line().
|
static |
Definition at line 1211 of file extconf.c.
References category_get().
Referenced by ast_variable_browse().
|
static |
Definition at line 2790 of file extconf.c.
References ast_calloc, ast_copy_string(), ast_category::file, ast_category::lineno, localized_category_get(), ast_category::name, and strdup.
Referenced by ast_config_get_current_category(), and process_text_line().
ast_change_hint: Change hint for an extension
Definition at line 3627 of file extconf.c.
References AST_RWLIST_TRAVERSE, and ast_hint::exten.
Referenced by add_pri().
int ast_check_timing | ( | const struct ast_timing * | i | ) |
Evaluate a pre-constructed bitmap as to whether the current time falls within the range specified.
i | Pointer to an ast_timing structure. |
Returns | 1, if the time matches or 0, if the current time falls outside of the specified range. |
Definition at line 4002 of file extconf.c.
References AST_RWLIST_TRAVERSE, ast_walk_contexts(), ast_switch::list, ast_switch::name, and pbx_findswitch().
Referenced by ext_strncpy(), iftime(), include_valid(), and pbx_builtin_execiftime().
|
static |
Definition at line 1290 of file extconf.c.
References ast_includes_destroy(), ast_variables_destroy(), free(), ast_config::includes, ast_category::next, ast_category::root, and ast_config::root.
Referenced by localized_config_load(), localized_config_load_with_comments(), pbx_load_config(), and process_text_line().
struct ast_category* ast_config_get_current_category | ( | const struct ast_config * | cfg | ) |
Retrieve the current category name being built.
API for backend configuration engines while building a configuration set.
Definition at line 2783 of file extconf.c.
References ast_category_new(), ast_config::current, and ast_channel::name.
Referenced by config_curl(), config_odbc(), config_text_file_load(), and find_engine().
|
static |
Definition at line 2864 of file extconf.c.
References ast_log(), db, find_engine(), ast_config::include_level, ast_config_engine::load_func, LOG_WARNING, ast_config::max_include_level, NULL, result, table, and text_file_engine.
Referenced by localized_config_load(), localized_config_load_with_comments(), and process_text_line().
|
static |
Definition at line 3276 of file extconf.c.
References ast_calloc, config, localized_config_load(), ast_config::max_include_level, and MAX_INCLUDE_LEVEL.
Referenced by config_text_file_load(), localized_config_load(), and localized_config_load_with_comments().
void ast_config_set_current_category | ( | struct ast_config * | cfg, |
const struct ast_category * | cat | ||
) |
Set the category within the configuration as being current.
API for backend configuration engines while building a configuration set.
Definition at line 3364 of file extconf.c.
References ast_config::current.
Referenced by ast_category_browse().
void ast_console_puts | ( | const char * | string | ) |
write the string to the root console, and all attached network console clients
Definition at line 1314 of file asterisk.c.
References ast_network_puts().
|
static |
Definition at line 4569 of file extconf.c.
References ast_calloc, errno, ast_context::ignorepats, localized_context_add_ignorepat2(), ast_ignorepat::next, NULL, ast_ignorepat::pattern, ast_ignorepat::registrar, and registrar.
Referenced by localized_context_add_ignorepat2(), localized_context_add_include2(), and pbx_load_config().
|
static |
Definition at line 4503 of file extconf.c.
References ast_build_timing(), ast_calloc, ast_get_context_name(), ast_verbose(), c, errno, free(), ast_include::hastime, ast_context::includes, localized_context_add_include2(), ast_include::name, ast_include::next, NULL, ast_include::registrar, registrar, ast_include::rname, ast_include::stuff, ast_include::timing, and VERBOSE_PREFIX_3.
Referenced by ast_get_context_name(), localized_context_add_include2(), and pbx_load_config().
|
static |
Definition at line 4641 of file extconf.c.
References ast_context::alts, ast_calloc, ast_get_context_name(), AST_LIST_INSERT_TAIL, AST_LIST_TRAVERSE, ast_verbose(), ast_sw::data, errno, ast_sw::eval, free(), ast_sw::list, localized_context_add_switch2(), ast_sw::name, ast_sw::registrar, registrar, ast_sw::stuff, SWITCH_DATA_LENGTH, ast_sw::tmpdata, and VERBOSE_PREFIX_3.
Referenced by ast_unlock_context(), localized_context_add_switch2(), and pbx_load_config().
|
static |
Definition at line 4174 of file extconf.c.
References ast_walk_contexts(), ast_context::name, NULL, and tmp().
Referenced by ast_context_switches_count(), and ast_context_verify_includes().
|
static |
Definition at line 4983 of file extconf.c.
References __ast_context_create(), and localized_context_find_or_create().
Referenced by pbx_load_config().
int ast_context_ignorepats_count | ( | struct ast_context * | con | ) |
Definition at line 4125 of file extconf.c.
References ast_walk_context_ignorepats(), ast_walk_context_switches(), c, and NULL.
Referenced by ast_walk_context_ignorepats().
int ast_context_includes_count | ( | struct ast_context * | con | ) |
Definition at line 4092 of file extconf.c.
References ast_walk_context_includes(), c, localized_walk_context_includes(), and NULL.
Referenced by ast_walk_context_includes().
int ast_context_switches_count | ( | struct ast_context * | con | ) |
Definition at line 4159 of file extconf.c.
References ast_context_find(), ast_walk_context_switches(), c, and NULL.
Referenced by localized_walk_context_switches().
|
static |
Definition at line 5623 of file extconf.c.
References ast_context_find(), ast_get_context_name(), ast_log(), ast_walk_context_includes(), localized_context_verify_includes(), LOG_WARNING, NULL, and ast_include::rname.
Referenced by localized_context_verify_includes(), and localized_pbx_load_module().
void ast_copy_string | ( | char * | dst, |
const char * | src, | ||
size_t | size | ||
) |
Definition at line 970 of file extconf.c.
Referenced by ast_category_new(), ast_var_assign(), ast_variable_new(), config_text_file_load(), find_engine(), gen_header(), pbx_load_config(), pbx_retrieve_variable(), pbx_substitute_variables_helper_full(), set_fn(), and substring().
|
static |
Definition at line 4297 of file extconf.c.
References E_MATCH, and extension_match_core().
Referenced by extension_match_core(), and matchcid().
|
static |
Definition at line 4978 of file extconf.c.
References E_FINDLABEL, NULL, and pbx_extension_helper().
Referenced by pbx_extension_helper(), and pbx_load_config().
|
static |
Definition at line 4996 of file extconf.c.
References ast_log(), and LOG_ERROR.
Referenced by pbx_substitute_variables_helper_full().
|
static |
Definition at line 2480 of file extconf.c.
Referenced by pbx_builtin_setvar_helper().
|
static |
Definition at line 4488 of file extconf.c.
References ast_context_add_include2(), ast_context::name, NULL, registrar, and value.
Referenced by ast_context_add_include2(), ast_context_add_switch2(), and ast_context_verify_includes().
|
static |
Definition at line 3614 of file extconf.c.
References ast_exten::app, and NULL.
Referenced by ast_add_hint().
|
static |
Definition at line 3619 of file extconf.c.
References ast_exten::exten, and NULL.
Referenced by ast_add_hint().
|
static |
Definition at line 1164 of file extconf.c.
References ast_variable_append(), ast_config_include::included_file, ast_config::includes, ast_config_include::next, and ast_channel::x.
Referenced by ast_include_new().
|
static |
Definition at line 1075 of file extconf.c.
References ast_calloc, ast_include_find(), ast_log(), ast_strdup, ast_strlen_zero(), ast_config_include::exec, ast_config_include::exec_file, ast_config_include::include_location_file, ast_config_include::include_location_lineno, ast_config_include::included_file, ast_config::includes, ast_config_include::inclusion_count, LOG_WARNING, and ast_config_include::next.
Referenced by process_text_line().
|
static |
Definition at line 1274 of file extconf.c.
References ast_config_include::exec_file, free(), ast_config_include::include_location_file, ast_config_include::included_file, and ast_config_include::next.
Referenced by ast_config_destroy().
|
static |
Definition at line 2195 of file extconf.c.
Referenced by __ast_context_create(), __ast_context_destroy(), _extension_match_core(), add_pri(), ast_add_extension2(), ast_add_hint(), ast_config_internal_load(), ast_context_verify_includes(), ast_func_read(), ast_include_new(), ast_merge_contexts_and_delete(), ast_safe_system(), config_text_file_load(), ext_cmp1(), find_engine(), get_range(), get_timerange(), localized_config_text_file_save(), pbx_builtin_setvar(), pbx_extension_helper(), pbx_find_extension(), pbx_load_config(), pbx_substitute_variables_helper_full(), process_text_line(), and tvfix().
void ast_log_backtrace | ( | void | ) |
Log a backtrace of the current thread's execution stack to the Asterisk log.
Definition at line 2158 of file logger.c.
References __LOG_ERROR, ast_bt::addresses, ast_bt_create, ast_bt_destroy, ast_bt_free_symbols, ast_bt_get_symbols, ast_free, ast_log(), ast_log_safe(), ast_str_append(), ast_str_buffer(), ast_str_create, AST_VECTOR_GET, AST_VECTOR_SIZE, buf, LOG_ERROR, LOG_WARNING, NULL, and ast_bt::num_frames.
void ast_mark_lock_failed | ( | void * | lock_addr | ) |
Mark the last lock as failed (trylock)
Definition at line 2314 of file extconf.c.
Referenced by __ast_pthread_mutex_trylock(), __ast_rwlock_tryrdlock(), __ast_rwlock_trywrlock(), and ast_tvsub().
|
static |
Definition at line 5573 of file extconf.c.
References __ast_context_destroy(), ast_log(), ast_unlock_contexts(), ast_wrlock_contexts(), contexts, LOG_DEBUG, LOG_WARNING, ast_context::name, ast_context::next, NULL, ast_context::registrar, and tmp().
Referenced by localized_merge_contexts_and_delete(), and localized_pbx_load_module().
|
inlinestatic |
Definition at line 469 of file extconf.c.
References AST_MUTEX_KIND, and pthread_mutex_init.
Referenced by __ast_context_create().
|
static |
void ast_queue_log | ( | const char * | queuename, |
const char * | callid, | ||
const char * | agent, | ||
const char * | event, | ||
const char * | fmt, | ||
... | |||
) |
Definition at line 894 of file logger.c.
References args, AST_APP_ARG, ast_check_realtime(), AST_DECLARE_APP_ARGS, ast_localtime(), AST_NONSTANDARD_APP_ARGS, ast_realtime_require_field(), AST_RWLIST_RDLOCK, AST_RWLIST_UNLOCK, ast_store_realtime(), ast_strftime(), ast_tvnow(), logfiles, logger_initialized, logger_queue_start(), NULL, queuelog_init, RQ_CHAR, S_OR, and SENTINEL.
Referenced by logger_queue_start(), and reload_logger().
|
static |
ast_remove_hint: Remove hint from extension
Definition at line 3735 of file extconf.c.
References AST_RWLIST_REMOVE_CURRENT, AST_RWLIST_TRAVERSE_SAFE_BEGIN, AST_RWLIST_TRAVERSE_SAFE_END, ast_hint::callbacks, ast_hint::exten, free(), ast_state_cb::next, and NULL.
Referenced by destroy_exten().
void ast_replace_sigchld | ( | void | ) |
Replace the SIGCHLD handler.
Normally, Asterisk has a SIGCHLD handler that is cleaning up all zombie processes from forking elsewhere in Asterisk. However, if you want to wait*() on the process to retrieve information about it's exit status, then this signal handler needs to be temporarily replaced.
Code that executes this function must call ast_unreplace_sigchld() after it is finished doing the wait*().
Definition at line 801 of file extconf.c.
References ast_unreplace_sigchld(), and safe_system_prev_handler.
Referenced by ast_safe_fork(), and ast_safe_system().
|
inlinestatic |
Definition at line 529 of file extconf.c.
Referenced by __ast_context_destroy().
|
inlinestatic |
Definition at line 516 of file extconf.c.
Referenced by __ast_context_create().
|
inlinestatic |
Definition at line 539 of file extconf.c.
Referenced by pbx_retrieve_variable().
|
inlinestatic |
Definition at line 534 of file extconf.c.
Referenced by ast_unlock_context(), ast_unlock_contexts(), and pbx_retrieve_variable().
|
inlinestatic |
Definition at line 544 of file extconf.c.
Referenced by ast_wrlock_context(), and ast_wrlock_contexts().
int ast_safe_system | ( | const char * | s | ) |
Safely spawn an OS shell command while closing file descriptors.
s | - OS shell command string to execute. |
Definition at line 829 of file extconf.c.
References ast_log(), ast_replace_sigchld(), ast_unreplace_sigchld(), errno, LOG_WARNING, NULL, status, WEXITSTATUS, WIFEXITED, and ast_channel::x.
Referenced by add_email_attachment(), alarmreceiver_exec(), ast_monitor_stop(), AST_TEST_DEFINE(), ast_unreplace_sigchld(), convert_bdb_to_sqlite3(), mixmonitor_thread(), notify_message(), process_text_line(), rotate_file(), run_externnotify(), sendmail(), sendpage(), system_exec_helper(), and vm_change_password_shell().
|
static |
Clean up phone string remove '(', ' ', ')', non-trailing '.', and '-' not in square brackets. Basically, remove anything that could be invalid in a pattern.
Definition at line 2137 of file extconf.c.
References ast_channel::x.
Referenced by pbx_load_config().
char* ast_skip_blanks | ( | const char * | str | ) |
Definition at line 979 of file extconf.c.
References str.
Referenced by ast_trim_blanks(), pbx_load_config(), and process_text_line().
char* ast_strip | ( | char * | s | ) |
Strip leading/trailing whitespace from a string.
s | The string to be stripped (will be modified). |
This functions strips all leading and trailing whitespace characters from the input string, and returns a pointer to the resulting string. The string is modified in place.
Definition at line 1024 of file extconf.c.
Referenced by config_text_file_load(), and process_text_line().
|
static |
Definition at line 952 of file extconf.c.
Referenced by ast_build_timing(), ast_include_new(), ast_true(), config_text_file_load(), get_range(), get_timerange(), matchcid(), pbx_builtin_setvar(), pbx_substitute_variables_helper_full(), and process_text_line().
char* ast_trim_blanks | ( | char * | str | ) |
Trims trailing whitespace characters from a string.
ast_trim_blanks | function being used |
str | the input string |
Definition at line 1005 of file extconf.c.
References ast_skip_blanks().
|
static |
Definition at line 2245 of file extconf.c.
References ast_strlen_zero().
Referenced by pbx_load_config().
struct timeval ast_tvadd | ( | struct timeval | a, |
struct timeval | b | ||
) |
Returns the sum of two timevals a + b.
Definition at line 2283 of file extconf.c.
References a, ONE_MILLION, and tvfix().
Referenced by __get_from_jb(), acf_jabberreceive_read(), ast_audiohook_trigger_wait(), ast_bridge_channel_feature_digit(), ast_bridge_interval_hook(), ast_channel_cmpwhentohangup_tv(), ast_channel_setwhentohangup_tv(), ast_poll2(), ast_rtp_dtmf_begin(), ast_rtp_dtmf_end_with_duration(), ast_rtp_ice_turn_request(), ast_rtp_sendcng(), ast_sched_runq(), ast_sip_sched_task_get_times2(), ast_sip_schedule_task(), ast_smoother_read(), AST_TEST_DEFINE(), ast_translate(), bridge_builtin_set_limits(), bridge_channel_handle_interval(), bridge_sync_wait(), calc_rxstamp(), calc_timestamp(), cli_show_tasks(), cli_tps_ping(), conf_run(), consumer_should_stay(), dial_exec_full(), do_cdr(), do_timing(), drop_packets_data_update(), expire_objects_from_cache(), handle_keepalive_message(), handler_wait_for_message(), hook_event_cb(), iax2_process_thread(), ice_reset_session(), jb_get_and_deliver(), jitterbuffer_frame_get_ntp_timestamp(), make_deadline(), mb_poll_thread(), monmp3thread(), mp3_exec(), mwi_monitor_handler(), NBScat_exec(), register_aor_core(), rtp_deallocate_transport(), run_task(), sched_run(), sched_settime(), schedule_cache_expiration(), schedule_delivery(), set_timeout(), sla_process_timers(), smdi_message_wait(), sorcery_memory_cache_print_object(), subscription_persistence_update(), timeout_write(), user_event_wait_for_events(), and wait_for_stimulus().
struct timeval ast_tvnow | ( | void | ) |
struct timeval ast_tvsub | ( | struct timeval | a, |
struct timeval | b | ||
) |
Returns the difference of two timevals a - b.
Definition at line 2298 of file extconf.c.
References a, ast_mark_lock_failed(), ONE_MILLION, and tvfix().
Referenced by action_login(), ast_poll2(), ast_sched_dump(), AST_TEST_DEFINE(), ast_translate(), ast_waitfor_nandfds(), calc_rxstamp(), calc_timestamp(), cli_tps_ping(), conf_run(), debug_check_frame_for_silence(), handle_showcalls(), handle_showuptime(), jitterbuffer_frame_get_ntp_timestamp(), memory_cache_stale_check_object(), object_stale_callback(), and publish_fully_booted().
|
static |
Definition at line 4626 of file extconf.c.
References ast_context_add_switch2(), ast_rwlock_unlock(), and ast_context::lock.
Referenced by __ast_context_destroy().
|
static |
Definition at line 4616 of file extconf.c.
References ast_rwlock_unlock(), and conlock.
Referenced by __ast_context_create(), ast_merge_contexts_and_delete(), and localized_context_destroy().
void ast_unreplace_sigchld | ( | void | ) |
Restore the SIGCHLD handler.
This function is called after a call to ast_replace_sigchld. It restores the SIGCHLD handler that cleans up any zombie processes.
Definition at line 815 of file extconf.c.
References ast_safe_system(), NULL, safe_system_level, and safe_system_prev_handler.
Referenced by ast_replace_sigchld(), ast_safe_fork_cleanup(), ast_safe_system(), and AST_TEST_DEFINE().
|
static |
Definition at line 2456 of file extconf.c.
References ast_calloc, ast_copy_string(), ast_var_t::name, NULL, ast_var_t::value, and var.
Referenced by pbx_builtin_setvar_helper().
|
static |
|
static |
Definition at line 2171 of file extconf.c.
References ast_var_t::name, ast_channel::name, and NULL.
Referenced by pbx_builtin_setvar_helper(), and pbx_retrieve_variable().
|
static |
Definition at line 5028 of file extconf.c.
References NULL, and ast_var_t::value.
Referenced by pbx_retrieve_variable().
|
static |
Definition at line 1178 of file extconf.c.
References category_get(), config, ast_category::ignored, ast_category::last, ast_variable::next, and ast_category::root.
Referenced by ast_include_find(), inherit_category(), move_variables(), and process_text_line().
|
static |
Definition at line 1216 of file extconf.c.
References ast_category_get(), ast_config::last_browse, ast_category::name, NULL, and ast_category::root.
Referenced by ast_variable_retrieve(), and pbx_load_config().
|
static |
Definition at line 1056 of file extconf.c.
References ast_calloc, ast_copy_string(), ast_variable::file, ast_variable::name, ast_variable::stuff, and ast_variable::value.
Referenced by process_text_line(), and variable_clone().
|
static |
Definition at line 1228 of file extconf.c.
References ast_variable_browse(), ast_variable::name, ast_variable::next, ast_category::next, NULL, ast_category::root, ast_config::root, and ast_variable::value.
Referenced by pbx_load_config().
|
static |
Definition at line 1263 of file extconf.c.
References free(), and ast_variable::next.
Referenced by ast_category_destroy(), and ast_config_destroy().
void ast_verbose | ( | const char * | fmt, |
... | |||
) |
Definition at line 2207 of file extconf.c.
Referenced by __ast_context_create(), acl_change_stasis_cb(), add_codec_to_sdp(), add_noncodec_to_sdp(), add_sdp(), add_tcodec_to_sdp(), add_vcodec_to_sdp(), alsa_answer(), alsa_call(), alsa_digit(), alsa_hangup(), alsa_indicate(), alsa_text(), ao2_weakproxy_unsubscribe(), ast_add_extension2(), ast_agi_send(), ast_ari_callback(), ast_context_add_include2(), ast_context_add_switch2(), ast_remotecontrol(), ast_rtcp_calculate_sr_rr_statistics(), ast_rtcp_interpret(), ast_rtp_dtmf_begin(), ast_rtp_dtmf_continuation(), ast_rtp_dtmf_end_with_duration(), ast_rtp_read(), ast_rtp_sendcng(), ast_stun_handle_packet(), astman_append(), astman_flush(), bridge_p2p_rtp_write(), can_safely_quit(), chan_misdn_log(), check_peer_ok(), check_via(), conf_run(), config_text_file_load(), console_answer(), dahdi_softhangup_all(), do_register_auth(), dundi_debug_output(), get_also_info(), get_destination(), get_rdnis(), get_refer_info(), handle_clear_alarms(), handle_cli_misdn_send_facility(), handle_incoming(), handle_request_do(), handle_request_info(), handle_request_invite(), handle_request_message(), handle_request_refer(), handle_request_subscribe(), handle_response(), handle_transfer_button(), hook_event_cb(), iax_debug_output(), initialize_initreq(), ivr_demo_func(), jb_debug_output(), load_module(), localized_config_text_file_save(), log_action(), logging_on_rx_msg(), logging_on_tx_msg(), match_filter(), mgcp_reload(), oss_answer(), oss_call(), oss_digit_end(), oss_hangup(), oss_indicate(), oss_text(), pbx_builtin_setvar_helper(), phone_check_exception(), phone_exception(), print_frame(), print_intro_message(), process_dtmf_rfc2833(), process_sdp(), process_sdp_a_audio(), process_sdp_a_text(), process_sdp_a_video(), process_sdp_o(), receive_message(), retrans_pkt(), rtp_raw_write(), run_agi(), send_request(), send_response(), set_destination(), sip_auth_headers(), sip_pvt_dtor(), sip_reload(), sip_route_dump(), sip_scheddestroy_full(), sip_sendtext(), stasis_app_message_handler(), stun_process_attr(), timing_read(), transmit_register(), use_reason_header(), xmpp_log_hook(), and xmpp_pubsub_receive_node_list().
|
static |
Definition at line 4042 of file extconf.c.
References localized_walk_context_extensions(), ast_exten::next, NULL, and ast_context::root.
Referenced by localized_walk_context_extensions(), localized_walk_contexts(), and pbx_find_extension().
|
static |
Definition at line 4115 of file extconf.c.
References ast_context_ignorepats_count(), ast_context::ignorepats, ast_ignorepat::next, and NULL.
Referenced by ast_context_ignorepats_count(), and localized_walk_context_includes().
|
static |
Definition at line 4082 of file extconf.c.
References ast_context_includes_count(), ast_context::includes, ast_include::next, and NULL.
Referenced by ast_context_includes_count(), ast_context_verify_includes(), localized_walk_context_includes(), and localized_walk_extension_priorities().
|
static |
Definition at line 4141 of file extconf.c.
References ast_context::alts, AST_LIST_FIRST, AST_LIST_NEXT, ast_sw::list, localized_walk_context_switches(), and NULL.
Referenced by ast_context_ignorepats_count(), ast_context_switches_count(), and localized_walk_context_switches().
|
static |
Definition at line 4026 of file extconf.c.
References contexts, localized_walk_contexts(), and ast_context::next.
Referenced by ast_check_timing(), ast_context_find(), localized_pbx_load_module(), localized_walk_contexts(), and pbx_find_extension().
|
static |
Definition at line 4063 of file extconf.c.
References exten, localized_walk_extension_priorities(), and ast_exten::peer.
Referenced by localized_walk_context_extensions(), localized_walk_extension_priorities(), and pbx_find_extension().
|
static |
Definition at line 4621 of file extconf.c.
References ast_rwlock_wrlock(), and ast_context::lock.
Referenced by __ast_context_destroy().
|
static |
Definition at line 4611 of file extconf.c.
References ast_rwlock_wrlock(), and conlock.
Referenced by __ast_context_create(), ast_merge_contexts_and_delete(), and localized_context_destroy().
|
static |
Definition at line 1193 of file extconf.c.
References ast_category::ignored, ast_category::name, ast_category::next, NULL, and ast_config::root.
Referenced by ast_category_get(), ast_variable_append(), localized_category_get(), and process_text_line().
|
static |
Definition at line 737 of file extconf.c.
References ast_realloc, and CB_INCR.
Referenced by config_text_file_load().
|
static |
Definition at line 750 of file extconf.c.
References ast_realloc, and CB_INCR.
Referenced by config_text_file_load().
|
static |
Definition at line 718 of file extconf.c.
References ast_malloc, and CB_INCR.
Referenced by config_text_file_load().
|
static |
|
static |
Definition at line 3121 of file extconf.c.
References ast_config_AST_CONFIG_DIR, ast_config_get_current_category(), ast_config_new(), ast_copy_string(), ast_log(), ast_strip(), ast_strlen_zero(), ast_verbose(), buf, CB_ADD(), CB_ADD_LEN(), CB_INIT(), comment, COMMENT_META, COMMENT_TAG, errno, free(), ast_config::include_level, LLB_ADD(), LOG_DEBUG, LOG_ERROR, LOG_WARNING, MAX_NESTED_COMMENTS, NULL, process_text_line(), and VERBOSE_PREFIX_2.
|
static |
Definition at line 3767 of file extconf.c.
References ast_remove_hint(), ast_exten::data, ast_exten::datad, free(), ast_exten::priority, and PRIORITY_HINT.
Referenced by __ast_context_destroy().
|
static |
the full routine to compare extensions in rules.
Definition at line 3946 of file extconf.c.
References ext_cmp1().
Referenced by ast_add_extension2().
|
static |
helper functions to sort extensions and patterns in the desired way, so that more specific patterns appear first.
ext_cmp1 compares individual characters (or sets of), returning an int where bits 0-7 are the ASCII code of the first char in the set, while bit 8-15 are the cardinality of the set minus 1. This way more specific patterns (smaller cardinality) appear first. Wildcards have a special value, so that we can directly compare them to sets by subtracting the two values. In particular: 0x000xx one character, xx 0x0yyxx yy character set starting with xx 0x10000 '.' (one or more of anything) 0x20000 '!' (zero or more of anything) 0x30000 NUL (end of string) 0x40000 error in set. The pointer to the string is advanced according to needs. NOTES:
Definition at line 3874 of file extconf.c.
References ast_log(), c, end, LOG_WARNING, and NULL.
Referenced by ext_cmp().
|
static |
copy a string skipping whitespace
Definition at line 3973 of file extconf.c.
References ast_check_timing().
Referenced by ast_add_extension2().
|
static |
Definition at line 4288 of file extconf.c.
References _extension_match_core(), and ast_extension_match().
Referenced by ast_extension_match(), and pbx_find_extension().
|
static |
Find realtime engine for realtime family.
Definition at line 2749 of file extconf.c.
References ast_config_get_current_category(), ast_copy_string(), ast_log(), config_maps, ast_config_map::database, ast_config_map::driver, LOG_WARNING, map, ast_config_map::name, ast_config_engine::next, ast_config_map::next, NULL, and ast_config_map::table.
Referenced by ast_config_internal_load().
|
static |
Definition at line 3390 of file extconf.c.
References ast_copy_string().
Referenced by localized_config_text_file_save().
|
static |
helper function to return a range up to max (7, 12, 31 respectively). names, if supplied, is an array of names that should be mapped to numbers.
Definition at line 2640 of file extconf.c.
References ast_log(), ast_strlen_zero(), end, LOG_WARNING, lookup_name(), and strsep().
Referenced by ast_build_timing().
|
static |
store a bitmask of valid times, one bit each 2 minute
Definition at line 2684 of file extconf.c.
References ast_log(), ast_strlen_zero(), LOG_WARNING, ast_timing::minmask, strsep(), and ast_channel::x.
Referenced by ast_build_timing().
|
inlinestatic |
Definition at line 4313 of file extconf.c.
References ast_check_timing(), ast_include::hastime, ast_exten::label, pbx_find_extension(), and ast_include::timing.
Referenced by pbx_find_extension().
|
static |
Definition at line 2825 of file extconf.c.
References ast_category_append(), ast_variable_append(), ast_variable::next, ast_category::root, var, and variable_clone().
Referenced by process_text_line().
|
static |
Definition at line 764 of file extconf.c.
References ast_realloc, and CB_INCR.
Referenced by config_text_file_load().
int localized_add_extension2 | ( | struct ast_context * | con, |
int | replace, | ||
const char * | extension, | ||
int | priority, | ||
const char * | label, | ||
const char * | callerid, | ||
const char * | application, | ||
void * | data, | ||
void(*)(void *) | datad, | ||
const char * | registrar | ||
) |
Definition at line 4898 of file extconf.c.
References ast_add_extension2(), and ast_exten::datad.
Referenced by ast_add_extension2().
void localized_ast_include_rename | ( | struct ast_config * | conf, |
const char * | from_file, | ||
const char * | to_file | ||
) |
Definition at line 1111 of file extconf.c.
References ast_variable::file, ast_category::file, free(), ast_config_include::include_location_file, ast_config::includes, ast_variable::next, ast_category::next, ast_config_include::next, ast_category::root, ast_config::root, and strdup.
struct ast_category* localized_category_get | ( | const struct ast_config * | config, |
const char * | category_name | ||
) |
Definition at line 2803 of file extconf.c.
References category_get().
Referenced by ast_category_new().
struct ast_config* localized_config_load | ( | const char * | filename | ) |
Definition at line 3287 of file extconf.c.
References ast_config_destroy(), ast_config_internal_load(), ast_config_new(), localized_config_load_with_comments(), NULL, and result.
Referenced by ast_config_new(), and pbx_load_config().
struct ast_config* localized_config_load_with_comments | ( | const char * | filename | ) |
Definition at line 3305 of file extconf.c.
References ast_config_destroy(), ast_config_internal_load(), ast_config_new(), NULL, and result.
Referenced by localized_config_load().
int localized_config_text_file_save | ( | const char * | configfile, |
const struct ast_config * | cfg, | ||
const char * | generator | ||
) |
Definition at line 3423 of file extconf.c.
References ast_log(), ast_verbose(), ast_variable::blanklines, ast_comment::cmt, errno, ast_config_include::exec, ast_config_include::exec_file, ast_variable::file, ast_category::file, gen_header(), ast_config_include::include_location_file, ast_config_include::include_location_lineno, ast_config_include::included_file, ast_config::includes, ast_variable::lineno, ast_category::lineno, LOG_DEBUG, ast_variable::name, ast_category::name, ast_comment::next, ast_variable::next, ast_category::next, ast_config_include::next, ast_variable::object, ast_config_include::output, ast_variable::precomments, ast_category::precomments, ast_category::root, ast_config::root, ast_variable::sameline, ast_category::sameline, set_fn(), ast_variable::value, var, and VERBOSE_PREFIX_2.
Referenced by set_fn().
int localized_context_add_ignorepat2 | ( | struct ast_context * | con, |
const char * | value, | ||
const char * | registrar | ||
) |
Definition at line 4601 of file extconf.c.
References ast_context_add_ignorepat2().
Referenced by ast_context_add_ignorepat2().
int localized_context_add_include2 | ( | struct ast_context * | con, |
const char * | value, | ||
const char * | registrar | ||
) |
Definition at line 4559 of file extconf.c.
References ast_context_add_ignorepat2(), and ast_context_add_include2().
Referenced by ast_context_add_include2().
int localized_context_add_switch2 | ( | struct ast_context * | con, |
const char * | value, | ||
const char * | data, | ||
int | eval, | ||
const char * | registrar | ||
) |
Definition at line 4702 of file extconf.c.
References ast_context_add_switch2().
Referenced by ast_context_add_switch2().
void localized_context_destroy | ( | struct ast_context * | con, |
const char * | registrar | ||
) |
Definition at line 5565 of file extconf.c.
References __ast_context_destroy(), ast_unlock_contexts(), and ast_wrlock_contexts().
Referenced by __ast_context_destroy(), and ast_context_destroy().
struct ast_context* localized_context_find_or_create | ( | struct ast_context ** | extcontexts, |
void * | tab, | ||
const char * | name, | ||
const char * | registrar | ||
) |
Definition at line 4989 of file extconf.c.
References __ast_context_create().
Referenced by ast_context_find_or_create().
int localized_context_verify_includes | ( | struct ast_context * | con | ) |
Definition at line 5640 of file extconf.c.
References ast_context_verify_includes(), and localized_pbx_load_module().
Referenced by ast_context_verify_includes().
struct ast_exten* localized_find_extension | ( | struct ast_context * | bypass, |
struct pbx_find_info * | q, | ||
const char * | context, | ||
const char * | exten, | ||
int | priority, | ||
const char * | label, | ||
const char * | callerid, | ||
enum ext_match_t | action | ||
) |
Definition at line 4470 of file extconf.c.
References NULL, and pbx_find_extension().
Referenced by pbx_find_extension().
void localized_merge_contexts_and_delete | ( | struct ast_context ** | extcontexts, |
void * | tab, | ||
const char * | registrar | ||
) |
Definition at line 5618 of file extconf.c.
References ast_merge_contexts_and_delete().
Referenced by ast_merge_contexts_and_delete().
int localized_pbx_builtin_setvar | ( | struct ast_channel * | chan, |
const void * | data | ||
) |
Definition at line 2607 of file extconf.c.
References pbx_builtin_setvar().
Referenced by pbx_builtin_setvar().
int localized_pbx_load_module | ( | void | ) |
Definition at line 5647 of file extconf.c.
References ast_context_verify_includes(), ast_merge_contexts_and_delete(), ast_walk_contexts(), ast_context::name, NULL, and pbx_load_config().
Referenced by check_goto(), check_pval_item(), localized_context_verify_includes(), and main().
void localized_use_conf_dir | ( | void | ) |
void localized_use_local_dir | ( | void | ) |
struct ast_exten* localized_walk_context_extensions | ( | struct ast_context * | con, |
struct ast_exten * | exten | ||
) |
Definition at line 4053 of file extconf.c.
References ast_walk_context_extensions(), and ast_walk_extension_priorities().
Referenced by ast_walk_context_extensions(), and main().
struct ast_include* localized_walk_context_includes | ( | struct ast_context * | con, |
struct ast_include * | inc | ||
) |
Definition at line 4106 of file extconf.c.
References ast_walk_context_ignorepats(), and ast_walk_context_includes().
Referenced by ast_context_includes_count().
struct ast_sw* localized_walk_context_switches | ( | struct ast_context * | con, |
struct ast_sw * | sw | ||
) |
Definition at line 4152 of file extconf.c.
References ast_context_switches_count(), and ast_walk_context_switches().
Referenced by ast_walk_context_switches(), and main().
struct ast_context* localized_walk_contexts | ( | struct ast_context * | con | ) |
Definition at line 4032 of file extconf.c.
References ast_walk_context_extensions(), and ast_walk_contexts().
Referenced by ast_walk_contexts(), and main().
struct ast_exten* localized_walk_extension_priorities | ( | struct ast_exten * | exten, |
struct ast_exten * | priority | ||
) |
Definition at line 4071 of file extconf.c.
References ast_walk_context_includes(), and ast_walk_extension_priorities().
Referenced by ast_walk_extension_priorities(), and main().
|
static |
Helper for get_range. return the index of the matching entry, starting from 1. If names is not supplied, try numeric values.
Definition at line 2617 of file extconf.c.
Referenced by get_range().
|
static |
Definition at line 4302 of file extconf.c.
References ast_extension_match(), and ast_strlen_zero().
Referenced by pbx_find_extension().
|
static |
Definition at line 2808 of file extconf.c.
References ast_variable_append(), ast_variable::next, NULL, ast_category::root, and var.
Referenced by process_text_line().
|
static |
Definition at line 3321 of file extconf.c.
References ast_category::ignored, and ast_category::next.
Referenced by ast_category_browse().
|
static |
|
static |
extract offset:length from variable name. Returns 1 if there is a offset:length part, which is trimmed off (values go into variables)
Definition at line 5006 of file extconf.c.
References var.
Referenced by pbx_retrieve_variable(), and pbx_substitute_variables_helper_full().
|
static |
Definition at line 2570 of file extconf.c.
References ast_app_separate_args(), ast_log(), ast_strdupa, ast_strlen_zero(), ast_channel::data, global, localized_pbx_builtin_setvar(), LOG_WARNING, ast_channel::name, NULL, pbx_builtin_setvar_helper(), value, and ast_channel::x.
Referenced by localized_pbx_builtin_setvar().
|
static |
Definition at line 2530 of file extconf.c.
References ast_func_write(), AST_LIST_INSERT_HEAD, AST_LIST_REMOVE, AST_LIST_TRAVERSE, ast_strdupa, ast_var_assign(), ast_var_delete(), ast_var_name(), ast_verbose(), globals, ast_channel::name, and VERBOSE_PREFIX_2.
Referenced by pbx_builtin_setvar(), and pbx_load_config().
|
static |
The return value depends on the action:
E_MATCH, E_CANMATCH, E_MATCHMORE require a real match, and return 0 on failure, -1 on match; E_FINDLABEL maps the label to a priority, and returns the priority on success, ... XXX E_SPAWN, spawn an application, and return 0 on success, -1 on failure.
Definition at line 4917 of file extconf.c.
References ast_findlabel_extension2(), ast_log(), c, pbx_find_info::data, E_CANMATCH, E_FINDLABEL, E_MATCH, E_MATCHMORE, ast_switch::exec, pbx_find_info::foundcontext, LOG_DEBUG, LOG_NOTICE, LOG_WARNING, ast_switch::name, NULL, pbx_find_extension(), ast_exten::priority, pbx_find_info::stacklen, pbx_find_info::status, STATUS_NO_CONTEXT, STATUS_NO_EXTENSION, STATUS_NO_LABEL, STATUS_NO_PRIORITY, and pbx_find_info::swo.
Referenced by ast_findlabel_extension2().
|
static |
Definition at line 4334 of file extconf.c.
References ast_context::alts, AST_LIST_TRAVERSE, ast_log(), AST_PBX_MAX_STACK, ast_walk_context_extensions(), ast_walk_contexts(), ast_walk_extension_priorities(), ast_switch::canmatch, ast_exten::cidmatch, context, ast_sw::data, pbx_find_info::data, E_CANMATCH, E_FINDLABEL, E_MATCHMORE, ast_sw::eval, ast_switch::exists, ast_exten::exten, extension_match_core(), pbx_find_info::foundcontext, include_valid(), ast_context::includes, pbx_find_info::incstack, ast_exten::label, localized_find_extension(), LOG_WARNING, match(), ast_exten::matchcid, matchcid(), ast_switch::matchmore, ast_sw::name, ast_context::name, ast_include::next, NULL, pbx_findswitch(), ast_exten::priority, ast_include::rname, pbx_find_info::stacklen, pbx_find_info::status, STATUS_NO_CONTEXT, STATUS_NO_EXTENSION, STATUS_NO_LABEL, STATUS_NO_PRIORITY, STATUS_SUCCESS, pbx_find_info::swo, tmp(), ast_sw::tmpdata, and ast_channel::x.
Referenced by include_valid(), localized_find_extension(), and pbx_extension_helper().
|
static |
Definition at line 5339 of file extconf.c.
References ast_channel::appl, ast_add_extension2(), ast_category_browse(), ast_config_destroy(), ast_context_add_ignorepat2(), ast_context_add_include2(), ast_context_add_switch2(), ast_context_find_or_create(), ast_copy_string(), ast_findlabel_extension2(), ast_free_ptr(), ast_log(), ast_opt_dont_warn, ast_process_quotes_and_slashes(), ast_shrink_phone_number(), ast_skip_blanks(), ast_strdup, ast_true(), ast_variable_browse(), ast_variable_retrieve(), ast_channel::data, end, ext, free(), ast_variable::lineno, localized_config_load(), LOG_WARNING, ast_variable::name, ast_variable::next, NULL, pbx_builtin_setvar_helper(), pbx_substitute_variables_helper(), PRIORITY_HINT, S_OR, strdup, strsep(), and ast_variable::value.
Referenced by localized_pbx_load_module(), and pbx_substitute_variables_helper().
|
static |
Support for Asterisk built-in variables in the dialplan.
Definition at line 5082 of file extconf.c.
References ast_copy_string(), AST_LIST_TRAVERSE, ast_rwlock_rdlock(), ast_rwlock_unlock(), ast_strdupa, ast_var_name(), ast_var_value(), ast_var_t::entries, globalslock, NULL, parse_variable_name(), and substring().
Referenced by pbx_substitute_variables_helper_full().
|
static |
Definition at line 5331 of file extconf.c.
References config_file, NULL, pbx_load_config(), and pbx_substitute_variables_helper_full().
Referenced by pbx_load_config().
|
static |
Definition at line 5149 of file extconf.c.
References ast_copy_string(), ast_expr(), ast_func_read(), ast_log(), ast_strlen_zero(), len(), LOG_DEBUG, LOG_NOTICE, NULL, parse_variable_name(), pbx_retrieve_variable(), substring(), tmp(), var, and VAR_BUF_SIZE.
Referenced by pbx_substitute_variables_helper().
|
static |
Definition at line 2908 of file extconf.c.
References ALLOC_COMMENT(), ast_category_append(), ast_category_destroy(), ast_category_new(), ast_config_destroy(), ast_config_internal_load(), ast_include_new(), ast_log(), ast_opt_exec_includes, ast_safe_system(), ast_skip_blanks(), ast_strip(), ast_strlen_zero(), ast_variable_append(), ast_variable_new(), ast_variable::blanklines, buf, c, category_get(), CB_RESET(), inherit_category(), ast_variable::lineno, ast_category::lineno, LOG_ERROR, LOG_WARNING, move_variables(), NULL, ast_variable::object, ast_variable::precomments, ast_category::precomments, ast_variable::sameline, ast_category::sameline, and strsep().
Referenced by config_text_file_load().
|
static |
Definition at line 3408 of file extconf.c.
References ast_config_AST_CONFIG_DIR, ast_copy_string(), ast_channel::generator, and localized_config_text_file_save().
Referenced by localized_config_text_file_save().
|
static |
takes a substring. It is ok to call with value == workspace.
offset < 0 means start from the end of the string and set the beginning to be that many characters back. length is the length of the substring. A value less than 0 means to leave that many off the end. Always return a copy in workspace.
Definition at line 5041 of file extconf.c.
References ast_copy_string().
Referenced by pbx_retrieve_variable(), and pbx_substitute_variables_helper_full().
|
static |
Definition at line 2267 of file extconf.c.
References a, ast_log(), LOG_WARNING, and ONE_MILLION.
Referenced by ast_tvadd(), and ast_tvsub().
|
static |
Definition at line 1249 of file extconf.c.
References ast_variable_new(), ast_variable::blanklines, ast_variable::file, ast_variable::lineno, ast_variable::name, ast_variable::object, and ast_variable::value.
Referenced by inherit_category().
char ast_defaultlanguage[] |
Definition at line 98 of file options.c.
Referenced by load_asterisk_conf().
int ast_language_is_prefix |
The following variable controls the layout of localized sound files. If 0, use the historical layout with prefix just before the filename (i.e. digits/en/1.gsm , digits/it/1.gsm or default to digits/1.gsm), if 1 put the prefix at the beginning of the filename (i.e. en/digits/1.gsm, it/digits/1.gsm or default to digits/1.gsm). The latter permits a language to be entirely in one directory.
This is settable in asterisk.conf.
Definition at line 67 of file file.c.
Referenced by fileexists_test().
pid_t ast_mainpid |
Definition at line 315 of file asterisk.c.
Referenced by asterisk_daemon(), main(), and netconsole().
|
static |
Growable string buffer this will be a comment collector.
Definition at line 705 of file extconf.c.
Referenced by config_text_file_load().
|
static |
|
static |
|
static |
Definition at line 2121 of file extconf.c.
Referenced by AST_TEST_DEFINE(), and parse_config().
|
static |
Referenced by find_engine().
|
static |
Lock for the ast_context list
Definition at line 4484 of file extconf.c.
Referenced by ast_unlock_contexts(), and ast_wrlock_contexts().
|
static |
Definition at line 3599 of file extconf.c.
Referenced by __ast_context_create(), ast_merge_contexts_and_delete(), and ast_walk_contexts().
char debug_filename[AST_FILENAME_MAX] |
|
static |
Definition at line 2069 of file extconf.c.
Referenced by pbx_builtin_setvar_helper().
|
static |
Definition at line 2068 of file extconf.c.
Referenced by pbx_retrieve_variable().
|
static |
|
static |
A buffer for stuff behind the ;
Definition at line 708 of file extconf.c.
Referenced by config_text_file_load().
|
static |
|
static |
char record_cache_dir[AST_CACHE_DIR_LEN] |
Definition at line 96 of file options.c.
Referenced by load_asterisk_conf().
|
static |
Keep track of how many threads are currently trying to wait*() on a child process.
Definition at line 785 of file extconf.c.
Referenced by ast_unreplace_sigchld().
|
static |
Definition at line 786 of file extconf.c.
Referenced by ast_replace_sigchld(), and ast_unreplace_sigchld().
|
static |
Definition at line 2856 of file extconf.c.
Referenced by ast_config_internal_load().
|
static |