System information

Option Value/Example Notes
lastdata SIP/0004F2046969,30,tT The arguments passed to the lastapp. This field is set automat-
ically and is read-only.
start 2010-10-26 12:00:00 The start time of the call. This field is set automatically and is read-
only.
answer 2010-10-26 12:00:15 The answered time of the call. This field is set automatically and
is read-only.
end 2010-10-26 12:03:15 The end time of the call. This field is set automatically and is read-
only.
duration 195 The number of seconds between the start and end times for
the call. This field is set automatically and is read-only.
billsec 180 The number of seconds between the answer and end times for
the call. This field is set automatically and is read-only.
disposition ANSWERED An indication of what happened to the call. This may be NO
ANSWER, FAILED, BUSY, ANSWERED, or UNKNOWN.
amaflags DOCUMENTATION The Automatic Message Accounting (AMA) flag associated with
this call. This may be one of the following: OMIT, BILLING,
DOCUMENTATION, or Unknown.
userfield PerMinuteCharge:0.02 A general-purpose user field. This field is empty by default and can
be set to a user-defined string.
a
uniqueid 1288112400.1 The unique ID for the src channel. This field is set automatically
and is read-only.
a
The userfield is not as relevant now as it used to be. Custom CDR variables are a more flexible way to get custom data into CDRs.
All fields of the CDR record can be accessed in the Asterisk dialplan by using the
CDR() function. The CDR() function is also used to set the fields of the CDR that are
user-defined.
exten => 115,1,Verbose(Call start time: ${CDR(start)})
same => n,Set(CDR(userfield)=zombie pancakes)
In addition to the fields that are always included in a CDR, it is possible to add custom
fields. This is done in the dialplan by using the Set() application with the CDR()
function:
exten => 115,1,NoOp()
same => n,Set(CDR(mycustomfield)=coffee)
same => n,Verbose(I need some more ${CDR(mycustomfield)})
If you choose to use custom CDR variables, make sure that the CDR
backend that you choose is capable of logging them.
528 | Chapter 24:System Monitoring and Logging