Asterisk - The Open Source Telephony Project
21.4.1
|
#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 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. | |
#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. | |
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 | |
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 | |
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. | |
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. | |
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 | |
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 | |
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. | |
void | ast_mark_lock_failed (void *lock_addr) |
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 | |
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. | |
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. | |
struct timeval | ast_tvnow (void) |
struct timeval | ast_tvsub (struct timeval a, struct timeval b) |
Returns the difference of two timevals a - b. | |
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. | |
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 | |
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. | |
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. | |
static void | get_timerange (struct ast_timing *i, char *times) |
store a bitmask of valid times, one bit each 2 minute | |
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. | |
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) | |
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. | |
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 extensions.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_DEFAULT_OPTIONS AST_OPT_FLAG_TRANSCODE_VIA_SLIN |
#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) |
#define AST_LIST_HEAD | ( | name, | |
type | |||
) |
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 |
#define AST_LIST_HEAD_NOLOCK | ( | name, | |
type | |||
) |
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 |
#define AST_LIST_HEAD_NOLOCK_STATIC | ( | name, | |
type | |||
) |
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.
#define AST_LIST_HEAD_STATIC | ( | name, | |
type | |||
) |
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. |
#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).
#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. |
#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. |
#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.
#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 1773 of file extconf.c.
Referenced by 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_RWLIST_HEAD | ( | name, | |
type | |||
) |
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 |
#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.
#define AST_RWLIST_HEAD_STATIC | ( | name, | |
type | |||
) |
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_RDLOCK | ( | head | ) | ast_rwlock_rdlock(&(head)->lock) |
#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 PRIORITY_HINT -1 |
Special Priority for a hint
Definition at line 2082 of file extconf.c.
Referenced by add_pri(), and ast_add_extension2().
enum ast_extension_states |
Definition at line 2084 of file extconf.c.
enum ast_option_flags |
Definition at line 1308 of file extconf.c.
|
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 4773 of file extconf.c.
References add_pri(), ast_exten::app, ast_add_hint(), ast_calloc, ast_exten::cidmatch, ast_exten::data, ast_exten::datad, ext_cmp(), ext_strncpy(), ast_exten::exten, ast_exten::label, ast_exten::matchcid, ast_context::name, ast_exten::next, ast_exten::parent, ast_exten::priority, PRIORITY_HINT, ast_exten::registrar, and ast_context::root.
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_in | Standard string containing a timerange, weekday range, monthday range, and month range, as well as an optional timezone. |
1 | on success. |
0 | on failure. |
Definition at line 3806 of file extconf.c.
References ast_strdup, ast_strdupa, ast_timing::daymask, ast_timing::dowmask, get_range(), get_timerange(), ast_timing::monthmask, and ast_timing::timezone.
Referenced by include_alloc().
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. |
1 | if the time matches. |
0 | if the current time falls outside of the specified range. |
struct ast_category* ast_config_get_current_category | ( | const struct ast_config * | cfg | ) |
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 3362 of file extconf.c.
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.
Referenced by ast_safe_fork(), and ast_safe_system().
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_replace_sigchld(), and ast_unreplace_sigchld().
Referenced by alarmreceiver_exec(), and notify_message().
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 1023 of file extconf.c.
References ast_variable::next, and ast_variable::stuff.
char* ast_trim_blanks | ( | char * | str | ) |
Trims trailing whitespace characters from a string.
str | the input string |
Definition at line 1004 of file extconf.c.
References ast_skip_blanks().
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 safe_system_level.
Referenced by ast_safe_fork_cleanup(), and ast_safe_system().
|
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 3872 of file extconf.c.
Referenced by ext_cmp().
struct ast_context* localized_context_find_or_create | ( | struct ast_context ** | extcontexts, |
void * | tab, | ||
const char * | name, | ||
const char * | registrar | ||
) |
void localized_merge_contexts_and_delete | ( | struct ast_context ** | extcontexts, |
void * | tab, | ||
const char * | registrar | ||
) |
Definition at line 5615 of file extconf.c.
References ast_merge_contexts_and_delete().
|
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 4914 of file extconf.c.
References ast_switch::name, and ast_exten::priority.
Referenced by ast_findlabel_extension2().
|
static |
Support for Asterisk built-in variables in the dialplan.
Definition at line 5079 of file extconf.c.
References ast_copy_string(), AST_LIST_TRAVERSE, ast_strdupa, parse_variable_name(), and substring().
|
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 5038 of file extconf.c.
References ast_copy_string().
Referenced by pbx_retrieve_variable().
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().
|
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 |
Lock for the ast_context list
|
static |
A buffer for stuff behind the ;
Definition at line 708 of file extconf.c.
Referenced by config_text_file_load().
|
static |
|
static |