<div dir="ltr"><div><div>Hi Arsen,<br><br></div>thanks for the reply.<br><br>I&#39;m still facing the same issue and I have my DB_CDRTool class defined correctly in global.inc. I&#39;ll try to look deeper into the code.<br>
<br>Would you mind pasting here your global.inc file with the &quot;rating engine only&quot; configuration?<br><br></div>Thanks for the reply.<br><br>Efelin<br><div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">
2013/10/15 Arsen <span dir="ltr">&lt;<a href="mailto:arsen.semionov@gmail.com" target="_blank">arsen.semionov@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div>Hi Efelin,</div><div><br></div><div>I&#39;ve just done the same, moved &quot;rating engine only&quot; from CDRTool to another location. </div><div>I have moved folders: library, phplib and scripts also have changed init script and global.inc and set path to new locations. </div>

<div>Everything work just fine.</div><div><br></div><div>I use CDRTool 9.0.1 source tarball. </div><div><br></div><div>DebitBalanceAudio function is defined in the RatingEngine class (/library/rating.php) in the same class in the constructor function you can find init db statement:</div>

<div> // init database</div><div>        $this-&gt;db            = new DB_CDRTool;</div><div><br></div><div>Hope this can give you some idea.. <br></div><div><br></div><div>Regards,</div><div>Arsen.</div></div><div class="gmail_extra">

<br><br><div class="gmail_quote"><div><div class="h5">On Mon, Oct 14, 2013 at 11:46 AM, Efelin Novak <span dir="ltr">&lt;<a href="mailto:efelin.novak@gmail.com" target="_blank">efelin.novak@gmail.com</a>&gt;</span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
<div dir="ltr"><div><div><div>Hi folks,<br><br></div>I have a problem with the installation of the rating_engine. I don&#39;t want to have whole CDRTool project installed on my machine. The only part I need in my installation for now is the rating_engine system. I installed the php packages on my debian system, configured global.inc file, removed all deprecated &amp; from the code and run the ratingEngine.php. MaxSesisonTime for any rates I&#39;m calling with my prepaid account works. The time is counted correctly. However when the DebitBalance is called from call-controll application and the ratingEngine.php tries to update the prepaid table it runs the query in the wrong database (DB_opensips insted of DB_CDRTool)<br>


<br></div><div>I have call-controll 2.0.15 and CDRTool 9.0.1<br><br></div><div>Is this a problem of an implementation or the problem is in my &quot;solo ratingEngine.php&quot; configuration/installation?<br><br></div><div>


Thanks<br><br></div><div>Efelin<br></div><div></div><div><br></div><div><br></div>My config goes as follow:<br><br></div><div>//paths, provider, normalize and anti-fraud settings are ommited.<br></div><div><br>$RatingEngine=array(&quot;socketIP&quot;               =&gt; &quot;127.0.0.1&quot;,<br>


                    &quot;socketPort&quot;             =&gt; &quot;9024&quot;,<br>                    &quot;cdr_source&quot;             =&gt; &quot;opensips_radius&quot;,<br>                    &quot;log_delay&quot;              =&gt; 0.05,<br>


                    &quot;split_rating_table&quot;     =&gt; false, <br>                    &quot;csv_delimiter&quot;          =&gt; &quot;,&quot;,<br>                    &quot;priceDenominator&quot;       =&gt; 1,<br>                    &quot;priceDecimalDigits&quot;     =&gt; 4,<br>


                    &quot;durationPeriodRated&quot;    =&gt; 60,<br>                    &quot;trafficSizeRated&quot;       =&gt; 1024,<br>                    &quot;reportMissingRates&quot;     =&gt; 1,<br>                    &quot;rate_longer_than&quot;       =&gt; 0, <br>


                    &quot;allow&quot;                  =&gt; array (&#39;127.0.0.1&#39;),<br>                    &quot;MaxSessionTime&quot;         =&gt; 14400,<br>                    &quot;rate_on_net_calls&quot;      =&gt; false<br>


                    );<br><br>class DB_CDRTool extends DB_Sql {<br>  var $Host     = &quot;IP&quot;;<br>  var $Database = &quot;cdrtool&quot;;<br>  var $User     = &quot;cdradmin&quot;;<br>  var $Password = &quot;xxxxx&quot;;<br>


  var $Halt_On_Error =&quot;yes&quot;;<br>}<br><br>class DB_radius extends DB_Sql {<br>  var $Host     = &quot;IP&quot;;<br>  var $Database = &quot;cdrtool_radius&quot;;<br>  var $User     = &quot;cdradmin&quot;;<br>  var $Password = &quot;xxxxx&quot;;<br>


  var $Halt_On_Error =&quot;no&quot;;<br>}<br><br>class DB_opensips extends DB_Sql {<br>  var $Host     = &quot;IP&quot;;<br>  var $Database = &quot;cdrtool_opensips&quot;;<br>  var $User     = &quot;cdradmin&quot;;<br>  var $Password = &quot;xxxxx&quot;;<br>


  var $Halt_On_Error =&quot;yes&quot;;<br>}<br><br><br>&quot;opensips_radius&quot;=&gt;array(<br>                        &quot;name&quot;               =&gt; &quot;OpenSIPS&quot;,<br>                        &quot;class&quot;              =&gt; &quot;CDRS_opensips&quot;,<br>


                        &quot;db_class&quot;           =&gt; &quot;DB_radius&quot;,<br>                        &quot;table&quot;              =&gt; &quot;radacct&quot;,<br>                        &quot;normalizedField&quot;    =&gt; &quot;Normalized&quot;,<br>


                        &quot;rating&quot;             =&gt; &quot;1&quot;,<br>                        &quot;db_subscribers&quot;     =&gt; &quot;DB_opensips&quot;,<br>                        &quot;db_registrar&quot;       =&gt; &quot;DB_opensips&quot;,<br>


                        &quot;daily_quota&quot;        =&gt; &quot;0&quot;,<br>                        &quot;UserQuotaNotify&quot;    =&gt; &quot;0&quot;)<br><br></div><br><div><br></div></div>
<br></div></div>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br>Regards,<br>Arsen.<br>
</font></span></div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div></div></div></div></div>