Asterisk-13-Configuration_cdr_29394792.html 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Asterisk Project : Asterisk 13 Configuration_cdr</title>
  5. <link rel="stylesheet" href="styles/site.css" type="text/css" />
  6. <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
  7. </head>
  8. <body class="theme-default aui-theme-default">
  9. <div id="page">
  10. <div id="main" class="aui-page-panel">
  11. <div id="main-header">
  12. <div id="breadcrumb-section">
  13. <ol id="breadcrumbs">
  14. <li class="first">
  15. <span><a href="index.html">Asterisk Project</a></span>
  16. </li>
  17. <li>
  18. <span><a href="Asterisk-13-Command-Reference_29394274.html">Asterisk 13 Command Reference</a></span>
  19. </li>
  20. <li>
  21. <span><a href="Asterisk-13-Module-Configuration_29394289.html">Asterisk 13 Module Configuration</a></span>
  22. </li>
  23. </ol>
  24. </div>
  25. <h1 id="title-heading" class="pagetitle">
  26. <span id="title-text">
  27. Asterisk Project : Asterisk 13 Configuration_cdr
  28. </span>
  29. </h1>
  30. </div>
  31. <div id="content" class="view">
  32. <div class="page-metadata">
  33. Created by <span class='author'> wikibot</span> on Aug 08, 2014
  34. </div>
  35. <div id="main-content" class="wiki-content group">
  36. <h1 id="Asterisk13Configuration_cdr-CallDetailRecordconfiguration">Call Detail Record configuration</h1>
  37. <p>This configuration documentation is for functionality provided by <code>cdr</code>.</p>
  38. <h2 id="Asterisk13Configuration_cdr-Overview">Overview</h2>
  39. <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>
  40. <h2 id="Asterisk13Configuration_cdr-cdr.conf">cdr.conf</h2>
  41. <h3 id="Asterisk13Configuration_cdr-general">general</h3>
  42. <p>Global settings applied to the CDR engine.</p>
  43. <h4 id="Asterisk13Configuration_cdr-ConfigurationOptionReference">Configuration Option Reference</h4>
  44. <div class="table-wrap"><table class="confluenceTable"><tbody>
  45. <tr>
  46. <th class="confluenceTh"><p> Option Name </p></th>
  47. <th class="confluenceTh"><p> Type </p></th>
  48. <th class="confluenceTh"><p> Default Value </p></th>
  49. <th class="confluenceTh"><p> Regular Expression </p></th>
  50. <th class="confluenceTh"><p> Description </p></th>
  51. </tr>
  52. <tr>
  53. <td class="confluenceTd"><p> <a href="Asterisk-13-Configuration_cdr_29394792.html"><code>debug</code></a> </p></td>
  54. <td class="confluenceTd"><p> <code>Boolean</code> </p></td>
  55. <td class="confluenceTd"><p> </p></td>
  56. <td class="confluenceTd"><p> <code>false</code> </p></td>
  57. <td class="confluenceTd"><p> Enable/disable verbose CDR debugging. </p></td>
  58. </tr>
  59. <tr>
  60. <td class="confluenceTd"><p> <a href="Asterisk-13-Configuration_cdr_29394792.html"><code>enable</code></a> </p></td>
  61. <td class="confluenceTd"><p> <code>Boolean</code> </p></td>
  62. <td class="confluenceTd"><p> <code>1</code> </p></td>
  63. <td class="confluenceTd"><p> <code>false</code> </p></td>
  64. <td class="confluenceTd"><p> Enable/disable CDR logging. </p></td>
  65. </tr>
  66. <tr>
  67. <td class="confluenceTd"><p> <a href="Asterisk-13-Configuration_cdr_29394792.html"><code>unanswered</code></a> </p></td>
  68. <td class="confluenceTd"><p> <code>Boolean</code> </p></td>
  69. <td class="confluenceTd"><p> <code>0</code> </p></td>
  70. <td class="confluenceTd"><p> <code>false</code> </p></td>
  71. <td class="confluenceTd"><p> Log calls that are never answered. </p></td>
  72. </tr>
  73. <tr>
  74. <td class="confluenceTd"><p> <a href="Asterisk-13-Configuration_cdr_29394792.html"><code>congestion</code></a> </p></td>
  75. <td class="confluenceTd"><p> <code>Boolean</code> </p></td>
  76. <td class="confluenceTd"><p> </p></td>
  77. <td class="confluenceTd"><p> <code>false</code> </p></td>
  78. <td class="confluenceTd"><p> Log congested calls. </p></td>
  79. </tr>
  80. <tr>
  81. <td class="confluenceTd"><p> <a href="Asterisk-13-Configuration_cdr_29394792.html"><code>endbeforehexten</code></a> </p></td>
  82. <td class="confluenceTd"><p> <code>Boolean</code> </p></td>
  83. <td class="confluenceTd"><p> <code>1</code> </p></td>
  84. <td class="confluenceTd"><p> <code>false</code> </p></td>
  85. <td class="confluenceTd"><p> Don't produce CDRs while executing hangup logic </p></td>
  86. </tr>
  87. <tr>
  88. <td class="confluenceTd"><p> <a href="Asterisk-13-Configuration_cdr_29394792.html"><code>initiatedseconds</code></a> </p></td>
  89. <td class="confluenceTd"><p> <code>Boolean</code> </p></td>
  90. <td class="confluenceTd"><p> <code>0</code> </p></td>
  91. <td class="confluenceTd"><p> <code>false</code> </p></td>
  92. <td class="confluenceTd"><p> Count microseconds for billsec purposes </p></td>
  93. </tr>
  94. <tr>
  95. <td class="confluenceTd"><p> <a href="Asterisk-13-Configuration_cdr_29394792.html"><code>batch</code></a> </p></td>
  96. <td class="confluenceTd"><p> <code>Boolean</code> </p></td>
  97. <td class="confluenceTd"><p> <code>0</code> </p></td>
  98. <td class="confluenceTd"><p> <code>false</code> </p></td>
  99. <td class="confluenceTd"><p> Submit CDRs to the backends for processing in batches </p></td>
  100. </tr>
  101. <tr>
  102. <td class="confluenceTd"><p> <a href="Asterisk-13-Configuration_cdr_29394792.html"><code>size</code></a> </p></td>
  103. <td class="confluenceTd"><p> <code>Unsigned Integer</code> </p></td>
  104. <td class="confluenceTd"><p> <code>100</code> </p></td>
  105. <td class="confluenceTd"><p> <code>false</code> </p></td>
  106. <td class="confluenceTd"><p> The maximum number of CDRs to accumulate before triggering a batch </p></td>
  107. </tr>
  108. <tr>
  109. <td class="confluenceTd"><p> <a href="Asterisk-13-Configuration_cdr_29394792.html"><code>time</code></a> </p></td>
  110. <td class="confluenceTd"><p> <code>Unsigned Integer</code> </p></td>
  111. <td class="confluenceTd"><p> <code>300</code> </p></td>
  112. <td class="confluenceTd"><p> <code>false</code> </p></td>
  113. <td class="confluenceTd"><p> The maximum time to accumulate CDRs before triggering a batch </p></td>
  114. </tr>
  115. <tr>
  116. <td class="confluenceTd"><p> <a href="Asterisk-13-Configuration_cdr_29394792.html"><code>scheduleronly</code></a> </p></td>
  117. <td class="confluenceTd"><p> <code>Boolean</code> </p></td>
  118. <td class="confluenceTd"><p> <code>0</code> </p></td>
  119. <td class="confluenceTd"><p> <code>false</code> </p></td>
  120. <td class="confluenceTd"><p> Post batched CDRs on their own thread instead of the scheduler </p></td>
  121. </tr>
  122. <tr>
  123. <td class="confluenceTd"><p> <a href="Asterisk-13-Configuration_cdr_29394792.html"><code>safeshutdown</code></a> </p></td>
  124. <td class="confluenceTd"><p> <code>Boolean</code> </p></td>
  125. <td class="confluenceTd"><p> <code>1</code> </p></td>
  126. <td class="confluenceTd"><p> <code>false</code> </p></td>
  127. <td class="confluenceTd"><p> Block shutdown of Asterisk until CDRs are submitted </p></td>
  128. </tr>
  129. </tbody></table></div>
  130. <h4 id="Asterisk13Configuration_cdr-ConfigurationOptionDescriptions">Configuration Option Descriptions</h4>
  131. <p><span class="confluence-anchor-link" id="Asterisk13Configuration_cdr-general_debug"></span></p>
  132. <h5 id="Asterisk13Configuration_cdr-debug">debug</h5>
  133. <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>
  134. <p><span class="confluence-anchor-link" id="Asterisk13Configuration_cdr-general_enable"></span></p>
  135. <h5 id="Asterisk13Configuration_cdr-enable">enable</h5>
  136. <p>Define whether or not to use CDR logging. Setting this to &quot;no&quot; will override any loading of backend CDR modules. Default is &quot;yes&quot;.</p>
  137. <p><span class="confluence-anchor-link" id="Asterisk13Configuration_cdr-general_unanswered"></span></p>
  138. <h5 id="Asterisk13Configuration_cdr-unanswered">unanswered</h5>
  139. <p>Define whether or not to log unanswered calls. Setting this to &quot;yes&quot; 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 &quot;yes&quot;, 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 &quot;yes&quot; 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>
  140. <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>
  141. <p><span class="confluence-anchor-link" id="Asterisk13Configuration_cdr-general_congestion"></span></p>
  142. <h5 id="Asterisk13Configuration_cdr-congestion">congestion</h5>
  143. <p>Define whether or not to log congested calls. Setting this to &quot;yes&quot; will report each call that fails to complete due to congestion conditions.</p>
  144. <p><span class="confluence-anchor-link" id="Asterisk13Configuration_cdr-general_endbeforehexten"></span></p>
  145. <h5 id="Asterisk13Configuration_cdr-endbeforehexten">endbeforehexten</h5>
  146. <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>
  147. <p><span class="confluence-anchor-link" id="Asterisk13Configuration_cdr-general_initiatedseconds"></span></p>
  148. <h5 id="Asterisk13Configuration_cdr-initiatedseconds">initiatedseconds</h5>
  149. <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>
  150. <p><span class="confluence-anchor-link" id="Asterisk13Configuration_cdr-general_batch"></span></p>
  151. <h5 id="Asterisk13Configuration_cdr-batch">batch</h5>
  152. <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>
  153. <div class="aui-message problem shadowed information-macro">
  154. <p class="title">Warning</p>
  155. <span class="aui-icon icon-problem">Icon</span>
  156. <div class="message-content">
  157. <p>Use of batch mode may result in data loss after unsafe asterisk termination, i.e., software crash, power failure, kill -9, etc.</p>
  158. </div>
  159. </div>
  160. <p><span class="confluence-anchor-link" id="Asterisk13Configuration_cdr-general_size"></span></p>
  161. <h5 id="Asterisk13Configuration_cdr-size">size</h5>
  162. <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>
  163. <p><span class="confluence-anchor-link" id="Asterisk13Configuration_cdr-general_time"></span></p>
  164. <h5 id="Asterisk13Configuration_cdr-time">time</h5>
  165. <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>
  166. <div class="aui-message hint shadowed information-macro">
  167. <p class="title">Note</p>
  168. <span class="aui-icon icon-hint">Icon</span>
  169. <div class="message-content">
  170. <p>Time is expressed in seconds.</p>
  171. </div>
  172. </div>
  173. <p><span class="confluence-anchor-link" id="Asterisk13Configuration_cdr-general_scheduleronly"></span></p>
  174. <h5 id="Asterisk13Configuration_cdr-scheduleronly">scheduleronly</h5>
  175. <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>
  176. <p><span class="confluence-anchor-link" id="Asterisk13Configuration_cdr-general_safeshutdown"></span></p>
  177. <h5 id="Asterisk13Configuration_cdr-safeshutdown">safeshutdown</h5>
  178. <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>
  179. <h3 id="Asterisk13Configuration_cdr-ImportVersion">Import Version</h3>
  180. <p>This documentation was imported from Asterisk Version SVN-branch-13-r420538</p>
  181. </div>
  182. </div> </div>
  183. <div id="footer">
  184. <section class="footer-body">
  185. <p>Document generated by Confluence on Aug 11, 2014 13:48</p>
  186. </section>
  187. </div>
  188. </div> </body>
  189. </html>