[OpenSIPS-Users] Rating_engine solo instalation

Arsen arsen.semionov at gmail.com
Tue Oct 15 16:16:09 CEST 2013


Hi Efelin,

I've just done the same, moved "rating engine only" from CDRTool to another
location.
I have moved folders: library, phplib and scripts also have changed init
script and global.inc and set path to new locations.
Everything work just fine.

I use CDRTool 9.0.1 source tarball.

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:
 // init database
        $this->db            = new DB_CDRTool;

Hope this can give you some idea..

Regards,
Arsen.


On Mon, Oct 14, 2013 at 11:46 AM, Efelin Novak <efelin.novak at gmail.com>wrote:

> Hi folks,
>
> I have a problem with the installation of the rating_engine. I don'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 & from the code and run the ratingEngine.php. MaxSesisonTime for
> any rates I'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)
>
> I have call-controll 2.0.15 and CDRTool 9.0.1
>
> Is this a problem of an implementation or the problem is in my "solo
> ratingEngine.php" configuration/installation?
>
> Thanks
>
> Efelin
>
>
> My config goes as follow:
>
> //paths, provider, normalize and anti-fraud settings are ommited.
>
> $RatingEngine=array("socketIP"               => "127.0.0.1",
>                     "socketPort"             => "9024",
>                     "cdr_source"             => "opensips_radius",
>                     "log_delay"              => 0.05,
>                     "split_rating_table"     => false,
>                     "csv_delimiter"          => ",",
>                     "priceDenominator"       => 1,
>                     "priceDecimalDigits"     => 4,
>                     "durationPeriodRated"    => 60,
>                     "trafficSizeRated"       => 1024,
>                     "reportMissingRates"     => 1,
>                     "rate_longer_than"       => 0,
>                     "allow"                  => array ('127.0.0.1'),
>                     "MaxSessionTime"         => 14400,
>                     "rate_on_net_calls"      => false
>                     );
>
> class DB_CDRTool extends DB_Sql {
>   var $Host     = "IP";
>   var $Database = "cdrtool";
>   var $User     = "cdradmin";
>   var $Password = "xxxxx";
>   var $Halt_On_Error ="yes";
> }
>
> class DB_radius extends DB_Sql {
>   var $Host     = "IP";
>   var $Database = "cdrtool_radius";
>   var $User     = "cdradmin";
>   var $Password = "xxxxx";
>   var $Halt_On_Error ="no";
> }
>
> class DB_opensips extends DB_Sql {
>   var $Host     = "IP";
>   var $Database = "cdrtool_opensips";
>   var $User     = "cdradmin";
>   var $Password = "xxxxx";
>   var $Halt_On_Error ="yes";
> }
>
>
> "opensips_radius"=>array(
>                         "name"               => "OpenSIPS",
>                         "class"              => "CDRS_opensips",
>                         "db_class"           => "DB_radius",
>                         "table"              => "radacct",
>                         "normalizedField"    => "Normalized",
>                         "rating"             => "1",
>                         "db_subscribers"     => "DB_opensips",
>                         "db_registrar"       => "DB_opensips",
>                         "daily_quota"        => "0",
>                         "UserQuotaNotify"    => "0")
>
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>


-- 
Regards,
Arsen.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20131015/8d0ac912/attachment.htm>


More information about the Users mailing list