cdr

Since 12.0.0 Module Configuration Found this useful? Upvote it. ×

Call Detail Record configuration

Last reviewed 2026-04-14

Description

CDR is Call Detail Record, which provides logging services via a variety of pluggable backend modules. Detailed call information can be recorded to databases, files, etc. Useful for billing, fraud prevention, compliance with Sarbanes-Oxley aka The Enron Act, QOS evaluations, and more.

cdr.conf

[general]

Global settings applied to the CDR engine.

  • debug - Enable/disable verbose CDR debugging.
  • enable - Enable/disable CDR logging.
  • channeldefaultenabled - Whether CDR is enabled on a channel by default
  • ignorestatechanges - Whether CDR is updated or forked by bridging changes.
  • ignoredialchanges - Whether CDR is updated or forked by dial updates.
  • unanswered - Log calls that are never answered and don't set an outgoing party.
  • congestion - Log congested calls.
  • endbeforehexten - Don't produce CDRs while executing hangup logic
  • initiatedseconds - Count microseconds for billsec purposes
  • batch - Submit CDRs to the backends for processing in batches

    Warning

    Use of batch mode may result in data loss after unsafe asterisk termination, i.e., software crash, power failure, kill -9, etc.

  • size - The maximum number of CDRs to accumulate before triggering a batch

  • time - The maximum time to accumulate CDRs before triggering a batch

    Note

    Time is expressed in seconds.

  • scheduleronly - Post batched CDRs on their own thread instead of the scheduler

  • safeshutdown - Block shutdown of Asterisk until CDRs are submitted
  • canceldispositionenabled - Whether to enable CANCEL disposition in CDR

User Notes

No notes yet. Be the first to contribute a tip or example.

Contribute a note

Share a tip, gotcha, or practical example. Keep it under 2000 characters. No questions (use the Asterisk community forums for support). Wrap code in backticks.

Moderated before publishing. Email never shown.