Summary: | ASTERISK-05387: [patch] [post 1.2] Option to add timestamp to unsolicited manager events. | ||
Reporter: | Tony Mountifield (softins) | Labels: | |
Date Opened: | 2005-10-28 14:17:20 | Date Closed: | 2008-01-15 16:11:25.000-0600 |
Priority: | Major | Regression? | No |
Status: | Closed/Complete | Components: | Core/ManagerInterface |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) manager-timestamp-patch.txt | |
Description: | The attached patch contains changes to manager.c and configs/manager.conf.sample to provide the option of timestamping unsolicited manager events. This can be useful for recording or debugging. In manager.conf [general], the option is "eventstamp=epoch" to add a timestamp of the form: Timestamp: 1130519531.630698 and "eventstamp=hms" to add a timestamp of the form: Timestamp: 2005-10-28 18:12:48.200594 The default when omitted or specified as "eventstamp=none" is not to include a timestamp. Example message: Event: Hangup Privilege: call,all Timestamp: 2005-10-28 18:12:51.877522 Channel: SIP/2000-0374 Uniqueid: 1130519568.2 Cause: 0 Cause-txt: Unknown | ||
Comments: | By: Mark Monnin (wrmem) 2005-10-28 16:14:08 Having two formats may lead to problems. Someday someone will have two different apps, one wanting hms format and the other epoch format. May be possible to have hms format also include epoch format since epoch format is less compute intensive (numerical formatting vs. day computing). By: Tony Mountifield (softins) 2005-10-28 16:46:39 I originally implemented just the hms format, since it was to read by eye when I was examining event logs. I added the epoch format only for the benefit of programs parsing automatically. I'm open to discussion in this issue. Perhaps just have a single format Timestamp line for both human and machine parsing, like this: Timestamp: 1130519568.145446 (2005-10-28 18:12:48) And then epochstamp could just be a true/false value, or else the timestamp always included. Comments? By: Kevin P. Fleming (kpfleming) 2006-01-03 15:08:11.000-0600 Committed to SVN trunk, but I redid the patch somewhat... the config option is now 'timestampevents', and it's only yes or no, since I couldn't see the value of putting a 'local time' timestamp out without also including the timezone. For now, the timestamp is only the epoch format. By: Digium Subversion (svnbot) 2008-01-15 16:10:51.000-0600 Repository: asterisk Revision: 7750 U trunk/configs/manager.conf.sample U trunk/manager.c ------------------------------------------------------------------------ r7750 | kpfleming | 2008-01-15 16:10:51 -0600 (Tue, 15 Jan 2008) | 2 lines add optional timestamps to manager events (issue ASTERISK-5387, simplified) ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=7750 By: Digium Subversion (svnbot) 2008-01-15 16:11:19.000-0600 Repository: asterisk Revision: 7781 _U team/oej/aum-trunk/ U team/oej/aum-trunk/UPGRADE.txt U team/oej/aum-trunk/apps/app_chanspy.c U team/oej/aum-trunk/apps/app_mixmonitor.c U team/oej/aum-trunk/apps/app_privacy.c U team/oej/aum-trunk/apps/app_stack.c D team/oej/aum-trunk/ast_expr.y U team/oej/aum-trunk/ast_expr2.fl U team/oej/aum-trunk/ast_expr2f.c U team/oej/aum-trunk/autoservice.c U team/oej/aum-trunk/cdr.c U team/oej/aum-trunk/channel.c U team/oej/aum-trunk/channels/chan_iax2.c U team/oej/aum-trunk/channels/chan_sip.c U team/oej/aum-trunk/configs/manager.conf.sample U team/oej/aum-trunk/configs/sip.conf.sample A team/oej/aum-trunk/contrib/scripts/safe_asterisk_restart U team/oej/aum-trunk/file.c U team/oej/aum-trunk/funcs/func_moh.c U team/oej/aum-trunk/image.c U team/oej/aum-trunk/include/asterisk/chanspy.h U team/oej/aum-trunk/include/asterisk/image.h U team/oej/aum-trunk/include/asterisk/rtp.h U team/oej/aum-trunk/manager.c U team/oej/aum-trunk/pbx.c U team/oej/aum-trunk/res/Makefile U team/oej/aum-trunk/res/res_osp.c U team/oej/aum-trunk/rtp.c ------------------------------------------------------------------------ r7781 | oej | 2008-01-15 16:11:18 -0600 (Tue, 15 Jan 2008) | 171 lines Merged revisions 7720,7725,7728-7734,7737,7739,7741,7744-7745,7747-7748,7750-7751,7770,7774-7779 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r7720 | russell | 2006-01-02 19:54:34 +0100 (Mon, 02 Jan 2006) | 2 lines doxygen updates ................ r7725 | russell | 2006-01-03 00:52:33 +0100 (Tue, 03 Jan 2006) | 2 lines initialize sip_auth list ................ r7728 | oej | 2006-01-03 09:40:55 +0100 (Tue, 03 Jan 2006) | 2 lines Bug ASTERISK-5960: Clean up list handling in image.c (drumkilla) ................ r7729 | oej | 2006-01-03 09:54:19 +0100 (Tue, 03 Jan 2006) | 2 lines Bug ASTERISK-5958: Use list macros in autoservice.c (drumkilla) ................ r7730 | oej | 2006-01-03 10:30:19 +0100 (Tue, 03 Jan 2006) | 2 lines Bug ASTERISK-5951: Fix unprotected list in RTP, implement AST_LIST macros, update doxygen docs ................ r7731 | oej | 2006-01-03 12:21:48 +0100 (Tue, 03 Jan 2006) | 2 lines Bug 5345; Add configuration option for minimum registration time. (folsson) ................ r7732 | oej | 2006-01-03 12:31:56 +0100 (Tue, 03 Jan 2006) | 2 lines Bug ASTERISK-5088: Add caller ID and CallerIDname to OriginateSuccess/Failure manager events (outtolunc) ................ r7733 | oej | 2006-01-03 12:58:10 +0100 (Tue, 03 Jan 2006) | 2 lines Bug ASTERISK-5913: Broken rport match in check_via(). (rizzo) ................ r7734 | oej | 2006-01-03 13:25:32 +0100 (Tue, 03 Jan 2006) | 2 lines Issue ASTERISK-5799: Implement printf-like append_history and implement AST_LIST for SIP history (rizzo) ................ r7737 | kpfleming | 2006-01-03 17:39:37 +0100 (Tue, 03 Jan 2006) | 10 lines Merged revisions 7736 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r7736 | kpfleming | 2006-01-03 10:34:12 -0600 (Tue, 03 Jan 2006) | 2 lines don't leak memory for (most) expression evaluations ........ ................ r7739 | kpfleming | 2006-01-03 18:08:35 +0100 (Tue, 03 Jan 2006) | 3 lines fix breakage from rev 7730 (failure to unlock list in get_proto) minor cleanups and simpler usage of list macros ................ r7741 | kpfleming | 2006-01-03 18:25:39 +0100 (Tue, 03 Jan 2006) | 12 lines Merged revisions 7740 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r7740 | kpfleming | 2006-01-03 11:24:56 -0600 (Tue, 03 Jan 2006) | 4 lines revert incorrect fix for bug ASTERISK-5890 from revision 7709 put in correct (simpler) fix add doxygen docs for channel spy 'state' values ........ ................ r7744 | tilghman | 2006-01-03 19:17:42 +0100 (Tue, 03 Jan 2006) | 3 lines Merged revisions 7743 via svnmerge from /branches/1.2 ................ r7745 | oej | 2006-01-03 20:12:50 +0100 (Tue, 03 Jan 2006) | 2 lines Don't check user call limits for outbound calls. ................ r7747 | kpfleming | 2006-01-03 21:23:23 +0100 (Tue, 03 Jan 2006) | 10 lines Merged revisions 7746 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r7746 | kpfleming | 2006-01-03 14:22:18 -0600 (Tue, 03 Jan 2006) | 2 lines remove unused 'old' expression parser ........ ................ r7748 | kpfleming | 2006-01-03 21:33:28 +0100 (Tue, 03 Jan 2006) | 2 lines add script for simple 'no-brainer' restarts of safe_asterisk (issue ASTERISK-5004) ................ r7750 | kpfleming | 2006-01-03 23:07:12 +0100 (Tue, 03 Jan 2006) | 2 lines add optional timestamps to manager events (issue ASTERISK-5387, simplified) ................ r7751 | kpfleming | 2006-01-03 23:16:23 +0100 (Tue, 03 Jan 2006) | 2 lines update copyright headers for files changed this year ................ r7770 | bweschke | 2006-01-04 06:26:03 +0100 (Wed, 04 Jan 2006) | 3 lines Fix the 'if' clause to be true under the right conditions. Bug ASTERISK-5969 ................ r7774 | russell | 2006-01-04 08:08:08 +0100 (Wed, 04 Jan 2006) | 10 lines Merged revisions 7773 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r7773 | russell | 2006-01-04 02:06:50 -0500 (Wed, 04 Jan 2006) | 2 lines use a more correct way of determining the size of the destination buffer ........ ................ r7775 | oej | 2006-01-04 10:10:56 +0100 (Wed, 04 Jan 2006) | 6 lines - Remove "incominglimit" as a configuration option in sip.conf - Add documentation on call-limit, explaining that there's two counters for a type="friend". - Document the removval of "incominglimit" in UPGRADE.txt ................ r7776 | oej | 2006-01-04 10:22:45 +0100 (Wed, 04 Jan 2006) | 2 lines Issue ASTERISK-5970: Count in show channeltypes (junky) ................ r7777 | oej | 2006-01-04 11:16:53 +0100 (Wed, 04 Jan 2006) | 2 lines Missing ">" in XML. Thanks, fenlander, for reporting this on IRC. ................ r7778 | russell | 2006-01-04 13:11:11 +0100 (Wed, 04 Jan 2006) | 2 lines doxygen tweak ................ r7779 | oej | 2006-01-04 13:16:30 +0100 (Wed, 04 Jan 2006) | 2 lines Issue ASTERISK-5797: Add destination protocol information to res_osp (homesick) ................ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=7781 By: Digium Subversion (svnbot) 2008-01-15 16:11:25.000-0600 Repository: asterisk Revision: 7787 _U team/oej/multiparking/ U team/oej/multiparking/UPGRADE.txt U team/oej/multiparking/apps/app_chanspy.c U team/oej/multiparking/apps/app_disa.c U team/oej/multiparking/apps/app_mixmonitor.c U team/oej/multiparking/apps/app_privacy.c U team/oej/multiparking/apps/app_stack.c D team/oej/multiparking/ast_expr.y U team/oej/multiparking/ast_expr2.fl U team/oej/multiparking/ast_expr2f.c U team/oej/multiparking/autoservice.c U team/oej/multiparking/cdr.c U team/oej/multiparking/channel.c U team/oej/multiparking/channels/chan_iax2.c U team/oej/multiparking/channels/chan_sip.c U team/oej/multiparking/channels/chan_zap.c U team/oej/multiparking/configs/manager.conf.sample U team/oej/multiparking/configs/sip.conf.sample U team/oej/multiparking/contrib/scripts/managerproxy.pl A team/oej/multiparking/contrib/scripts/safe_asterisk_restart U team/oej/multiparking/file.c U team/oej/multiparking/funcs/func_moh.c U team/oej/multiparking/image.c U team/oej/multiparking/include/asterisk/chanspy.h U team/oej/multiparking/include/asterisk/image.h U team/oej/multiparking/include/asterisk/rtp.h U team/oej/multiparking/manager.c U team/oej/multiparking/pbx.c U team/oej/multiparking/res/res_osp.c U team/oej/multiparking/rtp.c ------------------------------------------------------------------------ r7787 | oej | 2008-01-15 16:11:24 -0600 (Tue, 15 Jan 2008) | 186 lines Merged revisions 7725,7728-7734,7737,7739,7741,7744-7745,7747-7748,7750-7751,7770,7774-7779,7783-7786 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r7725 | russell | 2006-01-03 00:52:33 +0100 (Tue, 03 Jan 2006) | 2 lines initialize sip_auth list ................ r7728 | oej | 2006-01-03 09:40:55 +0100 (Tue, 03 Jan 2006) | 2 lines Bug ASTERISK-5960: Clean up list handling in image.c (drumkilla) ................ r7729 | oej | 2006-01-03 09:54:19 +0100 (Tue, 03 Jan 2006) | 2 lines Bug ASTERISK-5958: Use list macros in autoservice.c (drumkilla) ................ r7730 | oej | 2006-01-03 10:30:19 +0100 (Tue, 03 Jan 2006) | 2 lines Bug ASTERISK-5951: Fix unprotected list in RTP, implement AST_LIST macros, update doxygen docs ................ r7731 | oej | 2006-01-03 12:21:48 +0100 (Tue, 03 Jan 2006) | 2 lines Bug 5345; Add configuration option for minimum registration time. (folsson) ................ r7732 | oej | 2006-01-03 12:31:56 +0100 (Tue, 03 Jan 2006) | 2 lines Bug ASTERISK-5088: Add caller ID and CallerIDname to OriginateSuccess/Failure manager events (outtolunc) ................ r7733 | oej | 2006-01-03 12:58:10 +0100 (Tue, 03 Jan 2006) | 2 lines Bug ASTERISK-5913: Broken rport match in check_via(). (rizzo) ................ r7734 | oej | 2006-01-03 13:25:32 +0100 (Tue, 03 Jan 2006) | 2 lines Issue ASTERISK-5799: Implement printf-like append_history and implement AST_LIST for SIP history (rizzo) ................ r7737 | kpfleming | 2006-01-03 17:39:37 +0100 (Tue, 03 Jan 2006) | 10 lines Merged revisions 7736 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r7736 | kpfleming | 2006-01-03 10:34:12 -0600 (Tue, 03 Jan 2006) | 2 lines don't leak memory for (most) expression evaluations ........ ................ r7739 | kpfleming | 2006-01-03 18:08:35 +0100 (Tue, 03 Jan 2006) | 3 lines fix breakage from rev 7730 (failure to unlock list in get_proto) minor cleanups and simpler usage of list macros ................ r7741 | kpfleming | 2006-01-03 18:25:39 +0100 (Tue, 03 Jan 2006) | 12 lines Merged revisions 7740 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r7740 | kpfleming | 2006-01-03 11:24:56 -0600 (Tue, 03 Jan 2006) | 4 lines revert incorrect fix for bug ASTERISK-5890 from revision 7709 put in correct (simpler) fix add doxygen docs for channel spy 'state' values ........ ................ r7744 | tilghman | 2006-01-03 19:17:42 +0100 (Tue, 03 Jan 2006) | 3 lines Merged revisions 7743 via svnmerge from /branches/1.2 ................ r7745 | oej | 2006-01-03 20:12:50 +0100 (Tue, 03 Jan 2006) | 2 lines Don't check user call limits for outbound calls. ................ r7747 | kpfleming | 2006-01-03 21:23:23 +0100 (Tue, 03 Jan 2006) | 10 lines Merged revisions 7746 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r7746 | kpfleming | 2006-01-03 14:22:18 -0600 (Tue, 03 Jan 2006) | 2 lines remove unused 'old' expression parser ........ ................ r7748 | kpfleming | 2006-01-03 21:33:28 +0100 (Tue, 03 Jan 2006) | 2 lines add script for simple 'no-brainer' restarts of safe_asterisk (issue ASTERISK-5004) ................ r7750 | kpfleming | 2006-01-03 23:07:12 +0100 (Tue, 03 Jan 2006) | 2 lines add optional timestamps to manager events (issue ASTERISK-5387, simplified) ................ r7751 | kpfleming | 2006-01-03 23:16:23 +0100 (Tue, 03 Jan 2006) | 2 lines update copyright headers for files changed this year ................ r7770 | bweschke | 2006-01-04 06:26:03 +0100 (Wed, 04 Jan 2006) | 3 lines Fix the 'if' clause to be true under the right conditions. Bug ASTERISK-5969 ................ r7774 | russell | 2006-01-04 08:08:08 +0100 (Wed, 04 Jan 2006) | 10 lines Merged revisions 7773 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r7773 | russell | 2006-01-04 02:06:50 -0500 (Wed, 04 Jan 2006) | 2 lines use a more correct way of determining the size of the destination buffer ........ ................ r7775 | oej | 2006-01-04 10:10:56 +0100 (Wed, 04 Jan 2006) | 6 lines - Remove "incominglimit" as a configuration option in sip.conf - Add documentation on call-limit, explaining that there's two counters for a type="friend". - Document the removval of "incominglimit" in UPGRADE.txt ................ r7776 | oej | 2006-01-04 10:22:45 +0100 (Wed, 04 Jan 2006) | 2 lines Issue ASTERISK-5970: Count in show channeltypes (junky) ................ r7777 | oej | 2006-01-04 11:16:53 +0100 (Wed, 04 Jan 2006) | 2 lines Missing ">" in XML. Thanks, fenlander, for reporting this on IRC. ................ r7778 | russell | 2006-01-04 13:11:11 +0100 (Wed, 04 Jan 2006) | 2 lines doxygen tweak ................ r7779 | oej | 2006-01-04 13:16:30 +0100 (Wed, 04 Jan 2006) | 2 lines Issue ASTERISK-5797: Add destination protocol information to res_osp (homesick) ................ r7783 | oej | 2006-01-04 14:07:34 +0100 (Wed, 04 Jan 2006) | 2 lines Issue ASTERISK-5673: Adding more SIP to ISDN Cause code conversions. Thanks mguesdon! ................ r7784 | oej | 2006-01-04 14:49:25 +0100 (Wed, 04 Jan 2006) | 2 lines Whitespace and formatting changes. /Housekeeping ................ r7785 | oej | 2006-01-04 14:56:11 +0100 (Wed, 04 Jan 2006) | 2 lines Small typo fix ................ r7786 | mattf | 2006-01-04 15:46:41 +0100 (Wed, 04 Jan 2006) | 2 lines Fixes for bug ASTERISK-5968 ................ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=7787 |