[OpenSIPS-Users] CDRTool Not Showing the Price

Adrian Georgescu ag at ag-projects.com
Mon Nov 17 13:30:30 CET 2008


Hi Dilip,

I canot see any calls at all in your syslog entries. As a wild guess  
most probably your destination field is not formatted correctly, it  
should start with 00 to be matched by the standard destination lookup  
logic.

Can you paste the Radius accounting tickets for one  OpenSER session  
(START, STOP, UPDATE radius tickets)?

You can find the radius tickets under /var/log/freeradius/radacct/*

Regards,
Adrian


On Nov 17, 2008, at 1:25 PM, Dilip wrote:

> hello Sir,
> Actually i could not see the price in the CDRTool GUI.
> I have configured it according to the rating document.but Still  
> there is
> not any calculation is start by cdrtool.
> What may be the problem ???
> I have paste here the syslog message...so please guide me.
>
> Nov 17 06:50:01 cl-t041-080cl cdrtool[29397]: Unlock
> asterisk_vm:asterisk_cdr
> Nov 17 06:55:01 cl-t041-080cl cdrtool[29434]: Normalize datasource
> ser_radius, database DB_CDRTool, table radacct
> Nov 17 06:55:01 cl-t041-080cl cdrtool[29434]: Normalize lock id 12325
> aquired for ser_radius:radacct
> Nov 17 06:55:01 cl-t041-080cl cdrtool[29434]: Normalize datasource
> asterisk_vm, database DB_radius, table asterisk_cdr
> Nov 17 06:55:01 cl-t041-080cl cdrtool[29434]: Normalize lock id 12325
> aquired for asterisk_vm:asterisk_cdr
> Nov 17 06:55:01 cl-t041-080cl cdrtool[29434]: Unlock  
> ser_radius:radacct
> Nov 17 06:55:01 cl-t041-080cl cdrtool[29434]: Unlock
> asterisk_vm:asterisk_cdr
> Nov 17 07:00:01 cl-t041-080cl cdrtool[29471]: Normalize datasource
> ser_radius, database DB_CDRTool, table radacct
> Nov 17 07:00:01 cl-t041-080cl cdrtool[29471]: Normalize lock id 12344
> aquired for ser_radius:radacct
> Nov 17 07:00:01 cl-t041-080cl cdrtool[29471]: Normalize datasource
> asterisk_vm, database DB_radius, table asterisk_cdr
> Nov 17 07:00:01 cl-t041-080cl cdrtool[29471]: Normalize lock id 12344
> aquired for asterisk_vm:asterisk_cdr
> Nov 17 07:00:01 cl-t041-080cl cdrtool[29471]: Unlock  
> ser_radius:radacct
> Nov 17 07:00:01 cl-t041-080cl cdrtool[29471]: Unlock
> asterisk_vm:asterisk_cdr
> Nov 17 07:05:02 cl-t041-080cl cdrtool[29509]: Normalize datasource
> ser_radius, database DB_CDRTool, table radacct
> Nov 17 07:05:02 cl-t041-080cl cdrtool[29509]: Normalize lock id 12348
> aquired for ser_radius:radacct
> Nov 17 07:05:02 cl-t041-080cl cdrtool[29509]: Normalize datasource
> asterisk_vm, database DB_radius, table asterisk_cdr
> Nov 17 07:05:02 cl-t041-080cl cdrtool[29509]: Normalize lock id 12348
> aquired for asterisk_vm:asterisk_cdr
> Nov 17 07:05:02 cl-t041-080cl cdrtool[29509]: Unlock  
> ser_radius:radacct
> Nov 17 07:05:02 cl-t041-080cl cdrtool[29509]: Unlock
> asterisk_vm:asterisk_cdr
> Nov 17 07:08:39 cl-t041-080cl cdrtool[19924]: Normalize lock id 11823
> aquired for ser_radius:radacct
> Nov 17 07:08:39 cl-t041-080cl cdrtool[19924]: Memory usage: 8.52MB,
> memory limit: 16MB
> Nov 17 07:08:39 cl-t041-080cl cdrtool[19924]: Loaded 3 profiles
> Nov 17 07:08:39 cl-t041-080cl cdrtool[19924]: Loaded 0 ratesHistory
> Nov 17 07:08:39 cl-t041-080cl cdrtool[19924]: Loaded 0 holidays
> Nov 17 07:08:39 cl-t041-080cl cdrtool[19924]: Loaded 1 enumTlds
> Nov 17 07:08:39 cl-t041-080cl cdrtool[19924]: Memory usage: 8.53MB,
> memory limit: 16MB
> Nov 17 07:08:39 cl-t041-080cl cdrtool[19924]: Normalization done in  
> 0 s,
> memory usage: 8.55 MB
> Nov 17 07:08:40 cl-t041-080cl cdrtool[19924]: Unlock  
> ser_radius:radacct
>
> Please help me.
> How to show the price in the CDRTool GUI.
> I have import all the rating csv in the db.
> below is my global.inc file of cdrtool.
> Is there any mistake in the file.
>
> #
> # 1. Change all hostnames and passwords according to the installation
> # 2. Copy this file to /etc/cdrtool/global.inc
> #
>
> ###########################################
> # System and web paths
>
> $CDRTool['tld']    = "/CDRTool";
> $CDRTool['Path']   = "/var/www/CDRTool";
> $_PHPLIB['libdir'] = $CDRTool['Path']. "/phplib/";
> include($_PHPLIB["libdir"] . "prepend.php3");
>
> ###########################################
> # PHP Error reporting
> $errorReporting = (E_ALL & ~E_NOTICE);
> $errorReporting = 1;    // comment this out to enable PHP warnings
> error_reporting($errorReporting);
>
> ###########################################
> # Service provider information
>
> $CDRTool['provider']['name']                  = "Provider name";
> $CDRTool['provider']['service']               = "SIP service";
> $CDRTool['provider']['timezone']              = "Europe/Amsterdam";
> $CDRTool['provider']['fromEmail']             = "support at example.com";
> $CDRTool['provider']['toEmail']               = "support at example.com";
> $CDRTool['provider']['sampleLoginSubscriber'] = "number at example.com";
> $CDRTool['provider']['sampleLoginDomain']     = "example.com";
>
> ###########################################
> # Rating engine settings
> $RatingEngine=array("socketIP"               => "1.2.3.4",
>                    "socketPort"             => "9024",
>                    "CDRS_class"             => "ser_radius",
>                    "prepaid_lock"           => true,
>                    "log_delay"              => 0.05,
>                    "split_rating_table"     => true,    //false
>                    "csv_delimiter"          => ",",
>                    "priceDenominator"       => 10000, // e.g. 1 Eur =
> 10000 units
>                    "priceDecimalDigits"     => 4,     // how many
> digits to round the prices to
>                    "minimumDurationCharged" => 0,     // Only calls
> greater than this duration will be charged
>                    "durationPeriodRated"    => 60,    // the prices
> from the rating table are calculated per this period
>                    "trafficSizeRated"       => 1024,  // same as above
> but for data traffic
>                    "reportMissingRates"     => 0,     // send email
> notifications if rates are missing from the ratingEngine
>                    "minimumDuration"        => 0,     // minimum
> duration to rate, if call duration is shorter the price is zero
>                    "allow"                  => array ('67.'),  // list
> with local network clients allowed to connect
>                    "MaxSessionTime"         => 36000  // limit all
> prepaid calls to maximum 10 hours
>                    );
>
> ###########################################
> # Normalize engine settings
> $CDRTool['normalize']['defaultCountryCode']      = "31";
>
> ###########################################
> # Anti-fraud settings
> # create group quota in OpenSER and deny calls to users in this group
> # $UserQuota["default"]["traffic"]  = 5000;            // MBytes
> $UserQuota["default"]["cost"]     = 1000;              // Euro
>
> ###########################################
> # CDRTool datasources
>
> class DB_CDRTool extends DB_Sql {
>  var $Host     = "localhost";
>  var $Database = "cdrtool";
>  var $User     = "root";
>  var $Password = "password";
>  var $Halt_On_Error ="yes";
> }
>
> class DB_Locker extends DB_Sql {
>  var $Host     = "localhost";
>  var $Database = "cdrtool";
>  var $User     = "root";
>  var $Password = "password";
>  var $Halt_On_Error ="yes";
> }
>
> class DB_radius extends DB_Sql {
>  var $Host     = "localhost";
>  var $Database = "radius";
>  var $User     = "root";
>  var $Password = "password";
>  var $Halt_On_Error ="no";
> }
>
> class DB_radius2 extends DB_Sql {
>  var $Host     = "localhost";
>  var $Database = "radius";
>  var $User     = "root";
>  var $Password = "password";
>  var $Halt_On_Error ="no";
> }
>
> class DB_subscribers extends DB_Sql {
>  var $Host     = "sipdb";
>  var $Database = "openser";
>  var $User     = "openser";
>  var $Password = "PASSWORD";
>  var $Halt_On_Error ="yes";
> }
>
> class DB_openser extends DB_Sql {
>  var $Host     = "localhost";
>  var $Database = "openser";
>  var $User     = "openser";
>  var $Password = "openserrw";
>  var $Halt_On_Error ="yes";
> }
>
> class DB_siptrace extends DB_Sql {
>  var $Host     = "localhost";
>  var $Database = "openser";
>  var $User     = "root";
>  var $Password = "password";
>  var $Halt_On_Error ="yes";
> }
>
> class DB_mediaproxy extends DB_Sql {
>  var $Host     = "sipdb";
>  var $Database = "mediaproxy";
>  var $User     = "mediaproxy";
>  var $Password = "PASSWORD";
>  var $Halt_On_Error ="yes";
> }
>
> $replicated_databases=array('cluster1'=>array(
>                                              "db1"=>array('ip'
> =>'10.0.0.131',
>
> 'slave_of'=>'db-log2',
>                                                               'user'
> =>'process',
>
> 'password'=>'password',
>
> 'replication_user'    =>'replication',
>
> 'replication_password'=>'password',
>
> 'active_master' => true
>                                                               ),
>                                              "db2"=>array('ip'
> =>'10.0.0.132',
>
> 'slave_of'=>'db-log1',
>                                                               'user'
> =>'process',
>
> 'password'=>'password',
>
> 'replication_user'    =>'replication',
>
> 'replication_password'=>'password'
>                           )                                    )
>                 );
>
> class DomainAuthLocal extends DomainAuth {      // defined in
> phplib/local.inc
> }
>
> class PageLayoutLocal extends PageLayout {      // defined in
> phplib/local.inc
> }
>
> # To customize E164 normalization
> class E164_custom extends E164 {      // defined in library/ 
> cdr_lib.phtml
> }
> # $CDRTool['normalize']['E164Class']           = "E164_custom";
>
>
> $DATASOURCES=array(
> "unknown"=>array(
>                    "class"              => "CDRS_unknown" // leave  
> it here
>                    ),
> "ser_radius"=>array(
>                    "name"               => "OpenSER",
>                    "class"              => "CDRS_ser_radius",
>                    #"table"              => "radacct".date("Ym"),
>                    "table"              => "radacct",
>                    "db_class"           =>
> array("DB_radius2","DB_radius"),
>                    "rating"             => "1",
>                    "normalizedField"    => "Normalized",
>                    #"UserQuotaClass"     => "OpenSERQuota",
>                    "AccountsDBClass"    => "DB_openser",
>                    "UserQuotaNotify"    => "1",
>                    "purgeCDRsAfter"     => 120, // how many days to
> keep the CDRs
>                    "SIPProxies"         => array("1.2.3.4" =>
> "node01",  // friendly names in sip trace table
>                                                  "10.0.0.2" =>  
> "node02",
>                                                ),
>                   "intAccessCode"      => "91",         //
> international acess code, numbers prefixed with this are considered
> international destinations
>                   "natAccessCode"      => "1",          //
> international acess code, numbers prefixed with this are considered
> national destinations
>                    "domainTranslation"  =>
> array(
> "gw02.domain.com"      => "pstn.domain.com" // translate realm ),
>                        ),
>                     "SourceIPRealmTranslation"  => array(
>                                  "1.2.3.4"      =>
> "gateway.example.com" // translate Realm for sessions originating from
> IP address 10.0.0.1
>                                  ),
>                    "db_class_siponline" => "DB_openser",
>                    "mediaDispatcher"    => "4.3.2.1", // where to get
> the active media sessions from MediaProxy 2.0
>                    "mediaServers"       =>
> array(
>
>
> "4.3.2.1"
> )  // where to get the active sessions from MediaRroxy 1.x
>
>                    ),
> "asterisk_vm"  =>array("name"            => "Voicemail server",
>                    "class"              => "CDRS_asterisk",
>                    "table"              => "asterisk_cdr",
>                    "db_class"           => "DB_radius",
>                    "rating"             => "1",
>                    "normalizedField"    => "Normalized",
>                    "contexts"           => array(
>
> "SIP"=>array("WEBName"=>"OpenSER"),
>                                            ),
>                    "traceInURL"         => array(
>                                            "SIP"=>"ser_radius"
>                                                        ),
>                    "traceOutURL"        => array(),
>                    "purgeCDRsAfter"    => 180 // how many days to keep
> the CDRs
>                    ),
> "sip_trace"   =>array(
>                    "name"               => "SIP trace",
>                    "db_class"           => "DB_siptrace",
>                    "table"              => "sip_trace",
>                    "enableThor"         => false,
>                    "purgeRecordsAfter"  => "7",
>                    "invisible"          => 1
>                    ),
> "media_trace"   =>array(
>                    "name"               => "Media trace",
>                    "db_class"           => "DB_mediaproxy",
>                    "enableThor"         => false,
>                    "invisible"          => 1
>                    )
>
> );
>
> // load CDRTool libraries
> $CDRToolModules=array("openser","asterisk");
>
> if ($_SERVER['REMOTE_ADDR']=="1.2.3.4") {
>    $verbose=1;
> } else {
>    // prevent set of verbose via post/get
>    unset($verbose);
> }
>
>
> Please help me.
> Regards,
> Dilip
>
>
>
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20081117/a919d5e4/attachment-0001.htm 


More information about the Users mailing list