D.8. cdr.conf
The cdr.conf
file is used to enable call detail record logging to a database.
Storing call records is useful for all sorts of purposes, including
billing, fraud prevention, QoS evaluations, and more. cdr.conf contains some general parameters that
are not specific to any particular database, but rather indicate
how Asterisk should handle the passing of information to the
database. All options are under the [general] heading of
the cdr.conf file:
batch
-
Accepts the arguments yes and
no. Allows Asterisk to write data to a buffer instead of
writing to the database at the end of every call, to reduce load on
the system.
|
Note that if the system dies unexpectedly when
this option is set to yes, data loss may occur.
|
|
enable
-
Accepts the arguments yes and
no. Specifies whether or not to use CDR logging. If set to
no, this will override any CDR module explicitly loaded.
The default is yes.
safeshutdown
-
Accepts the arguments yes and
no. Setting safeshutdown to yes will
prevent Asterisk from shutting down completely until the buffer is
flushed and all information is written to the database. If this
parameter is set to no and you shut down Asterisk with
information still residing in the buffers, that information will
likely be lost.
scheduleronly
-
Accepts the arguments yes and
no. If you are generating a massive volume of CDRs on a
system that is pushing them to a remote database, setting
scheduleronly to yes may be of benefit. Since the
scheduler cannot start a new task until the current one is
finished, slow CDR writes may adversely affect other processes
needing the scheduler. This setting will instruct Asterisk to
handle CDR writes in a new thread, essentially assigning a
dedicated scheduler to this function. In normal operation, this
would yield very little benefit.
size
-
Accepts an integer as its argument. Defines the
number of CDRs to accumulate in the buffer before writing to the
database. The default is 100.
time
-
Accepts an integer (in seconds) as its argument.
Sets the number of seconds before Asterisk flushes the buffer and
writes the CDRs to the database, regardless of the number of
records in the buffer (as defined by size). The default is
300 seconds (5 minutes).
|