123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254 |
- <!DOCTYPE html>
- <html>
- <head>
- <title>Asterisk Project : Asterisk 13 Configuration_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 class="theme-default aui-theme-default">
- <div id="page">
- <div id="main" class="aui-page-panel">
- <div id="main-header">
- <div id="breadcrumb-section">
- <ol id="breadcrumbs">
- <li class="first">
- <span><a href="index.html">Asterisk Project</a></span>
- </li>
- <li>
- <span><a href="Asterisk-13-Command-Reference_29394274.html">Asterisk 13 Command Reference</a></span>
- </li>
- <li>
- <span><a href="Asterisk-13-Module-Configuration_29394289.html">Asterisk 13 Module Configuration</a></span>
- </li>
- </ol>
- </div>
- <h1 id="title-heading" class="pagetitle">
- <span id="title-text">
- Asterisk Project : Asterisk 13 Configuration_cdr
- </span>
- </h1>
- </div>
- <div id="content" class="view">
- <div class="page-metadata">
-
-
-
-
-
-
-
- Created by <span class='author'> wikibot</span> on Aug 08, 2014
- </div>
- <div id="main-content" class="wiki-content group">
- <h1 id="Asterisk13Configuration_cdr-CallDetailRecordconfiguration">Call Detail Record configuration</h1>
- <p>This configuration documentation is for functionality provided by <code>cdr</code>.</p>
- <h2 id="Asterisk13Configuration_cdr-Overview">Overview</h2>
- <p>CDR is Call Detail Record, which provides logging services via a variety of pluggable backend modules. Detailed call information can be recorded to databases, files, etc. Useful for billing, fraud prevention, compliance with Sarbanes-Oxley aka The Enron Act, QOS evaluations, and more.</p>
- <h2 id="Asterisk13Configuration_cdr-cdr.conf">cdr.conf</h2>
- <h3 id="Asterisk13Configuration_cdr-general">general</h3>
- <p>Global settings applied to the CDR engine.</p>
- <h4 id="Asterisk13Configuration_cdr-ConfigurationOptionReference">Configuration Option Reference</h4>
- <div class="table-wrap"><table class="confluenceTable"><tbody>
- <tr>
- <th class="confluenceTh"><p> Option Name </p></th>
- <th class="confluenceTh"><p> Type </p></th>
- <th class="confluenceTh"><p> Default Value </p></th>
- <th class="confluenceTh"><p> Regular Expression </p></th>
- <th class="confluenceTh"><p> Description </p></th>
- </tr>
- <tr>
- <td class="confluenceTd"><p> <a href="Asterisk-13-Configuration_cdr_29394792.html"><code>debug</code></a> </p></td>
- <td class="confluenceTd"><p> <code>Boolean</code> </p></td>
- <td class="confluenceTd"><p> </p></td>
- <td class="confluenceTd"><p> <code>false</code> </p></td>
- <td class="confluenceTd"><p> Enable/disable verbose CDR debugging. </p></td>
- </tr>
- <tr>
- <td class="confluenceTd"><p> <a href="Asterisk-13-Configuration_cdr_29394792.html"><code>enable</code></a> </p></td>
- <td class="confluenceTd"><p> <code>Boolean</code> </p></td>
- <td class="confluenceTd"><p> <code>1</code> </p></td>
- <td class="confluenceTd"><p> <code>false</code> </p></td>
- <td class="confluenceTd"><p> Enable/disable CDR logging. </p></td>
- </tr>
- <tr>
- <td class="confluenceTd"><p> <a href="Asterisk-13-Configuration_cdr_29394792.html"><code>unanswered</code></a> </p></td>
- <td class="confluenceTd"><p> <code>Boolean</code> </p></td>
- <td class="confluenceTd"><p> <code>0</code> </p></td>
- <td class="confluenceTd"><p> <code>false</code> </p></td>
- <td class="confluenceTd"><p> Log calls that are never answered. </p></td>
- </tr>
- <tr>
- <td class="confluenceTd"><p> <a href="Asterisk-13-Configuration_cdr_29394792.html"><code>congestion</code></a> </p></td>
- <td class="confluenceTd"><p> <code>Boolean</code> </p></td>
- <td class="confluenceTd"><p> </p></td>
- <td class="confluenceTd"><p> <code>false</code> </p></td>
- <td class="confluenceTd"><p> Log congested calls. </p></td>
- </tr>
- <tr>
- <td class="confluenceTd"><p> <a href="Asterisk-13-Configuration_cdr_29394792.html"><code>endbeforehexten</code></a> </p></td>
- <td class="confluenceTd"><p> <code>Boolean</code> </p></td>
- <td class="confluenceTd"><p> <code>1</code> </p></td>
- <td class="confluenceTd"><p> <code>false</code> </p></td>
- <td class="confluenceTd"><p> Don't produce CDRs while executing hangup logic </p></td>
- </tr>
- <tr>
- <td class="confluenceTd"><p> <a href="Asterisk-13-Configuration_cdr_29394792.html"><code>initiatedseconds</code></a> </p></td>
- <td class="confluenceTd"><p> <code>Boolean</code> </p></td>
- <td class="confluenceTd"><p> <code>0</code> </p></td>
- <td class="confluenceTd"><p> <code>false</code> </p></td>
- <td class="confluenceTd"><p> Count microseconds for billsec purposes </p></td>
- </tr>
- <tr>
- <td class="confluenceTd"><p> <a href="Asterisk-13-Configuration_cdr_29394792.html"><code>batch</code></a> </p></td>
- <td class="confluenceTd"><p> <code>Boolean</code> </p></td>
- <td class="confluenceTd"><p> <code>0</code> </p></td>
- <td class="confluenceTd"><p> <code>false</code> </p></td>
- <td class="confluenceTd"><p> Submit CDRs to the backends for processing in batches </p></td>
- </tr>
- <tr>
- <td class="confluenceTd"><p> <a href="Asterisk-13-Configuration_cdr_29394792.html"><code>size</code></a> </p></td>
- <td class="confluenceTd"><p> <code>Unsigned Integer</code> </p></td>
- <td class="confluenceTd"><p> <code>100</code> </p></td>
- <td class="confluenceTd"><p> <code>false</code> </p></td>
- <td class="confluenceTd"><p> The maximum number of CDRs to accumulate before triggering a batch </p></td>
- </tr>
- <tr>
- <td class="confluenceTd"><p> <a href="Asterisk-13-Configuration_cdr_29394792.html"><code>time</code></a> </p></td>
- <td class="confluenceTd"><p> <code>Unsigned Integer</code> </p></td>
- <td class="confluenceTd"><p> <code>300</code> </p></td>
- <td class="confluenceTd"><p> <code>false</code> </p></td>
- <td class="confluenceTd"><p> The maximum time to accumulate CDRs before triggering a batch </p></td>
- </tr>
- <tr>
- <td class="confluenceTd"><p> <a href="Asterisk-13-Configuration_cdr_29394792.html"><code>scheduleronly</code></a> </p></td>
- <td class="confluenceTd"><p> <code>Boolean</code> </p></td>
- <td class="confluenceTd"><p> <code>0</code> </p></td>
- <td class="confluenceTd"><p> <code>false</code> </p></td>
- <td class="confluenceTd"><p> Post batched CDRs on their own thread instead of the scheduler </p></td>
- </tr>
- <tr>
- <td class="confluenceTd"><p> <a href="Asterisk-13-Configuration_cdr_29394792.html"><code>safeshutdown</code></a> </p></td>
- <td class="confluenceTd"><p> <code>Boolean</code> </p></td>
- <td class="confluenceTd"><p> <code>1</code> </p></td>
- <td class="confluenceTd"><p> <code>false</code> </p></td>
- <td class="confluenceTd"><p> Block shutdown of Asterisk until CDRs are submitted </p></td>
- </tr>
- </tbody></table></div>
- <h4 id="Asterisk13Configuration_cdr-ConfigurationOptionDescriptions">Configuration Option Descriptions</h4>
- <p><span class="confluence-anchor-link" id="Asterisk13Configuration_cdr-general_debug"></span></p>
- <h5 id="Asterisk13Configuration_cdr-debug">debug</h5>
- <p>When set to <code>True</code>, verbose updates of changes in CDR information will be logged. Note that this is only of use when debugging CDR behavior.</p>
- <p><span class="confluence-anchor-link" id="Asterisk13Configuration_cdr-general_enable"></span></p>
- <h5 id="Asterisk13Configuration_cdr-enable">enable</h5>
- <p>Define whether or not to use CDR logging. Setting this to "no" will override any loading of backend CDR modules. Default is "yes".</p>
- <p><span class="confluence-anchor-link" id="Asterisk13Configuration_cdr-general_unanswered"></span></p>
- <h5 id="Asterisk13Configuration_cdr-unanswered">unanswered</h5>
- <p>Define whether or not to log unanswered calls. Setting this to "yes" will report every attempt to ring a phone in dialing attempts, when it was not answered. For example, if you try to dial 3 extensions, and this option is "yes", you will get 3 CDR's, one for each phone that was rung. Some find this information horribly useless. Others find it very valuable. Note, in "yes" mode, you will see one CDR, with one of the call targets on one side, and the originating channel on the other, and then one CDR for each channel attempted. This may seem redundant, but cannot be helped.</p>
- <p>In brief, this option controls the reporting of unanswered calls which only have an A party. Calls which get offered to an outgoing line, but are unanswered, are still logged, and that is the intended behavior. (It also results in some B side CDRs being output, as they have the B side channel as their source channel, and no destination channel.)</p>
- <p><span class="confluence-anchor-link" id="Asterisk13Configuration_cdr-general_congestion"></span></p>
- <h5 id="Asterisk13Configuration_cdr-congestion">congestion</h5>
- <p>Define whether or not to log congested calls. Setting this to "yes" will report each call that fails to complete due to congestion conditions.</p>
- <p><span class="confluence-anchor-link" id="Asterisk13Configuration_cdr-general_endbeforehexten"></span></p>
- <h5 id="Asterisk13Configuration_cdr-endbeforehexten">endbeforehexten</h5>
- <p>As each CDR for a channel is finished, its end time is updated and the CDR is finalized. When a channel is hung up and hangup logic is present (in the form of a hangup handler or the <code>h</code> extension), a new CDR is generated for the channel. Any statistics are gathered from this new CDR. By enabling this option, no new CDR is created for the dialplan logic that is executed in <code>h</code> extensions or attached hangup handler subroutines. The default value is <code>yes</code>, indicating that a CDR will be generated during hangup logic.</p>
- <p><span class="confluence-anchor-link" id="Asterisk13Configuration_cdr-general_initiatedseconds"></span></p>
- <h5 id="Asterisk13Configuration_cdr-initiatedseconds">initiatedseconds</h5>
- <p>Normally, the <code>billsec</code> field logged to the CDR backends is simply the end time (hangup time) minus the answer time in seconds. Internally, asterisk stores the time in terms of microseconds and seconds. By setting initiatedseconds to <code>yes</code>, you can force asterisk to report any seconds that were initiated (a sort of round up method). Technically, this is when the microsecond part of the end time is greater than the microsecond part of the answer time, then the billsec time is incremented one second.</p>
- <p><span class="confluence-anchor-link" id="Asterisk13Configuration_cdr-general_batch"></span></p>
- <h5 id="Asterisk13Configuration_cdr-batch">batch</h5>
- <p>Define the CDR batch mode, where instead of posting the CDR at the end of every call, the data will be stored in a buffer to help alleviate load on the asterisk server.</p>
- <div class="aui-message problem shadowed information-macro">
- <p class="title">Warning</p>
- <span class="aui-icon icon-problem">Icon</span>
- <div class="message-content">
-
- <p>Use of batch mode may result in data loss after unsafe asterisk termination, i.e., software crash, power failure, kill -9, etc.</p>
- </div>
- </div>
- <p><span class="confluence-anchor-link" id="Asterisk13Configuration_cdr-general_size"></span></p>
- <h5 id="Asterisk13Configuration_cdr-size">size</h5>
- <p>Define the maximum number of CDRs to accumulate in the buffer before posting them to the backend engines. batch must be set to <code>yes</code>.</p>
- <p><span class="confluence-anchor-link" id="Asterisk13Configuration_cdr-general_time"></span></p>
- <h5 id="Asterisk13Configuration_cdr-time">time</h5>
- <p>Define the maximum time to accumulate CDRs before posting them in a batch to the backend engines. If this time limit is reached, then it will post the records, regardless of the value defined for size. batch must be set to <code>yes</code>.</p>
- <div class="aui-message hint shadowed information-macro">
- <p class="title">Note</p>
- <span class="aui-icon icon-hint">Icon</span>
- <div class="message-content">
-
- <p>Time is expressed in seconds.</p>
- </div>
- </div>
- <p><span class="confluence-anchor-link" id="Asterisk13Configuration_cdr-general_scheduleronly"></span></p>
- <h5 id="Asterisk13Configuration_cdr-scheduleronly">scheduleronly</h5>
- <p>The CDR engine uses the internal asterisk scheduler to determine when to post records. Posting can either occur inside the scheduler thread, or a new thread can be spawned for the submission of every batch. For small batches, it might be acceptable to just use the scheduler thread, so set this to <code>yes</code>. For large batches, say anything over size=10, a new thread is recommended, so set this to <code>no</code>.</p>
- <p><span class="confluence-anchor-link" id="Asterisk13Configuration_cdr-general_safeshutdown"></span></p>
- <h5 id="Asterisk13Configuration_cdr-safeshutdown">safeshutdown</h5>
- <p>When shutting down asterisk, you can block until the CDRs are submitted. If you don't, then data will likely be lost. You can always check the size of the CDR batch buffer with the CLI <code>cdr status</code> command. To enable blocking on submission of CDR data during asterisk shutdown, set this to <code>yes</code>.</p>
- <h3 id="Asterisk13Configuration_cdr-ImportVersion">Import Version</h3>
- <p>This documentation was imported from Asterisk Version SVN-branch-13-r420538</p>
- </div>
-
-
- </div> </div>
- <div id="footer">
- <section class="footer-body">
- <p>Document generated by Confluence on Aug 11, 2014 13:48</p>
- </section>
- </div>
- </div> </body>
- </html>
|