"IP.address.of.the.private.interface.of.cdrtool.example.com", "socketPort" => "9024", "cdr_source" => "opensips_radius", // points to a defined DATASOURCE "log_delay" => 0.05, "split_rating_table" => false, // when true individual rating tables are automatically created for each rate id "csv_delimiter" => ",", // when importin CSV files "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 ('10.','192.168.0.1','127.0.0.1'), // list with clients allowed to connect "MaxSessionTime" => 36000 // limit all prepaid calls to maximum 10 hours ); ########################################### # Normalize engine settings $CDRTool['normalize']['defaultCountryCode'] = "31"; ########################################### # build graphical statistics for these domains: $CDRTool['statistics']['domains']=array("example.com"); # Carrier selection codes, strip first digits # and allocate custom Billing Party $CDRTool['normalize']['CS_CODES']= array("1684" => array ("name" =>"test@Call", "BillingPartyId" =>"call@example.com", "BillingDomain" =>"example.com", "minimumLength" =>"9" ) ); ########################################### # Anti-fraud settings # create group quota in SER and deny calls to users in this group $UserQuota["default"]["traffic"] = 5000; // MBytes $UserQuota["default"]["cost"] = 1000; // Euro ########################################### # CDRTool databases class DB_CDRTool extends DB_Sql { var $Host = "sipdb"; var $Database = "cdrtool"; var $User = "cdradmin"; var $Password = "PASSWORD"; var $Halt_On_Error ="yes"; } class DB_Locker extends DB_Sql { var $Host = "sipdb"; var $Database = "cdrtool"; var $User = "locker"; var $Password = "PASSWORD"; var $Halt_On_Error ="yes"; } class DB_radius extends DB_Sql { var $Host = "sipdb"; var $Database = "radius"; var $User = "radius"; var $Password = "PASSWORD"; var $Halt_On_Error ="no"; } class DB_opensips extends DB_Sql { var $Host = "sipdb"; var $Database = "opensips"; var $User = "opensips"; var $Password = "PASSWORD"; var $Halt_On_Error ="yes"; } class DB_siptrace extends DB_Sql { var $Host = "sipdb"; var $Database = "siptrace"; var $User = "opensips"; 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'=>'db2', 'user' =>'process', 'password'=>'password', 'replication_user' =>'replication', 'replication_password'=>'password', 'active_master' => true ), "db2"=>array('ip' =>'10.0.0.132', 'slave_of'=>'db1', 'user' =>'process', 'password'=>'password', 'replication_user' =>'replication', 'replication_password'=>'password' ) ) ); # To allow subscribers to login and access their own CDRs. See # OpenSIPS_DomainAuth from phplib/local.inc as example class DomainAuthLocal extends OpenSIPS_DomainAuth { } class PageLayoutLocal extends PageLayout { } ########################################### # CDRTool datasources class CDRS_opensips_custom extends CDRS_opensips { // this shows how you can modify the default behavior of standard CDRS_opensips class // you can overwrite any function from that class here // to use this class set the data source 'class' setting to the name of this class } $DATASOURCES=array( "unknown"=>array( "class" => "CDRS_unknown" // do not delete this datasource ), "opensips_radius"=>array( "name" => "OpenSIPS", "class" => "CDRS_opensips_custom", "db_class" => array("DB_radius2","DB_radius"), "table" => "radacct", // or "radacct".date("Ym") if sql.conf uses the mysql procedure to auto-rotate tables "rating" => "1", // enable rating "rateField" => "Rate", // which field stores the rating info "E164_class" => "E164_custom", // define a custom class to determine the E164 for a telephone number // see E164 classes as example in library/cdr_generic.php "priceField" => "Price", "DestinationIdField" => "DestinationId", "normalizedField" => "Normalized", "BillingPartyIdField"=> "UserName", "db_susbcribers" => "DB_opensips", "domain_table" => "domain", // table of db_susbcribers that holds domains served by the sip proxy "subscriber_table" => "subscriber", // table of db_susbcribers that holds susbcribers served by the sip proxy "intAccessCode" => "00", // international acess code, numbers prefixed with this are considered international destinations "natAccessCode" => "0", // international acess code, numbers prefixed with this are considered national destinations "sipTrace" => "sip_trace", // which datasource is used for display of sip trace "mediaTrace" => "media_trace", // which datasource is used for display of media trace "UserQuotaClass" => "OpenSIPSQuota", "UserQuotaNotify" => "1", // send e-mail notifications when quota is exceeded "notifyLastSessions" => true, // send e-mail notifications with sessions received in the last 24 hours "soapEngineId" => '', // used by Multimedia Service Platform "domainTranslation_SourceIP" => array( "10.0.0.1" => "gateway.example.com" // translate Realm for sessions originating from IP address 10.0.0.1 ), "domainTranslation" => array( "gw02.domain.com" => "pstn.domain.com" // translate Realm ), "purgeCDRsAfter" => 120, // how many days to keep old CDRs, valid only when Radius tables are not atomatically rotated "db_registrar" => "DB_opensips", // opensips location database "enableThor" => false, // set to true if using SIP Thor "mediaSessions" => "sipthor", // NGNPro engine id used by SIP Thor "networkStatus" => "sipthor", // NGNPro engine id used by SIP Thor "mediaDispatcher" => "tls:10.0.0.1:25061", // Where to get the active media sessions from MediaProxy 2.0 // Create /etc/cdrtool/mediaproxy.pem containing the certificate and private key "mediaServers" => array( "10.0.0.2", "10.0.0.3" ) // where to get the active sessions from MediaRroxy 1.x ), "cisco" =>array("name" => "Cisco gateway", "class" => "CDRS_cisco", "db_class" => "DB_cisco", "table" => "radacct", "rateField" => "Rate", "rating" => "1", "priceField" => "Price", "DestinationIdField" => "DestinationId", "normalizedField" => "Normalized", "traceInURL" => array( "10.0.0.2"=>"opensips_radius", "Asterisk"=>"asterisk" ), "traceOutURL" => array( "10.0.0.2"=>"opensips_radius" ), "purgeCDRsAfter" => 180 // how many days to keep the CDRs ), "asterisk" =>array("name" => "Asterisk server", "class" => "CDRS_asterisk", "table" => "asterisk_cdr", "db_class" => "DB_radius", "rateField" => "Rate", "rating" => "1", "priceField" => "Price", "DestinationIdField" => "DestinationId", "normalizedField" => "Normalized", "contexts" => array( "SIP"=>array("WEBName"=>"SIP Provider 1"), "PSTN"=>array("WEBName"=>"PSTN 2 ENUM") ), "traceInURL" => array( "SIP"=>"opensips_radius" ), "traceOutURL" => array( "SIP"=>"opensips_radius" ), "purgeCDRsAfter" => 180 // how many days to keep the CDRs ), "sip_trace" =>array( "name" => "SIP trace", "db_class" => "DB_siptrace", "table" => "sip_trace", "purgeRecordsAfter" => "7", "SIPProxies" => array("10.0.0.1"=>"SIP Proxy 1", "10.0.0.2"=>"SIP Proxy 2" ), "invisible" => 1, // hide this datasource in call search page / datasource selection "mediaTrace" => "media_trace" ), "sip_trace_thor" =>array( "name" => "SIP trace Thor", "enableThor" => true, "soapEngineId" => "sipthor", "mediaTrace" => "media_trace_thor", "invisible" => 1, ), "media_trace" =>array( "name" => "Media trace", "db_class" => "DB_mediaproxy", "enableThor" => false, "invisible" => 1 ), "media_trace_thor" =>array( "name" => "Media trace Thor", "enableThor" => true, "soapEngineId" => "sipthor", "invisible" => 1 ) ); // load other CDRTool libraries $CDRToolModules=array("opensips","asterisk"); $tz=$CDRTool['provider']['timezone']; putenv("TZ=$tz"); if ($_SERVER['REMOTE_ADDR']=="10.0.0.1") { // display debug information only from this host //$verbose=1; } else { // prevent set of verbose via post/get unset($verbose); } ?>