Debian Codegraph @

configs/samples/cel_sqlite3_custom.conf.sample

raw
1 ;
2 ; Asterisk Channel Event Logging (CEL) - Custom Sqlite3 Backend
3 ;
4
5 ; This is the configuration file for the customizable Sqlite3 backend for CEL
6 ; logging.
7 ;
8 ; Legacy vs Advanced Mappings
9 ;
10 ; Legacy mappings are those that are defined using dialplan functions like
11 ; CALLERID and CHANNEL and require a VERY expensive function replacement
12 ; process at runtime for every record output.
13 ;
14 ; Advanced mappings are those that are defined by a simple list of field names
15 ; and uses significantly less resources at runtime.
16 ;
17 ;
18 ; Each category in this file represents a separate Sqlite3 database file.
19 ; A filename that starts with a forward-slash '/' will be treated as an absolute
20 ; path name. If it doesn't, it must be a file name with no directory separators
21 ; which will be placed in the /var/log/asterisk directory. If the database
22 ; file doesn't already exist, it will be created.
23 ;
24 ; Previous versions of Asterisk limited the output to a single database file
25 ; named "master" which was shared with CDR Sqlite3 logging. That is no longer
26 ; the case.
27 ;
28 ;
29 ; There are several "special" variables created by this module that can be used
30 ; in a mapping, both legacy and advanced:
31 ;
32 ; eventtype - The name of the CEL event.
33 ; eventtime - The timestamp of the CEL event.
34 ; eventenum - Like eventtype but is "USER_DEFINED" for a user defined event.
35 ; userdeftype - User defined event type name from CELGenUserEvent().
36 ; eventextra - Extra data included with this CEL event, typically along with
37 ; an event of type USER_DEFINED from CELGenUserEvent().
38 ; BRIDGEPEER - Bridged peer channel name at the time of the CEL event.
39 ; CHANNEL(peer) could also be used.
40 ;
41 ; Legacy Mappings
42 ;
43 ; Within a legacy mapping, use the CALLERID() and CHANNEL() functions or
44 ; the special variables above to retrieve values from the CEL event.
45 ;
46 ; NOTE: If your legacy mapping uses only those two functions and the special
47 ; variables, the module will attempt to strip the functions and create a much
48 ; faster advanced mapping for it. However, we urge you to create a real advanced
49 ; mapping and not rely on this process. If the mapping contains something not
50 ; recognized it will go the slower legacy route.
51 ;
52 ;
53 ;[cel_master]
54 ;table = cel ; The name of the table in the database into which records
55 ; are to be written. If the table doesn't already exist,
56 ; it will be created.
57
58 ;columns = eventtype, eventtime, cidname, cidnum, cidani, cidrdnis, ciddnid, context, exten, channame, appname, appdata, amaflags, accountcode, uniqueid, userfield, peer, userdeftype, eventextra
59 ; The column names to receive the fields. If the table doesn't already exist,
60 ; it will be created with these columns. If the table does exist, this list
61 ; MUST match the existing columns or the config will fail to load.
62 ; The column names do NOT have to match the field names however.
63
64 values = '${eventtype}','${eventtime}','${CALLERID(name)}','${CALLERID(num)}','${CALLERID(ANI)}','${CALLERID(RDNIS)}','${CALLERID(DNID)}','${CHANNEL(context)}','${CHANNEL(exten)}','${CHANNEL(channame)}','${CHANNEL(appname)}','${CHANNEL(appdata)}','${CHANNEL(amaflags)}','${CHANNEL(accountcode)}','${CHANNEL(uniqueid)}','${CHANNEL(userfield)}','${BRIDGEPEER}','${userdeftype}','${eventextra}'
65 ; The list of fields to write into the columns.
66 ; Each field MUST be enclosed in single-quotes and the fields separated
67 ; by commas. Additionally, the number of fields specified MUST match the
68 ; number of columns or the config will fail to load.
69
70 ;busy_timeout = 1000 ; The number of milliseconds to wait for a database operation
71 ; to complete before an error is returned.
72
73 ;
74 ; Advanced Mappings
75 ;
76 ;[cdr_advanced]
77 ;table = cel ; The name of the table in the database into which records
78 ; are to be written. If the table doesn't already exist,
79 ; it will be created.
80
81 ;columns = eventtype, literal, eventtime, cidname, cidnum, cidani, cidrdnis, ciddnid, context, exten, channame, appname, appdata, amaflags, accountcode, uniqueid, userfield, peer, userdeftype, eventextra
82 ; The column names to receive the fields. If the table doesn't already exist,
83 ; it will be created with these columns. If the table does exist, this list
84 ; MUST match the existing columns or the config will fail to load.
85 ; The column names do NOT have to match the field names however.
86
87 ;fields = eventtype, "some literal", eventtime, name, num, ani, rdnis, dnid, context, exten, channame, appname, appdata, amaflags, accountcode, uniqueid, userfield, peer, userdeftype, eventextra
88 ; The "fields" parameter differentiates this mapping as an Advanced one
89 ; as opposed to "values" used above.
90 ;
91 ; This is the list of fields to include in the record. The field names are the
92 ; same as in the legacy mapping but without any enclosing dialplan functions or
93 ; quotes. You can specify literals to be placed in the output record by
94 ; double-quoting them. There is also some special notation available in the
95 ; form of "qualifiers". A qualifier is a list of tags, separated by the '^'
96 ; character and placed directly after the field name and enclosed in parentheses.
97 ;
98 ; The default output format for the "EventTime" timestamp field is the "%Y-%m-%d %T"
99 ; strftime string format however you can also format the field as an int64 or a
100 ; float: `eventtime(int64)` or `eventtime(float)`.
101 ;
102 ; Unlike CDRs, the "amaflags" field is output as its numerical value by default
103 ; for historical reasons. You can output it as its friendly string with
104 ; `amaflags(amaflags)`. This will print "DOCUMENTATION" instead of "3" for instance.
105 ;
106 ; If you need to combine flags, use the caret '^' symbol: `eventtime(int64^noquote)`
107 ;
108 ; Final notes about "fields":
109 ; Field names and qualifiers aren't case sensitive.
110 ; You MUST use commas to separate the fields.
111 ; You MUST use double-quotes to indicate literal fields.
112 ; Whitespace in "fields" is ignored except in literals.
113
114 ;busy_timeout = 1000 ; The number of milliseconds to wait for a database operation
115 ; to complete before an error is returned.
116