54 #define MAX_AUTOMONS 1500
91 int i, x = 0, ms = 50;
109 mons[x++] = as->
chan;
111 ast_log(
LOG_WARNING,
"Exceeded maximum number of automatic monitoring events. Fix autoservice.c\n");
141 defer_frame = &hangup_frame;
147 for (i = 0; i < x; i++) {
150 if (mons[i] != chan) {
154 if (defer_frame != f) {
160 if (dup_f != defer_frame) {
186 if (as->
chan == chan) {
241 struct asent *as, *removed = NULL;
256 if (as->
chan == chan) {
314 if (as->
chan == chan) {
330 pthread_kill(th, SIGURG);
331 pthread_join(th, NULL);
static volatile int asexit
struct ast_channel * ast_waitfor_n(struct ast_channel **chan, int n, int *ms)
Waits for input on a group of channels Wait for input on an array of channels for a given # of millis...
struct asent::@226 deferred_frames
#define ast_channel_lock(chan)
Main Channel structure associated with a channel.
#define AST_LIST_LOCK(head)
Locks a list.
Asterisk locking-related definitions:
Asterisk main include file. File version handling, generic pbx functions.
int ast_autoservice_start(struct ast_channel *chan)
Automatically service a channel for us...
void ast_autoservice_init(void)
#define ast_test_flag(p, flag)
Support for translation of data formats. translate.c.
#define ast_set_flag(p, flag)
#define AST_LIST_UNLOCK(head)
Attempts to unlock a list.
struct ast_frame * ast_read(struct ast_channel *chan)
Reads a frame.
#define ast_cond_wait(cond, mutex)
#define ast_cond_init(cond, attr)
static void autoservice_shutdown(void)
#define AST_LIST_EMPTY(head)
Checks whether the specified list contains any entries.
struct ast_frame * ast_frisolate(struct ast_frame *fr)
Makes a frame independent of any static storage.
Generic File Format Support. Should be included by clients of the file handling routines. File service providers should instead include mod_format.h.
static void * autoservice_run(void *ign)
#define AST_LIST_REMOVE(head, elm, field)
Removes a specific entry from a list.
#define AST_LIST_TRAVERSE_SAFE_END
Closes a safe loop traversal block.
#define ast_cond_signal(cond)
static ast_cond_t as_cond
pthread_cond_t ast_cond_t
#define ast_pthread_create_background(a, b, c, d)
static int as_chan_list_state
General Asterisk PBX channel definitions.
int ast_register_cleanup(void(*func)(void))
Register a function to be executed before Asterisk gracefully exits.
struct ast_channel * chan
#define AST_PTHREADT_NULL
Asterisk internal frame definitions.
Scheduler Routines (derived from cheops)
#define AST_LIST_REMOVE_CURRENT(field)
Removes the current entry from a list during a traversal.
A set of macros to manage forward-linked lists.
#define AST_LIST_REMOVE_HEAD(head, field)
Removes and returns the head entry from a list.
Core PBX routines and definitions.
int ast_autoservice_stop(struct ast_channel *chan)
Stop servicing a channel for us...
int ast_check_hangup(struct ast_channel *chan)
Check to see if a channel is needing hang up.
#define AST_LIST_HEAD_STATIC(name, type)
Defines a structure to be used to hold a list of specified type, statically initialized.
The AMI - Asterisk Manager Interface - is a TCP protocol created to manage Asterisk with third-party ...
#define AST_LIST_HEAD_NOLOCK(name, type)
Defines a structure to be used to hold a list of specified type (with no lock).
unsigned int orig_end_dtmf_flag
void ast_log(int level, const char *file, int line, const char *function, const char *fmt,...)
Used for sending a log message This is the standard logger function. Probably the only way you will i...
#define AST_LIST_TRAVERSE(head, var, field)
Loops over (traverses) the entries in a list.
#define AST_LIST_ENTRY(type)
Declare a forward link structure inside a list entry.
#define AST_LIST_INSERT_HEAD(head, elm, field)
Inserts a list entry at the head of a list.
#define ast_channel_unlock(chan)
static pthread_t asthread
Prototypes for public functions only of internal interest,.
int ast_autoservice_ignore(struct ast_channel *chan, enum ast_frame_type ftype)
Ignore certain frame types.
#define ast_clear_flag(p, flag)
ast_frame_type
Frame types.
int ast_is_deferrable_frame(const struct ast_frame *frame)
Should we keep this frame for later?
Data structure associated with a single frame of data.
#define AST_LIST_TRAVERSE_SAFE_BEGIN(head, var, field)
Loops safely over (traverses) the entries in a list.
enum ast_frame_type frametype
unsigned int ignore_frame_types
int ast_queue_frame_head(struct ast_channel *chan, struct ast_frame *f)
Queue one or more frames to the head of a channel's frame queue.
struct ast_frame * ast_frdup(const struct ast_frame *fr)
Copies a frame.
#define ASTERISK_FILE_VERSION(file, version)
Register/unregister a source code file with the core.