Add the Uniqueid header to Userevent.
authorRussell Bryant <russell@russellbryant.com>
Fri, 6 May 2011 20:44:53 +0000 (20:44 +0000)
committerRussell Bryant <russell@russellbryant.com>
Fri, 6 May 2011 20:44:53 +0000 (20:44 +0000)
(closes issue #16962)
Reported by: jlpedrosa
Patches:
      patch.diff uploaded by jlpedrosa (license 1002)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@317915 65c4cc65-6c06-0410-ace0-fbb531ad65f3

CHANGES
apps/app_userevent.c

diff --git a/CHANGES b/CHANGES
index c40be8c..becdbfd 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -26,6 +26,7 @@ Asterisk Manager Interface
  * DAHDIShowChannels, SIPshowpeer, SIPpeers, and IAXpeers now contains a
    Description field that is set by 'description' in the channel configuration
    file.
+ * Added Uniqueid header to UserEvent.
 
 Asterisk HTTP Server
 --------------------------
index f149d85..1e1e4a9 100644 (file)
@@ -85,7 +85,12 @@ static int userevent_exec(struct ast_channel *chan, const char *data)
                ast_str_append(&body, 0, "%s\r\n", args.extra[x]);
        }
 
-       manager_event(EVENT_FLAG_USER, "UserEvent", "UserEvent: %s\r\n%s", args.eventname, ast_str_buffer(body));
+       manager_event(EVENT_FLAG_USER, "UserEvent",
+                       "UserEvent: %s\r\n"
+                       "Uniqueid: %s\r\n"
+                       "%s",
+                       args.eventname, chan->uniqueid, ast_str_buffer(body));
+
        ast_free(body);
 
        return 0;