CDR(field)
Reads or sets CDR[70] fields. The field is one of the
following (only reading is possible unless otherwise
noted):
clid
src
dst
dcontext
channel
dstchannel
lastapp
lastdata
start
answer
end
duration
billsec
disposition
ANSWERED, NO
ANSWER, BUSY or
FAILEDamaflags
DEFAULT,
BILLING, DOCUMENTATION and
OMIT. (Sometimes BILLING and
OMIT are replaced by BILL and
IGNORE, perhaps depending on the Asterisk
version.)accountcode
uniqueid
userfield
; Set foo to the duration of the call:
exten => 123,1,Set(foo=${CDR(duration)})
; Set the user field to "my information":
exten => 123,1,Set(CDR(userfield)=my information)
|
|
|
Internal help for this application in Asterisk 1.4: -= Info about function 'CDR' =-
[Syntax]
Here is a list of all the available cdr field names:
clid lastdata disposition
src start amaflags
dst answer accountcode
dcontext end uniqueid
dstchannel duration userfield
lastapp billsec channel
All of the above variables are read-only, except for accountcode,
userfield, and amaflags. You may, however, supply
a name not on the above list, and create your own
variable, whose value can be changed with this function,
and this variable will be stored on the cdr.
raw values for disposition:
1 = NO ANSWER
2 = BUSY
3 = FAILED
4 = ANSWERED
raw values for amaflags:
1 = OMIT
2 = BILLING
3 = DOCUMENTATION
[Synopsis]
Gets or sets a CDR variable
[Description]
Options:
'r' searches the entire stack of CDRs on the channel
'u' retrieves the raw, unprocessed value
For example, 'start', 'answer', and 'end' will be retrieved as epoch
values, when the 'u' option is passed, but formatted as YYYY-MM-DD HH:
MM:SS
otherwise. Similarly, disposition and amaflags will return their raw
integral values.
diff output to internal help in Asterisk 1.2: 5,26c5 < Here is a list of all the available cdr field names: < clid lastdata disposition < src start amaflags < dst answer accountcode < dcontext end uniqueid < dstchannel duration userfield < lastapp billsec channel < All of the above variables are read-only, except for accountcode, < userfield, and amaflags. You may, however, supply < a name not on the above list, and create your own < variable, whose value can be changed with this function, < and this variable will be stored on the cdr. < raw values for disposition: < 1 = NO ANSWER < 2 = BUSY < 3 = FAILED < 4 = ANSWERED < raw values for amaflags: < 1 = OMIT < 2 = BILLING < 3 = DOCUMENTATION < --- > CDR(<name>[|options]) 32,38c11 < Options: < 'r' searches the entire stack of CDRs on the channel < 'u' retrieves the raw, unprocessed value < For example, 'start', 'answer', and 'end' will be retrieved as epoch < values, when the 'u' option is passed, but formatted as YYYY-MM-DD H H:MM:SS < otherwise. Similarly, disposition and amaflags will return their ra w < integral values. --- > Option 'r' searches the entire stack of CDRs on the channel |