]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Add a new manager event for our buddies status.
authorPhilippe Sultan <philippe.sultan@gmail.com>
Thu, 18 Feb 2010 16:34:08 +0000 (16:34 +0000)
committerPhilippe Sultan <philippe.sultan@gmail.com>
Thu, 18 Feb 2010 16:34:08 +0000 (16:34 +0000)
The new JabberStatus event gives a concise view of the status change to the AMI
clients. Thanks fiddur!

(closes issue #16760)
Reported by: fiddur
Patches:
      244498.2.diff uploaded by fiddur (license 678)
Tested by: fiddur, phsultan

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

CHANGES
res/res_jabber.c

diff --git a/CHANGES b/CHANGES
index f430a7bb15e673c8c13ae9cd0eec2c63e9ad626a..05c7442921898459a925e45544368a1fcad693bb 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -339,6 +339,8 @@ Asterisk Manager Interface
  * The redirect command now has new parameters ExtraContext, ExtraExtension, 
    and ExtraPriority to allow redirecting the second channel to a different
    location than the first.
+ * Added new event "JabberStatus" in the Jabber module to monitor buddies
+   status.
 
 Channel Event Logging
 ---------------------
index ced9ea973cde9a6c3f770ba30a63868929673fbf..79e31c6e3aaaf0cc8d6d65d6a182c71cd81861a8 100644 (file)
@@ -2394,6 +2394,12 @@ static void aji_handle_presence(struct aji_client *client, ikspak *pak)
        default:
                ast_debug(3, "JABBER: Kinky! how did that happen %i\n", pak->show);
        }
+
+       manager_event(EVENT_FLAG_USER, "JabberStatus",
+                       "Account: %s\r\nJID: %s\r\nResource: %s\r\nStatus: %d\r\nPriority: %d"
+                       "\r\nDescription: %s\r\n",
+                       client->name, pak->from->partial, found->resource, found->status,
+                       found->priority, found->description);
 }
 
 /*!