Summary: | ASTERISK-12212: [patch] Support for CDR's and syslogd | ||
Reporter: | Brett Bryant (bbryant) | Labels: | |
Date Opened: | 2008-06-17 12:32:26 | Date Closed: | 2009-06-26 17:11:48 |
Priority: | Major | Regression? | No |
Status: | Closed/Complete | Components: | CDR/NewFeature |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) 05212009_cdr_syslog.patch ( 1) 06162008_cdr_custom_syslog.diff | |
Description: | This patch adds support for using custom cdr's with syslogd. This code has been tested with a minimal configuration of syslogd, but I was not able to get syslogd to output to a particular file. Testing of this feature by somebody with syslog experience would be appreciated to see if it's a code flaw or syslog configuration issue. > syslog.conf asterisk.* /var/log/asterisk_cdr_custom.log > asterisk/cdr_custom.conf [mappings] syslog.asterisk => "${CDR(clid)}", "${CDR(src)}", "${CDR(dst)}", "${CDR(dcontext)}", "${CDR(channel)}", "${CDR(dstchannel)}", "${CDR(lastapp)}", "${CDR(lastdata)}", "${CDR(start)}", "${CDR(answer)}", "${CDR(end)}", "${CDR(duration)}", "${CDR(billsec)}", "${CDR(disposition)}"," ${CDR(amaflags)}", "${CDR(accountcode)}", "${CDR(uniqueid)}", "${CDR(userfield)}" | ||
Comments: | By: Sean Bright (seanbright) 2008-07-07 11:31:31 I don't think you can specify a custom facility in /etc/syslog.conf (at least on Linux). So... > syslog.conf asterisk.* /var/log/asterisk_cdr_custom.log would have to be: > syslog.conf daemon.* /var/log/asterisk_cdr_custom.log Or something like that. By: Sean Bright (seanbright) 2008-07-07 11:34:47 In fact, it might be better to use one of the local facilities (LOG_LOCAL0 ... LOG_LOCAL7) instead of daemon (which is what the patch is using based on my brief scan of the code). By: Steve Murphy (murf) 2008-10-15 15:38:20 bbryant, looks like this can't be assigned and ready for testing at the same time... do you still own this bug? By: Leif Madsen (lmadsen) 2008-11-20 16:36:10.000-0600 Oh but this CAN be assigned & marked as Ready For Testing. I just did it! :) By: Sean Bright (seanbright) 2008-11-21 14:08:30.000-0600 I realize this is similar to the functionality in cdr_custom, but what about creating a new module cdr_syslog or something? Would make the code a bit cleaner I think. By: Steve Murphy (murf) 2009-01-23 12:48:54.000-0600 bbryant-- any thoughts on this? By: Leif Madsen (lmadsen) 2009-02-27 16:29:41.000-0600 Does this bug still make any sense to be open? By: Russell Bryant (russell) 2009-02-28 08:51:30.000-0600 Yes, this bug should still be open. It's a new feature that needs to be reviewed and taken to completion. I wouldn't expect any comments from bbryant, until if and when he joins us again. Brett wrote this while working as an intern in our group last Summer. By: Matthew Nicholson (mnicholson) 2009-04-21 11:46:13 I also like the idea of splitting this code into a cdr_syslog module. By: Matthew Nicholson (mnicholson) 2009-05-15 16:08:15 I will split this into a new module when I have some time. In the mean time, bbryant, feel free to take a crack at it. By: Sean Bright (seanbright) 2009-05-21 13:44:04 It doesn't have the autoconf magic yet and the sample config needs a bit of work, but the patch I uploaded should be completely functional. Once I get the nod I will do the rest and throw it up on reviewboard. By: Matthew Nicholson (mnicholson) 2009-05-27 14:38:31 Add the autoconf stuff, and finish the sample config, then post this on reviewboard. Good work. By: Sean Bright (seanbright) 2009-06-25 10:20:23 Sorry for the delay here, I just realized there is some duplicated code in main/logger.c and cdr_syslog.c. I want to reconcile that before committing. By: Digium Subversion (svnbot) 2009-06-26 17:08:07 Repository: asterisk Revision: 203846 U trunk/CHANGES U trunk/build_tools/menuselect-deps.in A trunk/cdr/cdr_syslog.c A trunk/configs/cdr_syslog.conf.sample U trunk/configure U trunk/configure.ac ------------------------------------------------------------------------ r203846 | seanbright | 2009-06-26 17:08:06 -0500 (Fri, 26 Jun 2009) | 14 lines Add a new module, cdr_syslog, which allows writing CDRs to syslog. The original patch for this was written by Brett Bryant, and I split it out into it's own module. (closes issue ASTERISK-12212) Reported by: bbryant Patches: 06162008_cdr_custom_syslog.diff uploaded by bbryant (license 36) 05212009_cdr_syslog.patch uploaded by seanbright (license 71) Tested by: seanbright Review: https://reviewboard.asterisk.org/r/297/ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=203846 By: Digium Subversion (svnbot) 2009-06-26 17:11:47 Repository: asterisk Revision: 203854 _U branches/1.6.2/ ------------------------------------------------------------------------ r203854 | seanbright | 2009-06-26 17:11:47 -0500 (Fri, 26 Jun 2009) | 20 lines Blocked revisions 203846 via svnmerge ........ r203846 | seanbright | 2009-06-26 18:08:05 -0400 (Fri, 26 Jun 2009) | 14 lines Add a new module, cdr_syslog, which allows writing CDRs to syslog. The original patch for this was written by Brett Bryant, and I split it out into it's own module. (closes issue ASTERISK-12212) Reported by: bbryant Patches: 06162008_cdr_custom_syslog.diff uploaded by bbryant (license 36) 05212009_cdr_syslog.patch uploaded by seanbright (license 71) Tested by: seanbright Review: https://reviewboard.asterisk.org/r/297/ ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=203854 |