System information
The following example shows a sample configuration for cel_custom that enables a
single CEL log file, Master.csv. This file will be created as /var/log/asterisk/cel-custom/
Master.csv. The template that has been defined uses the CHANNEL(), CALLERID(), and
CSV_QUOTE() dialplan functions. The CSV_QUOTE() function ensures that the values are
properly escaped for the CSV file format. This example also references some special
CEL variables, which are listed in Table 24-13.
Table 24-13. CEL variables available for use in [mappings]
CEL variable Value/Example Description
${eventtype} CHAN_START The name of the CEL event.
${eventtime} 1281980238.660403 The timestamp of the CEL event. The timestamp is given in the default
format in this example.
${eventextra} Whiskey Tango Foxtrot Custom data included with a CEL event. Extra data is usually included
when CELGenUserEvent() is used.
Here is the example /etc/asterisk/cel_custom.conf file:
[mappings]
Master.csv => ${CSV_QUOTE(${eventtype})},${CSV_QUOTE(${eventtime})},
${CSV_QUOTE(${CALLERID(name)})},${CSV_QUOTE(${CALLERID(num)})},
${CSV_QUOTE(${CALLERID(ANI)})},${CSV_QUOTE(${CALLERID(RDNIS)})},
${CSV_QUOTE(${CALLERID(DNID)})},${CSV_QUOTE(${CHANNEL(exten)})},
${CSV_QUOTE(${CHANNEL(context)})},${CSV_QUOTE(${CHANNEL(channame)})},
${CSV_QUOTE(${CHANNEL(appname)})},${CSV_QUOTE(${CHANNEL(appdata)})},
${CSV_QUOTE(${CHANNEL(amaflags)})},${CSV_QUOTE(${CHANNEL(accountcode)})},
${CSV_QUOTE(${CHANNEL(uniqueid)})},${CSV_QUOTE(${CHANNEL(linkedid)})},
${CSV_QUOTE(${CHANNEL(peer)})},${CSV_QUOTE(${CHANNEL(userfield)})},
${CSV_QUOTE(${eventextra})}
In the actual configuration file, the value in the Master.csv mapping
should be on a single line.
cel_manager
The cel_manager backend emits CEL events on the Asterisk Manager Interface (we
discussed the AMI in detail in Chapter 20). This module is configured in the /etc/as-
terisk/cel.conf file. This file should contain a single section called [manager], which
contains a single option to enable this module. The default value is no, but you can
enable it as follows:
[manager]
enabled = yes
544 | Chapter 24: System Monitoring and Logging