diff options
author | David M. Lee <dlee@digium.com> | 2013-03-08 15:15:13 +0000 |
---|---|---|
committer | David M. Lee <dlee@digium.com> | 2013-03-08 15:15:13 +0000 |
commit | 4edd8be35cdef3b212355c48b68319f2304bc9f2 (patch) | |
tree | 19eb1e097c68641f443584f6585a71bb4a4d6f77 /main/asterisk.c | |
parent | f6f6bc7b5932808d570e41869c47c3fc54ab6bf8 (diff) |
This patch adds a new message bus API to Asterisk.
For the initial use of this bus, I took some work kmoore did creating
channel snapshots. So rather than create AMI events directly in the
channel code, this patch generates Stasis events, which manager.c uses
to then publish the AMI event.
This message bus provides a generic publish/subscribe mechanism within
Asterisk. This message bus is:
- Loosely coupled; new message types can be added in seperate modules.
- Easy to use; publishing and subscribing are straightforward
operations.
In addition to basic publish/subscribe, the patch also provides
mechanisms for message forwarding, and for message caching.
(issue ASTERISK-20887)
(closes issue ASTERISK-20959)
Review: https://reviewboard.asterisk.org/r/2339/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@382685 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/asterisk.c')
-rw-r--r-- | main/asterisk.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/main/asterisk.c b/main/asterisk.c index 1d5371938..4e5e58c05 100644 --- a/main/asterisk.c +++ b/main/asterisk.c @@ -240,6 +240,7 @@ int daemon(int, int); /* defined in libresolv of all places */ #include "asterisk/aoc.h" #include "asterisk/uuid.h" #include "asterisk/sorcery.h" +#include "asterisk/stasis.h" #include "../defaults.h" @@ -4120,6 +4121,11 @@ int main(int argc, char *argv[]) exit(1); } + if (stasis_init()) { + printf("Stasis initialization failed.\n%s", term_quit()); + exit(1); + } + ast_makesocket(); sigemptyset(&sigs); sigaddset(&sigs, SIGHUP); |