Two Questions about CDR Records

  1. Is there a limit on how long the CDR records are kept? I went back 18 months on our system. Is there no limit??

  2. How can I enable Channel Event Logging? I can see that as a very valuable diagnostic tool.


From the system’s perspective, CDR records are “fire and forget”. Once written, the system never looks at them or touches them again. Because of that, the only limitation is disk space.

I wouldn’t recommend turning Channel Event Logging on except when debugging. I’d start with the pages at to see what the official documentation says.


Thanks Dave for the reply, so if the system were to run long enough there could be 500GB of CDR records in the DB. It seems like going back 6 months would be enough, or any other interval a person would want to keep those types of records. The reason I asked is that I had a guy want me to get specific with time frames.

Is the reasoning for not turning on CEL the same as CDR (taking up HDD space) of the fact that the system chews up CPU time to keep track of it all real time? If it was stored in the DB it could be real easy to disprove the fact that Sally transferred the caller to the wrong person, rather than to the correct one.

Yes, filling the drive with CDR data is possible, but each call takes around 100 characters. There’s a LOT of phone calls in 500 GB

CDR is a strange beast. Some places only want 60 days of Call Data (enough to validate their last phone bill). Others want 90 days (for trending). Some (lawyers, doctors, etc.) have specific durations for maintaining contact information. One of my customers needs to keep three years of history before the beginning of the current fiscal year (so, in Feb of 2016, they have to have 2013-2015). Since it depends on your specific needs, programming the phone system to enforce it does seem like a bad idea. Not only that, but it’s actually easier to maintain it by hand (or program a solution) so that your specific needs are met.

Your CEL reasoning is sound. Logging goes to disk and everything that goes to disk slows the system down. It also takes time that could be used for other things.

In your example, you might be hard pressed to prove that it was Sally that did it either way. Many phones perform “atomic” actions (from the server’s perspective) so while it could be a misdialed number, it could also be a misprogrammed phone or some other problem at the endpoint.

Some phones are less discrete with their information. For example, with debugging turned in the Chan-SCCP-B driver, each keypress is reported and logged (without, they are just reported) so you could actually see what buttons were pushed.


I think I will just tell him to tell them not to worry about the CDR. It would be nice to tell Sally that she fat fingered the extension number and actually proving it to her! We sold another Asterisk based system that had the CEL info imbedded as a link in the CR report. Now that was nice, the rest of that system wasn’t so nice after all was said and done.