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