cdr.conf.sample 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. ;
  2. ; Asterisk Call Detail Record engine configuration
  3. ;
  4. ; CDR is Call Detail Record, which provides logging services via a variety of
  5. ; pluggable backend modules. Detailed call information can be recorded to
  6. ; databases, files, etc. Useful for billing, fraud prevention, compliance with
  7. ; Sarbanes-Oxley aka The Enron Act, QOS evaluations, and more.
  8. ;
  9. [general]
  10. ; Define whether or not to use CDR logging. Setting this to "no" will override
  11. ; any loading of backend CDR modules. Default is "yes".
  12. ;enable=yes
  13. ; Define whether or not to log unanswered calls that don't involve an outgoing
  14. ; party. Setting this to "yes" will make calls to extensions that don't answer
  15. ; and don't set a B side channel (such as by using the Dial application)
  16. ; receive CDR log entries. If this option is set to "no", then those log
  17. ; entries will not be created. Unanswered Calls which get offered to an
  18. ; outgoing line will always receive log entries regardless of this option, and
  19. ; that is the intended behaviour.
  20. ;unanswered = no
  21. ; Define whether or not to log congested calls. Setting this to "yes" will
  22. ; report each call that fails to complete due to congestion conditions. Default
  23. ; is "no".
  24. ;congestion = no
  25. ; Normally, CDR's are not closed out until after all extensions are finished
  26. ; executing. By enabling this option, the CDR will be ended before executing
  27. ; the "h" extension and hangup handlers so that CDR values such as "end" and
  28. ; "billsec" may be retrieved inside of of this extension.
  29. ; The default value is "no".
  30. ;endbeforehexten=no
  31. ; Normally, the 'billsec' field logged to the backends (text files or databases)
  32. ; is simply the end time (hangup time) minus the answer time in seconds. Internally,
  33. ; asterisk stores the time in terms of microseconds and seconds. By setting
  34. ; initiatedseconds to 'yes', you can force asterisk to report any seconds
  35. ; that were initiated (a sort of round up method). Technically, this is
  36. ; when the microsecond part of the end time is greater than the microsecond
  37. ; part of the answer time, then the billsec time is incremented one second.
  38. ; The default value is "no".
  39. ;initiatedseconds=no
  40. ; Define the CDR batch mode, where instead of posting the CDR at the end of
  41. ; every call, the data will be stored in a buffer to help alleviate load on the
  42. ; asterisk server. Default is "no".
  43. ;
  44. ; WARNING WARNING WARNING
  45. ; Use of batch mode may result in data loss after unsafe asterisk termination
  46. ; ie. software crash, power failure, kill -9, etc.
  47. ; WARNING WARNING WARNING
  48. ;
  49. ;batch=no
  50. ; Define the maximum number of CDRs to accumulate in the buffer before posting
  51. ; them to the backend engines. 'batch' must be set to 'yes'. Default is 100.
  52. ;size=100
  53. ; Define the maximum time to accumulate CDRs in the buffer before posting them
  54. ; to the backend engines. If this time limit is reached, then it will post the
  55. ; records, regardless of the value defined for 'size'. 'batch' must be set to
  56. ; 'yes'. Note that time is in seconds. Default is 300 (5 minutes).
  57. ;time=300
  58. ; The CDR engine uses the internal asterisk scheduler to determine when to post
  59. ; records. Posting can either occur inside the scheduler thread, or a new
  60. ; thread can be spawned for the submission of every batch. For small batches,
  61. ; it might be acceptable to just use the scheduler thread, so set this to "yes".
  62. ; For large batches, say anything over size=10, a new thread is recommended, so
  63. ; set this to "no". Default is "no".
  64. ;scheduleronly=no
  65. ; When shutting down asterisk, you can block until the CDRs are submitted. If
  66. ; you don't, then data will likely be lost. You can always check the size of
  67. ; the CDR batch buffer with the CLI "cdr status" command. To enable blocking on
  68. ; submission of CDR data during asterisk shutdown, set this to "yes". Default
  69. ; is "yes".
  70. ;safeshutdown=yes
  71. ;
  72. ;
  73. ; CHOOSING A CDR "BACKEND" (what kind of output to generate)
  74. ;
  75. ; To choose a backend, you have to make sure either the right category is
  76. ; defined in this file, or that the appropriate config file exists, and has the
  77. ; proper definitions in it. If there are any problems, usually, the entry will
  78. ; silently ignored, and you get no output.
  79. ;
  80. ; Also, please note that you can generate CDR records in as many formats as you
  81. ; wish. If you configure 5 different CDR formats, then each event will be logged
  82. ; in 5 different places! In the example config files, all formats are commented
  83. ; out except for the cdr-csv format.
  84. ;
  85. ; Here are all the possible back ends:
  86. ;
  87. ; csv, custom, manager, odbc, pgsql, radius, sqlite, tds
  88. ; (also, mysql is available via the asterisk-addons, due to licensing
  89. ; requirements)
  90. ; (please note, also, that other backends can be created, by creating
  91. ; a new backend module in the source cdr/ directory!)
  92. ;
  93. ; Some of the modules required to provide these backends will not build or install
  94. ; unless some dependency requirements are met. Examples of this are pgsql, odbc,
  95. ; etc. If you are not getting output as you would expect, the first thing to do
  96. ; is to run the command "make menuselect", and check what modules are available,
  97. ; by looking in the "2. Call Detail Recording" option in the main menu. If your
  98. ; backend is marked with XXX, you know that the "configure" command could not find
  99. ; the required libraries for that option.
  100. ;
  101. ; To get CDRs to be logged to the plain-jane /var/log/asterisk/cdr-csv/Master.csv
  102. ; file, define the [csv] category in this file. No database necessary. The example
  103. ; config files are set up to provide this kind of output by default.
  104. ;
  105. ; To get custom csv CDR records, make sure the cdr_custom.conf file
  106. ; is present, and contains the proper [mappings] section. The advantage to
  107. ; using this backend, is that you can define which fields to output, and in
  108. ; what order. By default, the example configs are set up to mimic the cdr-csv
  109. ; output. If you don't make any changes to the mappings, you are basically generating
  110. ; the same thing as cdr-csv, but expending more CPU cycles to do so!
  111. ;
  112. ; To get manager events generated, make sure the cdr_manager.conf file exists,
  113. ; and the [general] section is defined, with the single variable 'enabled = yes'.
  114. ;
  115. ; For odbc, make sure all the proper libs are installed, that "make menuselect"
  116. ; shows that the modules are available, and the cdr_odbc.conf file exists, and
  117. ; has a [global] section with the proper variables defined.
  118. ;
  119. ; For pgsql, make sure all the proper libs are installed, that "make menuselect"
  120. ; shows that the modules are available, and the cdr_pgsql.conf file exists, and
  121. ; has a [global] section with the proper variables defined.
  122. ;
  123. ; For logging to radius databases, make sure all the proper libs are installed, that
  124. ; "make menuselect" shows that the modules are available, and the [radius]
  125. ; category is defined in this file, and in that section, make sure the 'radiuscfg'
  126. ; variable is properly pointing to an existing radiusclient.conf file.
  127. ;
  128. ; For logging to sqlite databases, make sure the 'cdr.db' file exists in the log directory,
  129. ; which is usually /var/log/asterisk. Of course, the proper libraries should be available
  130. ; during the 'configure' operation.
  131. ;
  132. ; For tds logging, make sure the proper libraries are available during the 'configure'
  133. ; phase, and that cdr_tds.conf exists and is properly set up with a [global] category.
  134. ;
  135. ; Also, remember, that if you wish to log CDR info to a database, you will have to define
  136. ; a specific table in that databse to make things work! See the doc directory for more details
  137. ; on how to create this table in each database.
  138. ;
  139. [csv]
  140. usegmtime=yes ; log date/time in GMT. Default is "no"
  141. loguniqueid=yes ; log uniqueid. Default is "no"
  142. loguserfield=yes ; log user field. Default is "no"
  143. accountlogs=yes ; create separate log file for each account code. Default is "yes"
  144. ;newcdrcolumns=yes ; Enable logging of post-1.8 CDR columns (peeraccount, linkedid, sequence).
  145. ; Default is "no".
  146. ;[radius]
  147. ;usegmtime=yes ; log date/time in GMT
  148. ;loguniqueid=yes ; log uniqueid
  149. ;loguserfield=yes ; log user field
  150. ; Set this to the location of the radiusclient-ng configuration file
  151. ; The default is /etc/radiusclient-ng/radiusclient.conf
  152. ;radiuscfg => /usr/local/etc/radiusclient-ng/radiusclient.conf