asterisk/cdr.conf

Fri, 15 Oct 2010 18:46:25 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 15 Oct 2010 18:46:25 +0200
changeset 261
4f973c756446
permissions
-rw-r--r--

Update copyright, file server URL, modify doc and link logic.
Now documentation is installed by default to the correct path,
and QtCreator links against Qt shared libraries instead of Qt
static libraries. This unfortunate change supports Nokia's
unfortunate decision to poorly support static linking in Qt.

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

mercurial