[OpenSIPS-Users] cdrtool: looking in the wrong location for radacct table when mysql on the same IP address?

Paul Wise pabs3 at bonedaddy.net
Wed Apr 28 04:01:17 CEST 2010


On Tue, 2010-04-27 at 10:22 +0200, Saúl Ibarra Corretgé wrote:

> Can you paste you global.inc file? (strip sensible information)

Pretty much the sample global.inc with names, IP addresses, database
user/passwords etc changed. I've attached it to this mail.

-- 
bye,
pabs

http://bonedaddy.net/pabs3/
-------------- next part --------------
<?

# 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']                  = "xxxx";
$CDRTool['provider']['service']               = "xxxxxxxxxxx";
$CDRTool['provider']['timezone']              = "Australia/Perth";
$CDRTool['provider']['fromEmail']             = "support at xxxxxxxx";
$CDRTool['provider']['toEmail']               = "support at xxxxxxxx";
$CDRTool['provider']['sampleLoginSubscriber'] = "number at xxxxxxxx";
$CDRTool['provider']['sampleLoginDomain']     = "xxxxxxxx";

###########################################
# Rating engine settings
$RatingEngine=array("socketIP"               => "192.168.xxx.xxx",
                    "socketPort"             => "9024",
                    "cdr_source"             => "opensips_radius",
                    "allow"                  => array ('192.168.')
                    );
###########################################
# Normalize engine settings
$CDRTool['normalize']['defaultCountryCode']      = "61";

###########################################
# Build graphical statistics for these domains:
$CDRTool['statistics']['domains']=array("xxxxxxxx");

###########################################
# Anti-fraud settings
$UserQuota["default"]["cost"]     = 1000;

###########################################
# CDRTool databases

class DB_CDRTool extends DB_Sql {
  var $Host     = "192.168.xxx.xxx";
  var $Database = "cdrtool";
  var $User     = "xxxx";
  var $Password = "xxxx";
  var $Halt_On_Error ="yes";
}

class DB_Locker extends DB_Sql {
  var $Host     = "192.168.xxx.xxx";
  var $Database = "cdrtool";
  var $User     = "xxxx";
  var $Password = "xxxx";
  var $Halt_On_Error ="yes";
}

class DB_radius extends DB_Sql {
  var $Host     = "192.168.xxx.xxx";
  var $Database = "radius";
  var $User     = "xxxx";
  var $Password = "xxxx";
  var $Halt_On_Error ="yes";
}

class DB_opensips extends DB_Sql {
  var $Host     = "192.168.xxx.xxx";
  var $Database = "opensips";
  var $User     = "xxxx";
  var $Password = "xxxx";
  var $Halt_On_Error ="yes";

}

class DB_mediaproxy extends DB_Sql {
  var $Host     = "192.168.1.59";
  var $Database = "mediaproxy";
  var $User     = "xxxx";
  var $Password = "xxxx";
  var $Halt_On_Error ="yes";
}

// Subscriber login
class DomainAuthLocal extends OpenSIPS_DomainAuth {	// defined in phplib/local.inc
}

class PageLayoutLocal extends PageLayout {      // defined in phplib/local.inc
}

###########################################
# CDRTool datasources

$DATASOURCES=array(
"unknown"        => array("class"              => "CDRS_unknown"),
"opensips_radius"=> array(
                    "name"               => "OpenSIPS Proxy/Registrar",
                    "class"              => "CDRS_opensips",
                    "db_class"           => array("DB_radius",),
                    "table"              => "radacct".date("Ym"),
                    "normalizedField"    => "Normalized",
                    "rating"             => "1",
                    "db_subscribers"     => "DB_opensips",
                    "db_registrar"       => "DB_opensips",
                    "UserQuotaClass"     => "OpenSIPSQuota",
                    "UserQuotaNotify"    => "1",
                    "sipTrace"           => "sip_trace",
                    "mediaTrace"         => "media_trace",
                    "mediaDispatcher"    => "tls:192.168.xxx.xxx:25061"
                    ),
"asterisk_vm"  => array("name"            => "Voicemail server",
                    "class"              => "CDRS_asterisk",
                    "table"              => "asterisk_cdr",
                    "db_class"           => "DB_radius",
                    "rating"             => "0",
                    "normalizedField"    => "Normalized",
                    "purgeCDRsAfter"    => 180 // how many days to keep the CDRs
                    ),
"sip_trace"   => array(
                    "name"               => "SIP trace",
                    "db_class"           => "DB_opensips",
                    "table"              => "sip_trace",
                    "mediaTrace"         => "media_trace",
                    "purgeRecordsAfter"  => "7",
                    "invisible"          => 1 
                    ),
"media_trace"   =>array(
                    "name"               => "Media trace",
                    "db_class"           => "DB_mediaproxy",
                    "invisible"          => 1 
                    )

);

###########################################
# Load libraries from library/cdr_* 
$CDRToolModules=array("opensips","asterisk");

?>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
Url : http://lists.opensips.org/pipermail/users/attachments/20100428/5664ad34/attachment.pgp 


More information about the Users mailing list