Upgrade 3CX to v18 and get it hosted free!

Asterisk cdr csv

Author image

Asterisk call data records (cdr) in comma-separated text files (csv). By default, Asterisk generates CDR records in comma-separated text files in the __/var/log/asterisk/cdr-csv directory. The file Master.csv contains all records. Detail records can be partially configured on a channel basis, and some of the data for IAX and SIP can be determined on the user level. The Zap configuration for CDR records is determined by channel in zaptel.conf

For this to work you do need to have cdr_csv.so loaded. ‘show modules‘ or ‘module show‘ entered at the CLI will tell you if it has been loaded. If not: Type ‘load cdr_csv.so‘ in the CLI. You’ll also want to add that load command to /etc/asterisk/modules.conf if Asterisk didn’t automatically include this module at startup.

Fields

  1. accountcode: What account number to use: account, (string, 20 characters)
  2. src: Caller*ID number (string, 80 characters)
  3. dst: Destination extension (string, 80 characters)
  4. dcontext: Destination context (string, 80 characters)
  5. clid: Caller*ID with text (80 characters)
  6. channel: Channel used (80 characters)
  7. dstchannel: Destination channel if appropriate (80 characters)
  8. lastapp: Last application if appropriate (80 characters)
  9. lastdata: Last application data (arguments) (80 characters)
  10. start: Start of call (date/time)
  11. answer: Answer of call (date/time)
  12. end: End of call (date/time)
  13. duration: Total time in system, in seconds (integer)
  14. billsec: Total time call is up, in seconds (integer)
  15. disposition: What happened to the call: ANSWERED, NO ANSWER, BUSY, FAILED
  16. amaflags: What flags to use: see amaflags::DOCUMENTATION, BILL, IGNORE etc, specified on a per channel basis like accountcode.
  17. Uniqueid: Unique Channel Identifier (32 characters) (In some cases, uniqueid is appended)

Note: You can edit the source file cdr_csv.c to enable CSV_LOGUNIQUEID (it’s disabled by default). Same goes for userfield.

See also


Article Reviews

Write a Review

Your email address will not be published. Required fields are marked *

Required Field. Minimum 5 characters.

Required Field. Minimum 5 characters, maximum 50.

Required field.There is an error with this field.

Required Field.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

There are no reviews for this article. Be the first one to write a review.

Related Posts:

Get 3CX - Absolutely Free!
Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.