cdr_syslog.conf.sample 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. ;
  2. ; Asterisk Call Detail Records (CDR) - Syslog Backend
  3. ;
  4. ; The cdr_syslog module writes CDRs using the facilities provided by syslog.
  5. ;
  6. ; Not only must you configure cdr_syslog from this file (cdr_syslog.conf) but
  7. ; you will also need to make changes to your /etc/syslog.conf before CDRs will
  8. ; be written to syslog.
  9. ;
  10. ; As an example, you can add the following to /etc/syslog.conf:
  11. ;
  12. ; local4.info /var/log/asterisk-cdr.log
  13. ;
  14. ; And then instruct syslogd to re-read the configuration file by sending it a
  15. ; HUP signal. On Linux this can be done like this:
  16. ;
  17. ; kill -HUP `cat /var/run/syslogd.pid`
  18. ;
  19. ; Finally, you will need to uncomment the [cdr-simple] section below, and restart
  20. ; Asterisk. When calls are placed, you should start seeing records appear in
  21. ; /var/log/asterisk-cdr.log.
  22. [general]
  23. ; Facility
  24. ;
  25. ; The 'facility' keyword specifies the syslog facility to use when writing out
  26. ; CDRs.
  27. ;
  28. ; Accepted values: One of the following:
  29. ; user, local0, local1, local2, local3, local4, local5, local6
  30. ; and local7.
  31. ;
  32. ; Note: Depending on your platform, the following may also be
  33. ; available:
  34. ; auth, authpriv, cron, daemon, ftp, kern, lpr, mail,
  35. ; news, syslog, and uucp.
  36. ;
  37. ; Default value: local4
  38. ;facility=local0
  39. ; Priority
  40. ;
  41. ; Use the 'priority' keyword to select which of the syslog priority levels to
  42. ; use when logging CDRs.
  43. ;
  44. ; Accepted values: One of the following:
  45. ; alert, crit, debug, emerg, err, info, notice, warning
  46. ; Default value: info
  47. ;priority=warn
  48. ; Note: The settings for 'facility' and 'priority' in the [general] section
  49. ; define the default values for all of the logging locations created
  50. ; below in separate sections.
  51. ;[cdr-master]
  52. ;facility = local5
  53. ;priority = debug
  54. ; Template
  55. ;
  56. ; The 'template' value allows you to specify a custom format for messages
  57. ; written to syslog. This is similar to how cdr_custom is configured.
  58. ;
  59. ; Allowed values: A diaplan style string.
  60. ; Default value: None, this is required field.
  61. ;
  62. ; Note: Because of the way substitution is done, the only meaningful values
  63. ; available when the record is logged are those available via the CDR()
  64. ; dialplan function. All other channel variables will be unavailable.
  65. ;template = "${CDR(clid)}","${CDR(src)}","${CDR(dst)}","${CDR(dcontext)}","${CDR(channel)}","${CDR(dstchannel)}","${CDR(lastapp)}","${CDR(lastdata)}","${CDR(start)}","${CDR(answer)}","${CDR(end)}","${CDR(duration)}","${CDR(billsec)}","${CDR(disposition)}","${CDR(amaflags)}","${CDR(accountcode)}","${CDR(uniqueid)}","${CDR(userfield)}"
  66. ; High Resolution Time for billsec and duration fields
  67. ;template = "${CDR(clid)}","${CDR(src)}","${CDR(dst)}","${CDR(dcontext)}","${CDR(channel)}","${CDR(dstchannel)}","${CDR(lastapp)}","${CDR(lastdata)}","${CDR(start)}","${CDR(answer)}","${CDR(end)}","${CDR(duration,f)}","${CDR(billsec,f)}","${CDR(disposition)}","${CDR(amaflags)}","${CDR(accountcode)}","${CDR(uniqueid)}","${CDR(userfield)}"
  68. ;[cdr-simple]
  69. ; Since we don't specify a facility or priority for this logging location, the
  70. ; records will use the defaults specified in the [general] section.
  71. ;template = "We received a call from ${CDR(src)}"