mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 11:25:35 +00:00
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
This commit is contained in:
13
main/pbx.c
13
main/pbx.c
@@ -11453,18 +11453,7 @@ int pbx_builtin_setvar_helper(struct ast_channel *chan, const char *name, const
|
||||
ast_verb(2, "Setting global variable '%s' to '%s'\n", name, value);
|
||||
newvariable = ast_var_assign(name, value);
|
||||
AST_LIST_INSERT_HEAD(headp, newvariable, entries);
|
||||
/*** DOCUMENTATION
|
||||
<managerEventInstance>
|
||||
<synopsis>Raised when a variable is set to a particular value.</synopsis>
|
||||
</managerEventInstance>
|
||||
***/
|
||||
manager_event(EVENT_FLAG_DIALPLAN, "VarSet",
|
||||
"Channel: %s\r\n"
|
||||
"Variable: %s\r\n"
|
||||
"Value: %s\r\n"
|
||||
"Uniqueid: %s\r\n",
|
||||
chan ? ast_channel_name(chan) : "none", name, value,
|
||||
chan ? ast_channel_uniqueid(chan) : "none");
|
||||
ast_channel_publish_varset(chan, name, value);
|
||||
}
|
||||
|
||||
if (chan)
|
||||
|
Reference in New Issue
Block a user