Sophie

Sophie

distrib > Mandriva > 2008.1 > i586 > by-pkgid > c7095aefea7b97fbd2a596dcbfb9d481 > files > 333

asterisk-docs-1.4.26.1-1mdv2008.1.i586.rpm

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>CDR</title><link rel="stylesheet" href="styles.css" type="text/css" /><meta name="generator" content="DocBook XSL Stylesheets V1.69.1" /><link rel="start" href="index.html" title="Asterisk™: The Future of Telephony" /><link rel="up" href="asterisk-APP-E.html" title="Appendix E. Asterisk Dialplan Functions" /><link rel="prev" href="asterisk-APP-E-6.html" title="CALLERID" /><link rel="next" href="asterisk-APP-E-8.html" title="CHANNEL" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">CDR</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="asterisk-APP-E-6.html">Prev</a> </td><th width="60%" align="center">Appendix E. Asterisk Dialplan Functions</th><td width="20%" align="right"> <a accesskey="n" href="asterisk-APP-E-8.html">Next</a></td></tr></table><hr /></div><div class="refentry" lang="en" xml:lang="en"><a id="asterisk-APP-E-7"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>CDR — Gets or sets CDR information for this call (which will be
      written to the CDR log)</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><a id="I_programlisting_tt2699"></a><pre class="programlisting">CDR(<em class="replaceable"><code>fieldname</code></em>[,<em class="replaceable"><code>options</code></em>])</pre></div><div class="refsect1" lang="en" xml:lang="en"><a id="id4215806"></a><h2></h2><p><a id="I_indexterm_tt2700" class="indexterm"></a>Here is a list of all the available CDR field
      names:</p><div class="variablelist"><dl><dt><span class="term">
              <code class="literal">clid</code>
            </span></dt><dd><p>Read-only. Use the <code class="literal">CALLERID(all)</code> function to set this
            value.</p></dd><dt><span class="term">
              <code class="literal">lastapp</code>
            </span></dt><dd><p>Read-only. Denotes the last application run.</p></dd><dt><span class="term">
              <code class="literal">lastdata</code>
            </span></dt><dd><p>Read-only. Denotes the arguments to the last application
            run.</p></dd><dt><span class="term">
              <code class="literal">src</code>
            </span></dt><dd><p>Read-only. Use the <code class="literal">CALLERID(ani)</code> function to set this
            value.</p></dd><dt><span class="term">
              <code class="literal">dst</code>
            </span></dt><dd><p>Read-only. Corresponds to the final extension in the
            dialplan.</p></dd><dt><span class="term">
              <code class="literal">dcontext</code>
            </span></dt><dd><p>Read-only. Corresponds to the final context in the
            dialplan.</p></dd><dt><span class="term">
              <code class="literal">channel</code>
            </span></dt><dd><p>Read-only. The name of the channel on which the call
            originated.</p></dd><dt><span class="term">
              <code class="literal">dstchannel</code>
            </span></dt><dd><p>Read-only. The name of the channel on which the call
            terminated.</p></dd><dt><span class="term">
              <code class="literal">disposition</code>
            </span></dt><dd><p>Read-only. Maximum reached state of the channel. If the
            <code class="literal">u</code> option is specified, this
            value will be returned as an integer, instead of a string:
            <code class="literal">1</code> = <code class="literal">NO</code> <code class="literal">ANSWER</code>, <code class="literal">2</code> = <code class="literal">BUSY</code>, <code class="literal">3</code> = <code class="literal">FAILED</code>, <code class="literal">4</code> = <code class="literal">ANSWERED</code>.</p></dd><dt><span class="term">
              <code class="literal">amaflags</code>
            </span></dt><dd><p>Read/write. Billing flags. If the <code class="literal">u</code> option is specified, this value will
            be returned as an integer, instead of a string: <code class="literal">1</code> = <code class="literal">OMIT</code>, <code class="literal">2</code> = <code class="literal">BILLING</code>, <code class="literal">3
            </code>= <code class="literal">DOCUMENTATION</code>.</p></dd><dt><span class="term">
              <code class="literal">accountcode</code>
            </span></dt><dd><p>Read/write. Billing account (19 char maximum).</p></dd><dt><span class="term">
              <code class="literal">userfield</code>
            </span></dt><dd><p>Read/write. User-defined field.</p></dd><dt><span class="term">
              <code class="literal">start</code>
            </span></dt><dd><p>Read-only. Time when the call started. If the <code class="literal">u</code> option is specified, this value will
            be returned as an integer (seconds since the epoch) instead of a
            formatted date/time string.</p></dd><dt><span class="term">
              <code class="literal">answer</code>
            </span></dt><dd><p>Read-only. Time when the call was answered (may be blank if
            the call is not yet answered). If the <code class="literal">u</code> option is specified, this value will
            be returned as an integer (seconds since the epoch) instead of a
            formatted date/time string.</p></dd><dt><span class="term">
              <code class="literal">end</code>
            </span></dt><dd><p>Read-only. Time when the call was completed (may be blank if
            the call is not yet complete). If the <code class="literal">u</code> option is specified, this value will
            be returned as an integer (seconds since the epoch) instead of a
            formatted date/time string.</p></dd><dt><span class="term">
              <code class="literal">duration</code>
            </span></dt><dd><p>Read-only. The difference between start and end, in seconds.
            May be 0, if the call is not yet complete.</p></dd><dt><span class="term">
              <code class="literal">billsec</code>
            </span></dt><dd><p>Read-only. The difference between answer and end, in
            seconds. May be 0, if the call is not yet complete.</p></dd><dt><span class="term">
              <code class="literal">uniqueid</code>
            </span></dt><dd><p>Read-only. A string that will be unique per-call within this
            Asterisk instance.</p></dd></dl></div><p>The following options may be specified:</p><div class="variablelist"><dl><dt><span class="term">
              <code class="literal">l</code>
            </span></dt><dd><p>All results will be retrieved from the last Call Detail
            Record for the call, in the case of using multiple CDRs via
            ForkCDR().</p></dd><dt><span class="term">
              <code class="literal">r</code>
            </span></dt><dd><p>Custom CDR variables will be retrieved from the last Call
            Detail Record, but the standard fields will be retrieved from the
            first.</p></dd><dt><span class="term">
              <code class="literal">u</code>
            </span></dt><dd><p>The unparsed value will be returned. See the fieldname list
            above for entries that are affected by this flag.</p></dd></dl></div><p>You may also supply a <em class="replaceable"><code>fieldname</code></em> not on
      the above list, and create your own variable, whose value can be changed
      with this function, and this variable will be stored in the CDR.</p></div><div class="refsect1" lang="en" xml:lang="en"><a id="id4216430"></a><h2>See Also</h2><p>
          <a href="asterisk-APP-E-8.html" title="CHANNEL">
            <code class="literal">CHANNEL()</code>
          </a>
        </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="asterisk-APP-E-6.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="asterisk-APP-E.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="asterisk-APP-E-8.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">CALLERID </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> CHANNEL</td></tr></table></div><div xmlns="" id="svn-footer"><hr /><p>You are reading <em>Asterisk: The Future of Telephony</em> (2nd Edition for Asterisk 1.4), by Jim van Meggelen, Jared Smith, and Leif Madsen.<br />
       This work is licensed under the <a href="http://creativecommons.org/licenses/by-nc-nd/3.0/">Creative Commons Attribution-Noncommercial-No Derivative Works License v3.0</a>.<br />
       To submit comments, corrections, or other contributions to the text, please visit <a href="http://oreilly.com/catalog/9780596510480/">http://www.oreilly.com/</a>.</p></div></body></html>