System information

The Asterisk module has a configuration file, as well. Add the following section to /etc/
asterisk/cdr_syslog.conf:
[cdr]
facility = local4
priority = info
template = "We received a call from ${CDR(src)}"
Here is an example syslog entry using this configuration:
$ cat /var/log/asterisk/asterisk-cdr.log
Aug 12 19:17:36 pbx cdr: "We received a call from 2565551212"
cdr_tds
The cdr_tds module uses the FreeTDS library to post CDRs to a Microsoft SQL Server
or Sybase database. It is possible to use FreeTDS with unixODBC, so we recommend
using cdr_adaptive_odbc instead of this module.
Example Call Detail Records
We will use the cdr_custom module to illustrate some example CDR records for different
call scenarios. The configuration used for /etc/asterisk/cdr_custom.conf is shown in
“cdr_custom” on page 532.
Single-party call
In this example, we’ll show what a CDR looks like for a simple one-party call. Specif-
ically, we will use the example of a user calling in to check her voicemail. Here is the
extension from /etc/asterisk/extensions.conf:
exten => *98,1,VoiceMailMain(@${GLOBAL(VOICEMAIL_CONTEXT)})
This is the CDR from /var/log/asterisk/cdr-custom/Master.csv that was created as a result
of calling this extension:
"""Console"" <2565551212>","2565551212","*98","UserServices","Console/dsp","",
"VoiceMailMain","@shifteight.org","2010-08-16 01:08:44","2010-08-16 01:08:44",
"2010-08-16 01:08:53","9","9","ANSWERED","DOCUMENTATION","","1281935324.0","",0
Two-party call
For this next example, we show what a CDR looks like for a simple two-party call.
We’ll have one SIP phone place a call to another SIP phone. The call is answered and
then hung up after a short period of time. Here is the extension that was dialed:
exten => 101,1,Dial(SIP/0000FFFF0002)
536 | Chapter 24:System Monitoring and Logging