Merge changes from team/russell/events

This set of changes introduces a new generic event API for use within Asterisk.
I am still working on a way for events to be shared between servers, but this
part is ready and can already be used inside of Asterisk.

This set of changes introduces the first use of the API, as well.  I have
restructured the way that MWI (message waiting indication) is handled.  It is
now event based instead of polling based.  For example, if there are a bunch
of SIP phones subscribed to mailboxes, then chan_sip will not have to
constantly poll the mailboxes for changes.  app_voicemail will generate events
when changes occur.

See UPGRADE.txt and CHANGES for some more information on the effects of these
changes from the user perspective.  For developer information, see the text in
include/asterisk/event.h.

As always, additional feedback is welcome on the asterisk-dev mailing list.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@62292 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Russell Bryant
2007-04-28 21:01:44 +00:00
parent 503b75f885
commit b6b1bf3213
17 changed files with 2063 additions and 165 deletions

View File

@@ -47,23 +47,23 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
/*! \brief Main dialing structure. Contains global options, channels being dialed, and more! */
struct ast_dial {
int num; /*! Current number to give to next dialed channel */
enum ast_dial_result state; /*! Status of dial */
void *options[AST_DIAL_OPTION_MAX]; /*! Global options */
ast_dial_state_callback state_callback; /*! Status callback */
AST_LIST_HEAD_NOLOCK(, ast_dial_channel) channels; /*! Channels being dialed */
pthread_t thread; /*! Thread (if running in async) */
int num; /*!< Current number to give to next dialed channel */
enum ast_dial_result state; /*!< Status of dial */
void *options[AST_DIAL_OPTION_MAX]; /*!< Global options */
ast_dial_state_callback state_callback; /*!< Status callback */
AST_LIST_HEAD_NOLOCK(, ast_dial_channel) channels; /*!< Channels being dialed */
pthread_t thread; /*!< Thread (if running in async) */
};
/*! \brief Dialing channel structure. Contains per-channel dialing options, asterisk channel, and more! */
struct ast_dial_channel {
int num; /*! Unique number for dialed channel */
const char *tech; /*! Technology being dialed */
const char *device; /*! Device being dialed */
void *options[AST_DIAL_OPTION_MAX]; /*! Channel specific options */
int cause; /*! Cause code in case of failure */
struct ast_channel *owner; /*! Asterisk channel */
AST_LIST_ENTRY(ast_dial_channel) list; /*! Linked list information */
int num; /*!< Unique number for dialed channel */
const char *tech; /*!< Technology being dialed */
const char *device; /*!< Device being dialed */
void *options[AST_DIAL_OPTION_MAX]; /*!< Channel specific options */
int cause; /*!< Cause code in case of failure */
struct ast_channel *owner; /*!< Asterisk channel */
AST_LIST_ENTRY(ast_dial_channel) list; /*!< Linked list information */
};
/*! \brief Typedef for dial option enable */