System information
[mytable]
connection = asterisk
table = asterisk_cdr
A more detailed example of setting up a database for logging CDRs can be found in
“Storing Call Detail Records (CDRs)” on page 375.
Table 24-4 lists the options that can be specified in a table configuration section in the
cdr_adaptive_odbc.conf file.
Table 24-4. cdr_adaptive_odbc.conf table configuration options
Option Value/Example Notes
connection pgsql1 The database connection to be used. This is a reference to the configured connection in
res_odbc.conf. This field is required.
table asterisk_cdr The table name. This field is required.
usegmtime no Indicates whether to log timestamps using GMT instead of local time. The default value
for this option is no.
In addition to the key/value pair fields that are shown in the previous table, cdr_adap-
tive_odbc.conf allows for a few other configuration items. The first is a column alias.
Normally, CDR variables are logged to columns of the same name. An alias allows the
variable name to be mapped to a column with a different name. The syntax is:
alias <CDR variable> => <column name>
Here is an example column mapping using the alias option:
alias src => source
It is also possible to specify a content filter. This allows you to specify criteria that must
match for records to be inserted into the table. The syntax is:
filter <CDR variable> => <content>
Here is an example content filter:
filter accountcode => 123
Finally, cdr_adaptive_odbc.conf allows static content for a column to be defined. This
can be useful when used along with a set of filters. This static content can help dif-
ferentiate records that were inserted into the same table by different configuration sec-
tions. The syntax for static content is:
static <"Static Content Goes Here"> => <column name>
Here is an example of specifying static content to be inserted with CDRs:
static "My Content" => my_identifier
Call Detail Records | 531