From: Jason Parker Date: Tue, 2 Jul 2013 22:01:23 +0000 (+0000) Subject: Add a SystemName field to all AMI events. X-Git-Tag: 13.0.0-beta1~1566 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=85ba0633298e42e723ce136e867780c115c7fb6e;p=thirdparty%2Fasterisk.git Add a SystemName field to all AMI events. This only gets sent out if configured in asterisk.conf (closes issue ASTERISK-21494) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393508 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/CHANGES b/CHANGES index 04f7d807c2..e6da22224e 100644 --- a/CHANGES +++ b/CHANGES @@ -196,8 +196,8 @@ AMI (Asterisk Manager Interface) event, the various ChanVariable fields will contain a suffix that specifies which channel they correspond to. -* The NewPeerAccount AMI event is no longer raised. The NewAccountCode AMI - event always conveys the AMI event for a particular channel. + * The NewPeerAccount AMI event is no longer raised. The NewAccountCode AMI + event always conveys the AMI event for a particular channel. * All "Reload" events have been consolidated into a single event type. This event will always contain a Module field specifying the name of the module @@ -252,6 +252,8 @@ AMI (Asterisk Manager Interface) * "ChannelUpdate" events have been removed. + * AMI events now contain a SystemName field, if available. + AGI (Asterisk Gateway Interface) ------------------ * The manager event AGIExec has been split into AGIExecStart and AGIExecEnd. diff --git a/main/manager.c b/main/manager.c index 2af7fc529a..02d61dad5f 100644 --- a/main/manager.c +++ b/main/manager.c @@ -5962,6 +5962,11 @@ int __ast_manager_event_multichan(int category, const char *event, int chancount ast_str_append(&buf, 0, "File: %s\r\nLine: %d\r\nFunc: %s\r\n", file, line, func); } + if (!ast_strlen_zero(ast_config_AST_SYSTEM_NAME)) { + ast_str_append(&buf, 0, + "SystemName: %s\r\n", + ast_config_AST_SYSTEM_NAME); + } va_start(ap, fmt); ast_str_append_va(&buf, 0, fmt, ap);