[Home]

Summary:ASTERISK-11076: Allow for the conditional logging of CDRs based on the call disposition
Reporter:Stephen Kratzer (kratzers)Labels:
Date Opened:2007-12-18 11:01:14.000-0600Date Closed:2007-12-27 14:48:33.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Addons/cdr_mysql
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) cdr_addon_mysql.c_disposition_mask.diff
( 1) cdr_addon_mysql.c.diff
Description:In our setting, we've found it desirable to log CDR conditionally based on the call disposition. For instance, only log CDRs for calls that were either answered or not answered. Removing unwanted records ex post facto using mysql triggers is inefficient and ugly, so I thought it might be useful to be able to do this natively. Attached is a patch which allows users to specify the dispositions to log using a mask such as NOANSWER|ANSWERED. The default is to log everything: FAILED|BUSY|NOANSWER|ANSWERED.

****** ADDITIONAL INFORMATION ******

[kratzers@kratzers asterisk-addons]$ svn info cdr_addon_mysql.c
Path: cdr_addon_mysql.c
Name: cdr_addon_mysql.c
URL: http://svn.digium.com/svn/asterisk-addons/trunk/cdr_addon_mysql.c
Repository Root: http://svn.digium.com/svn/asterisk-addons
Repository UUID: bbbafe65-6c06-0410-a0a5-c710d232821c
Revision: 497
Node Kind: file
Schedule: normal
Last Changed Author: mmichelson
Last Changed Rev: 495
Last Changed Date: 2007-12-12 11:58:29 -0500 (Wed, 12 Dec 2007)
Text Last Updated: 2007-12-17 15:11:52 -0500 (Mon, 17 Dec 2007)
Checksum: a09108722e1b141db4162043fd176783
Comments:By: Jason Parker (jparker) 2007-12-18 12:48:05.000-0600

This would probably be best handled in the core of asterisk, rather than in a single cdr module.  Thoughts?

By: Stephen Kratzer (kratzers) 2007-12-18 13:04:31.000-0600

I hadn't really thought about it before, but I agree. The only immediately obvious disadvantage of doing this globally that I see is that it wouldn't be possible to have full CDRs in cdr-csv (or elsewhere) and only a subset in a database table. It would be all or nothing.

By: Stephen Kratzer (kratzers) 2007-12-27 13:19:02.000-0600

I am migrating this to the core of Asterisk as suggested. In the event that anyone might stumble upon this issue and want to use the patch, I've attached a second patch which fixes a bug in the first patch.

By: Jason Parker (jparker) 2007-12-27 14:48:32.000-0600

Closing in favor of ASTERISK-11118