System information
Table 24-12 shows the options that can be specified in a table configuration section in
the cel_odbc.conf file.
Table 24-12. cel_odbc.conf table configuration
Option Value/Example Notes
connection pgsql1 Specifies 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 Specifies the table name. This field is required.
usegmtime no Enables/disables logging of 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,
cel_odbc.conf allows for a few other configuration items. The first is a column alias.
Normally, CEL fields 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 <CEL field> => <column name>
Here is an example column mapping using the alias option:
alias exten => extension
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 <CEL field> => <content>
Here is an example content filter:
filter appname => Dial
Finally, cel_odbc.conf allows static content to be specified for a column. This can be
useful when used along with a set of filters. This static content can help differentiate
records that were inserted into the same table by different configuration sections. 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 a CEL event:
static "My Content" => my_identifier
cel_custom
This CEL backend allows for custom formatting of CEL events in a log file. It is most
commonly used for customized CSV output. The configuration file used for this module
is /etc/asterisk/cel_custom.conf. A single section called [mappings] should exist in this
file. This section contains mappings between filenames and the custom templates for
CEL events. The templates are specified using Asterisk dialplan functions and a few
special CEL variables.
CEL (Channel Event Logging) | 543