21
21
<LINK REL="next" HREF="node216.html">
22
22
<LINK REL="previous" HREF="node214.html">
23
<LINK REL="up" HREF="node212.html">
23
<LINK REL="up" HREF="node213.html">
24
24
<LINK REL="next" HREF="node216.html">
29
29
<DIV CLASS="navigation"><!--Navigation Panel-->
30
<A NAME="tex2html3461"
30
<A NAME="tex2html3464"
31
31
HREF="node216.html">
32
32
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
33
33
SRC="/usr/share/latex2html/icons/next.png"></A>
34
<A NAME="tex2html3457"
34
<A NAME="tex2html3460"
36
36
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
37
37
SRC="/usr/share/latex2html/icons/up.png"></A>
38
<A NAME="tex2html3451"
38
<A NAME="tex2html3454"
39
39
HREF="node214.html">
40
40
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
41
41
SRC="/usr/share/latex2html/icons/prev.png"></A>
42
<A NAME="tex2html3459"
42
<A NAME="tex2html3462"
44
44
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
45
45
SRC="/usr/share/latex2html/icons/contents.png"></A>
47
<B> Next:</B> <A NAME="tex2html3462"
48
HREF="node216.html">Storage Backends</A>
49
<B> Up:</B> <A NAME="tex2html3458"
50
HREF="node212.html">CDR: Call Detail Records</A>
51
<B> Previous:</B> <A NAME="tex2html3452"
52
HREF="node214.html">CDR Fields</A>
53
<B> <A NAME="tex2html3460"
47
<B> Next:</B> <A NAME="tex2html3465"
48
HREF="node216.html">Variables</A>
49
<B> Up:</B> <A NAME="tex2html3461"
50
HREF="node213.html">CDR: Call Detail Records</A>
51
<B> Previous:</B> <A NAME="tex2html3455"
52
HREF="node214.html">Applications</A>
53
<B> <A NAME="tex2html3463"
54
54
HREF="node1.html">Contents</A></B>
57
57
<!--End of Navigation Panel-->
59
<H1><A NAME="SECTION001130000000000000000">
59
<H1><A NAME="SECTION001120000000000000000">
64
If the channel has a CDR, that CDR has its own set of variables which can be
65
accessed just like channel variables. The following builtin variables are
70
${CDR(clid)} Caller ID
72
${CDR(dst)} Destination
73
${CDR(dcontext)} Destination context
74
${CDR(channel)} Channel name
75
${CDR(dstchannel)} Destination channel
76
${CDR(lastapp)} Last app executed
77
${CDR(lastdata)} Last app's arguments
78
${CDR(start)} Time the call started.
79
${CDR(answer)} Time the call was answered.
80
${CDR(end)} Time the call ended.
81
${CDR(duration)} Duration of the call.
82
${CDR(billsec)} Duration of the call once it was answered.
83
${CDR(disposition)} ANSWERED, NO ANSWER, BUSY
84
${CDR(amaflags)} DOCUMENTATION, BILL, IGNORE etc
85
${CDR(accountcode)} The channel's account code.
86
${CDR(uniqueid)} The channel's unique id.
87
${CDR(userfield)} The channels uses specified field.
91
In addition, you can set your own extra variables by using Set(CDR(name)=value).
92
These variables can be output into a text-format CDR by using the cdr_custom
93
CDR driver; see the cdr_custom.conf.sample file in the configs directory for
94
an example of how to do this.
66
<LI>accountcode: What account number to use, (string, 20 characters)
68
<LI>src: Caller*ID number (string, 80 characters)
70
<LI>dst: Destination extension (string, 80 characters)
72
<LI>dcontext: Destination context (string, 80 characters)
74
<LI>clid: Caller*ID with text (80 characters)
76
<LI>channel: Channel used (80 characters)
78
<LI>dstchannel: Destination channel if appropriate (80 characters)
80
<LI>lastapp: Last application if appropriate (80 characters)
82
<LI>lastdata: Last application data (arguments) (80 characters)
84
<LI>start: Start of call (date/time)
86
<LI>answer: Answer of call (date/time)
88
<LI>end: End of call (date/time)
90
<LI>duration: Total time in system, in seconds (integer), from dial to hangup
92
<LI>billsec: Total time call is up, in seconds (integer), from answer to hangup
94
<LI>disposition: What happened to the call: ANSWERED, NO ANSWER, BUSY
96
<LI>amaflags: What flags to use: DOCUMENTATION, BILL, IGNORE etc,
97
specified on a per channel basis like accountcode.
99
<LI>user field: A user-defined field, maximum 255 characters
104
In some cases, uniqueid is appended:
109
<LI>uniqueid: Unique Channel Identifier (32 characters)
110
This needs to be enabled in the source code at compile time
115
NOTE: If you use IAX2 channels for your calls, and allow 'full' transfers
116
(not media-only transfers), then when the calls is transferred the server
117
in the middle will no longer be involved in the signaling path, and thus
118
will not generate accurate CDRs for that call. If you can, use media-only
119
transfers with IAX2 to avoid this problem, or turn off transfers completely
120
(although this can result in a media latency increase since the media packets
121
have to traverse the middle server(s) in the call).
125
<DIV CLASS="navigation"><HR>
126
<!--Navigation Panel-->
127
<A NAME="tex2html3464"
129
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
130
SRC="/usr/share/latex2html/icons/next.png"></A>
131
<A NAME="tex2html3460"
133
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
134
SRC="/usr/share/latex2html/icons/up.png"></A>
135
<A NAME="tex2html3454"
137
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
138
SRC="/usr/share/latex2html/icons/prev.png"></A>
139
<A NAME="tex2html3462"
141
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
142
SRC="/usr/share/latex2html/icons/contents.png"></A>
144
<B> Next:</B> <A NAME="tex2html3465"
145
HREF="node216.html">Variables</A>
146
<B> Up:</B> <A NAME="tex2html3461"
147
HREF="node213.html">CDR: Call Detail Records</A>
148
<B> Previous:</B> <A NAME="tex2html3455"
149
HREF="node214.html">Applications</A>
150
<B> <A NAME="tex2html3463"
151
HREF="node1.html">Contents</A></B> </DIV>
152
<!--End of Navigation Panel-->