1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Asterisk Project : Function_CDR</title>
<link rel="stylesheet" href="styles/site.css" type="text/css" />
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<table class="pagecontent" border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#ffffff">
<tr>
<td valign="top" class="pagebody">
<div class="pageheader">
<span class="pagetitle">
Asterisk Project : Function_CDR
</span>
</div>
<div class="pagesubheading">
This page last changed on Mar 30, 2011 by <font color="#0050B2">wikibot</font>.
</div>
<h1><a name="Function_CDR-CDR%28%29"></a>CDR()</h1>
<h3><a name="Function_CDR-Synopsis"></a>Synopsis</h3>
<p>Gets or sets a CDR variable.</p>
<h3><a name="Function_CDR-Description"></a>Description</h3>
<p>All of the CDR field names are read-only, except for <tt>accountcode</tt>, <tt>userfield</tt>, and <tt>amaflags</tt>. 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. </p>
<p>For setting CDR values, the For setting CDR values, the <tt>l</tt> flag does not apply to setting the <tt>accountcode</tt>, <tt>userfield</tt>, or <tt>amaflags</tt>. </p>
<p>Raw values for <tt>disposition</tt> : </p>
<p>NO ANSWER </p>
<p>NO ANSWER (NULL record) </p>
<p>FAILED </p>
<p>BUSY </p>
<p>ANSWERED </p>
<p>Raw values for <tt>amaflags</tt> : </p>
<p>OMIT </p>
<p>BILLING </p>
<p>DOCUMENTATION </p>
<p>Example: exten => 1,1,Set(CDR(userfield)=test)</p>
<h3><a name="Function_CDR-Syntax"></a>Syntax</h3>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>CDR(name[,options])</pre>
</div></div>
<h5><a name="Function_CDR-Arguments"></a>Arguments</h5>
<ul>
<li><tt>name</tt> - CDR field name:
<ul>
<li><tt>clid</tt> - Caller ID.</li>
<li><tt>lastdata</tt> - Last application arguments.</li>
<li><tt>disposition</tt> - ANSWERED, NO ANSWER, BUSY, FAILED.</li>
<li><tt>src</tt> - Source.</li>
<li><tt>start</tt> - Time the call started.</li>
<li><tt>amaflags</tt> - DOCUMENTATION, BILL, IGNORE, etc.</li>
<li><tt>dst</tt> - Destination.</li>
<li><tt>answer</tt> - Time the call was answered.</li>
<li><tt>accountcode</tt> - The channel's account code.</li>
<li><tt>dcontext</tt> - Destination context.</li>
<li><tt>end</tt> - Time the call ended.</li>
<li><tt>uniqueid</tt> - The channel's unique id.</li>
<li><tt>dstchannel</tt> - Destination channel.</li>
<li><tt>duration</tt> - Duration of the call.</li>
<li><tt>userfield</tt> - The channel's user specified field.</li>
<li><tt>lastapp</tt> - Last application.</li>
<li><tt>billsec</tt> - Duration of the call once it was answered.</li>
<li><tt>channel</tt> - Channel name.</li>
<li><tt>sequence</tt> - CDR sequence number.</li>
</ul>
</li>
<li><tt>options</tt>
<ul>
<li><tt>f</tt> - Returns billsec or duration fields as floating point values.</li>
<li><tt>l</tt> - Uses the most recent CDR on a channel with multiple records</li>
<li><tt>r</tt> - Searches the entire stack of CDRs on the channel.</li>
<li><tt>s</tt> - Skips any CDR's that are marked 'LOCKED' due to forkCDR() calls. (on setting/writing CDR vars only)</li>
<li><tt>u</tt> - Retrieves the raw, unprocessed value. For example, 'start', 'answer', and 'end' will be retrieved as epoch values, when the <tt>u</tt> option is passed, but formatted as YYYY-MM-DD HH:MM:SS otherwise. Similarly, disposition and amaflags will return their raw integral values.</li>
</ul>
</li>
</ul>
<h3><a name="Function_CDR-SeeAlso"></a>See Also</h3>
<h3><a name="Function_CDR-ImportVersion"></a>Import Version</h3>
<p>This documentation was imported from Asterisk version SVN-branch-1.8-r311874.</p>
</td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td height="12" background="https://wiki.asterisk.org/wiki/images/border/border_bottom.gif"><img src="images/border/spacer.gif" width="1" height="1" border="0"/></td>
</tr>
<tr>
<td align="center"><font color="grey">Document generated by Confluence on Oct 04, 2011 12:42</font></td>
</tr>
</table>
</body>
</html>
|