README.cdr 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. Asterisk billing support - Call Detail Records
  2. ----------------------------------------------
  3. Asterisk generates Call Detail Records in a database or in a comma
  4. separated text file.
  5. * cdr_csv supports comma separated text file storage, this is the
  6. default driver
  7. * cdr_manager supports CDR information via the AMI, The Asterisk Manager
  8. interface
  9. * cdr_odbc supports UnixODBC databases, see http://www.unixodbc.org
  10. for an updated list of supported databases, from MySQL to MsSQL
  11. and text files.
  12. * cdr_tds supports FreeTDS databases (Among them MS SQL)
  13. * cdr_sqlite supports SQlite
  14. * cdr_pgsql supports PostgreSQL
  15. In the asterisk-addons cvs archive, there's a cdr_mysql driver for
  16. MySQL.
  17. Applications
  18. ------------
  19. * setaccount Set account code for billing
  20. * setAMAflags Sets AMA flags
  21. * NoCDR Make sure no CDR is saved for a specific call
  22. * resetCDR Reset CDR
  23. * forkCDR Save current CDR and start a new CDR for this call
  24. * authenticate Authenticates and sets the account code
  25. * SetCDRUserField Set CDR user field
  26. * AppendCDRUserField Append data to CDR User field
  27. For more information, use the "show application" command.
  28. You can set default account codes and AMA flags for devices in
  29. channel configuration files, like sip.conf, iax.conf etc.
  30. Fields of the CDR in Asterisk
  31. -----------------------------
  32. 1. accountcode: What account number to use, (string, 20 characters)
  33. 2. src: Caller*ID number (string, 80 characters)
  34. 3. dst: Destination extension (string, 80 characters)
  35. 4. dcontext: Destination context (string, 80 characters)
  36. 5. clid: Caller*ID with text (80 characters)
  37. 6. channel: Channel used (80 characters)
  38. 7. dstchannel: Destination channel if appropriate (80 characters)
  39. 8. lastapp: Last application if appropriate (80 characters)
  40. 9. lastdata: Last application data (arguments) (80 characters)
  41. 10. start: Start of call (date/time)
  42. 11. answer: Answer of call (date/time)
  43. 12. end: End of call (date/time)
  44. 13. duration: Total time in system, in seconds (integer), from dial to hangup
  45. 14. billsec: Total time call is up, in seconds (integer), from answer to hangup
  46. 15. disposition: What happened to the call: ANSWERED, NO ANSWER, BUSY
  47. 16. amaflags: What flags to use: DOCUMENTATION, BILL, IGNORE etc,
  48. specified on a per channel basis like accountcode.
  49. 17. user field: A user-defined field, maximum 255 characters
  50. In some cases, uniqueid is appended:
  51. * uniqueid: Unique Channel Identifier (32 characters)
  52. This needs to be enabled in the source code at compile time
  53. ONE IMPORTANT NOTE: If you are trying to collect records on IAX to IAX calls
  54. you need to be aware that by default, IAX will attempt to transfer calls
  55. in this situation (if DTMF is not required). When the transfer is completed
  56. the call is dumped from the middle machine and thus the call detail records
  57. will report a short call time. If you want detailed records you must
  58. turn off IAX transfer, but unless your servers are very close together, you
  59. will definitely get a latency hit from doing so.