<div>Hi group,</div><div><br></div><div>I would like to create and contribute to the community a module: &quot;mod_cdr_logic&quot; (or whatever name will be proposed).</div><div>Do you think ***from your experience*** that there is a practical need in such module, or better to concentrate on something else :-) ?</div>
<div><br></div><div><br></div><div>In high level:</div><div>Module will export CDRs directly into the database with failover, applying business rules (with regular expressions) to the values exported</div><div><br></div><div>
More detailed:</div><div>After the call is finished, module will export selected chanel variables directly into any provided table (odbc used).</div><div>It will apply business rules to the selected values (based on regular expressions, condition-action dialplan style).<span class="Apple-tab-span" style="white-space:pre">                </span></div>
<div>Module will produce one CDR per leg (outgoing/incoming, configurable).</div><div>Also it will support fail over: if the main database is not available, it will try to export into a backup database, and if that will be down as well, it will dump into a local CSV file.</div>
<div><br></div><div><br></div><div><br></div><div>In the config file one will provide:</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>1.Mapping rule - variable name to the corresponding table field name</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>2.Set of business rules to apply</div><div><span class="Apple-tab-span" style="white-space:pre">        </span></div><div><span class="Apple-tab-span" style="white-space:pre">        </span></div>
<div>Config file example (will be in regular xml eventually):</div><div>--------------------------------------------------------------------</div><div>#these are the values that are taken directly from channel variables</div>
<div>&lt;channel_variables_map&gt;</div><div>      #channel variable--&gt;mapped to the table field</div><div>      calling_number-&gt;calling_number</div><div>      destination_number-&gt;called_number</div><div>      dialed_dtmf_digits-&gt;dialed_digits  </div>
<div>&lt;channel_variables_map/&gt;</div><div><br></div><div><br></div><div>#these are the new values that will be determined at the business rules stage</div><div>&lt;new_variables&gt;</div><div>  sales_department_call-&gt;sales_department_call</div>
<div>  technical_department_call-&gt;technical_department_call</div><div>  one_more_lost_client-&gt;one_more_lost_client</div><div>  one_more_happy_client-&gt;one_more_happy_client  </div><div>&lt;new_variables/&gt;</div>
<div><br></div><div><br></div><div>&lt;rules&gt;<span class="Apple-tab-span" style="white-space:pre">        </span></div><div><span class="Apple-tab-span" style="white-space:pre">                </span>&lt;condition field=&quot;dialed_dtmf_digits&quot; expression=&quot;^(1)(\d+)&quot;&gt;<span class="Apple-tab-span" style="white-space:pre">                                </span></div>
<div><span class="Apple-tab-span" style="white-space:pre">                        </span>&lt;action set=&quot;sales_department_call=1&quot;/&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>&lt;anti-action set=&quot;technical_department_call=1&quot;/&gt;<span class="Apple-tab-span" style="white-space:pre">                </span></div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>&lt;condition/&gt;<span class="Apple-tab-span" style="white-space:pre">                                                </span></div><div><span class="Apple-tab-span" style="white-space:pre">                </span>&lt;condition field=&quot;hangup_cause&quot; expression=&quot;NO_ANSWER&quot;&gt;<span class="Apple-tab-span" style="white-space:pre">                                </span></div>
<div><span class="Apple-tab-span" style="white-space:pre">                        </span>&lt;action set=&quot;one_more_lost_client=1&quot;/&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>&lt;anti-action set=&quot;one_more_happy_client=1&quot;/&gt;</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>&lt;condition/&gt;<span class="Apple-tab-span" style="white-space:pre">                                                </span></div><div>&lt;rules/&gt;</div><div>--------------------------------------------------------------------</div>
<div><br></div><div><br></div><div>Would be glad to hear your opinion regarding usefulness or useless of such module in the contrib dir.</div><div><br></div><div><br></div><div>Thank you,</div><div>Vitalie</div><div><br></div>
<div><br></div>