Asterisk cdr csv

Asterisk call data records in comma-separated text files

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: Asterisk billing 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.


In some cases, uniqueid is appended:
  • uniqueid: Unique Channel Identifier (32 characters)
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


Created by: oej, Last modification: Sat 03 of Jan, 2009 (15:34 UTC) by rafikberzi


Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+

Page Changes | Comments

 

Featured -

Search: