Summary: | ASTERISK-15570: [patch] Adding manager event JabberStatus | ||
Reporter: | Fredrik Liljegren (fiddur) | Labels: | |
Date Opened: | 2010-02-03 05:21:56.000-0600 | Date Closed: | 2010-03-18 11:16:16 |
Priority: | Major | Regression? | No |
Status: | Closed/Complete | Components: | Resources/res_jabber/NewFeature |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) 244498.2.diff ( 1) 244498.diff ( 2) 248394.diff | |
Description: | I have added a manager event JabberStatus, that sends out an event every time a buddy changes, with data: Account: Client or transport Asterisk uses to connect to Jabber JID: Buddy's jabber id Resource: Buddys's resource Status: Status (same as JABBER_STATUS function) Priority: Priority Description: Status description (or '(null)') ****** ADDITIONAL INFORMATION ****** I didn't find a place to document manager events. There should be an appdoc section for manager events, not only manager commands. | ||
Comments: | By: Fredrik Liljegren (fiddur) 2010-02-03 08:59:11.000-0600 Changed spaces -> tabs. New diff. By: Leif Madsen (lmadsen) 2010-02-03 09:35:00.000-0600 Thanks for the submission! This seems handy to me. By: Leif Madsen (lmadsen) 2010-02-03 09:35:47.000-0600 Just pinging pmhaddad to let him know about this feature incase it is either already created in another branch, or so he can review if he has time. Thanks! By: Leif Madsen (lmadsen) 2010-02-11 11:51:15.000-0600 Oops! I meant to ping Phillippe about this :) By: phsultan (phsultan) 2010-02-17 08:49:39.000-0600 Nice idea, I'll commit the code as soon as I get back to the office (tomorrow ;)). Thanks a lot! By: Digium Subversion (svnbot) 2010-02-18 10:34:10.000-0600 Repository: asterisk Revision: 247500 U trunk/CHANGES U trunk/res/res_jabber.c ------------------------------------------------------------------------ r247500 | phsultan | 2010-02-18 10:34:10 -0600 (Thu, 18 Feb 2010) | 11 lines Add a new manager event for our buddies status. The new JabberStatus event gives a concise view of the status change to the AMI clients. Thanks fiddur! (closes issue ASTERISK-15570) Reported by: fiddur Patches: 244498.2.diff uploaded by fiddur (license 678) Tested by: fiddur, phsultan ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=247500 By: Fredrik Liljegren (fiddur) 2010-02-23 00:00:43.000-0600 Something here throws a sigsegv when a buddy disconnects... I'm debugging it now, hope to create a new patch soon! Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x419d3950 (LWP 7676)] 0x00007f08a0a063d4 in aji_handle_presence (client=0x16b1c80, pak=0x7f089c077cc8) at res_jabber.c:1729 1729 manager_event(EVENT_FLAG_USER, "JabberStatus", By: Fredrik Liljegren (fiddur) 2010-02-23 00:13:31.000-0600 Ah, there's no found on a disconnect... new patch on trunk coming soon. By: Fredrik Liljegren (fiddur) 2010-02-23 01:17:37.000-0600 The new diff is against 248394; so it removes the faulty code and adds all new and shiny code :) I wrote the offline status 6 as a %d in the string, in the hope that there would be some enum or defines for the jabber statuses... couldn't find any, but keeping the syntax for future generations. I have tested some status changes and shutting down a buddies jabber client successfully now... I could have sworn I had tested that before as well, but it seems not :/ By: Fredrik Liljegren (fiddur) 2010-02-23 01:19:33.000-0600 Oh, maybe there should be a note in doc/manager_1_1.txt? Well, I'm continuing my proposal to add appdoc for manager events instead... By: Digium Subversion (svnbot) 2010-03-18 10:59:20 Repository: asterisk Revision: 253261 U trunk/res/res_jabber.c ------------------------------------------------------------------------ r253261 | phsultan | 2010-03-18 10:59:19 -0500 (Thu, 18 Mar 2010) | 8 lines Prevent a crash when a buddy gets offline. (closes issue ASTERISK-15570) Reported by: fiddur Patches: 248394.diff uploaded by fiddur (license 678)i with modifications by me Tested by: fiddur, phsultan ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=253261 |