CDR(Feld
)
Feld
ist eines der folgenden (wenn nichts
anders angegeben ist, ist nur Lesen möglich):clid
src
dst
dcontext
channel
dstchannel
lastapp
lastdata
start
answer
end
duration
billsec
disposition
ANSWERED
, NO
ANSWER
, BUSY
oder FAILED
amaflags
DEFAULT
(System-Default),
BILLING
(zur Abrechnung), DOCUMENTATION
(zur Dokumentierung) oder OMIT
(keine Aufzeichnung).
(Manchmal findet man statt BILLING
und
OMIT
auch die Angaben BILL
und
IGNORE
– was eventuell von der Asterisk-Version
abhängt.)accountcode
uniqueid
userfield
; foo auf die Dauer des Anrufs setzen: exten => 123,1,Set(foo=${CDR(duration)}) ; das User-Feld auf "meine Infos" setzen: exten => 123,1,Set(CDR(userfield)=meine Infos)
————————| 1.2 |————————| 1.4 |————————| 1.6 |————————
-= Info about function 'CDR' =-
[Syntax]
CDR(<name>[|options])
[Synopsis]
Gets or sets a CDR variable
[Description]
Options:
'l' uses the most recent CDR on a channel with multiple records
'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.
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
--- in Asterisk 1.2
+++ in Asterisk 1.4
@@ -7,4 +7,32 @@
Gets or sets a CDR variable
[Description]
- Option 'r' searches the entire stack of CDRs on the channel
+ Options:
+ 'l' uses the most recent CDR on a channel with multiple records
+ '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.
+ 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
--- in Asterisk 1.4
+++ in Asterisk 1.6
@@ -1,7 +1,7 @@
-= Info about function 'CDR' =-
[Syntax]
- CDR(<name>[|options])
+ CDR(<name>[,options])
[Synopsis]
Gets or sets a CDR variable
@@ -10,6 +10,8 @@
Options:
'l' uses the most recent CDR on a channel with multiple records
'r' searches the entire stack of CDRs on the channel
+ 's' skips any CDR's that are marked 'LOCKED' due to forkCDR() calls.
+ (on setting/writing CDR vars only)
'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
@@ -27,11 +29,13 @@
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.
+ For setting CDR values, the 'l' flag does not apply to
+ setting the accountcode, userfield, or amaflags.
raw values for disposition:
1 = NO ANSWER
- 2 = BUSY
- 3 = FAILED
- 4 = ANSWERED
+ 2 = BUSY
+ 3 = FAILED
+ 4 = ANSWERED
raw values for amaflags:
1 = OMIT
2 = BILLING