Page MenuHomePhabricator

No OneTemporary

diff --git a/debian/changelog b/debian/changelog
index 769db9b..c8cad88 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,327 +1,338 @@
+cdrtool (5.0.9) unstable; urgency=low
+
+ * Added /var/www/CDRTool/scripts/replicationStatus.php
+ script to easily check the database replication process
+ Add to global.inc $CDRTool['replicated_databases']=array('DB1','DB2');
+ and defined DB1 and DB2 connections to the mysql databases that
+ replicate to each other. The connections must use the same IP
+ addresses and usernames used during the setup of the replication process
+
+ -- Adrian Georgescu <ag@ag-projects.com> Sat, 20 Jan 2007 16:14:09 +0100
+
cdrtool (5.0.8) unstable; urgency=low
* Enable failover between CDR databases for normalization process
db_class can be an array with database connection classes
* Removed db_class_readonly from global.inc
-- Adrian Georgescu <ag@ag-projects.com> Sat, 20 Jan 2007 12:03:19 +0100
cdrtool (5.0.7) unstable; urgency=low
* Fixed version to be compliant with debian native version numbering
-- Adrian Georgescu <ag@ag-projects.com> Wed, 10 Jan 2007 13:54:33 +0100
cdrtool (5.0-6) unstable; urgency=low
* Avoid unnecessary sql OR clause in CDR search that caused slow queries
-- Adrian Georgescu <ag@ag-projects.com> Mon, 8 Jan 2007 08:37:02 +0100
cdrtool (5.0-5) unstable; urgency=low
* Fixed determination of previous year in update_raddact_record_mediaproxy
Consolidate SET statements to minimize binary log entries. Fixed bug in
update_raddact_record_mediaproxy, the record values were reset after
execution of update on the first table causing failure to update the
previous table. setup/radius/OpenSER/radius_accounting.proc must be
reloaded into the MySQL server:
mysql -u root -p -h sipdb radius < setup/radius/OpenSER/radius_accounting.proc
* Use same CDR structure for MaxSessionTime and DebitBalance
* Change logging for prepaid actions to fit one line
* Normalize tries previous month if no record has been updated
* Mention how to see prepaid account status
* Updated rating docs
* Moved E164 class to phplib/local.inc
* Show accounts with quota that exceeded a certain treshold
scripts/SER/quotaShowAccounts.php treshhold
* Added documentation for the Quota system (doc/QuotaSystem.txt)
* Use normalization lock per table using GET_LOCK() server function
http://dev.mysql.com/doc/refman/5.0/en/miscellaneous-functions.html
This provided faster web response when multiple clients access the
interface
* Fixed confirmation for delete operations in rating tables when global
vars are turned off in php.ini
-- Adrian Georgescu <ag@ag-projects.com> Thu, 4 Jan 2007 15:32:52 +0100
cdrtool (5.0-4) unstable; urgency=low
* Better logging of prepaid calls in progress
* Added reloadPrepaidAccounts function to avoid reload of all rating tables
when only one prepaid account has changed
* Updated rating documentation
* Corrected some lintian errors for debian packaging
-- Adrian Georgescu <ag@ag-projects.com> Wed, 27 Dec 2006 11:53:09 +0100
cdrtool (5.0-3) unstable; urgency=low
* Fixed re-normalization of calls in previous monthly tables
* Fixed cached storage after re-normalize calls for previous months
* Clean ups in import csv files functions
-- Adrian Georgescu <ag@ag-projects.com> Thu, 21 Dec 2006 12:45:13 +0100
cdrtool (5.0-2) unstable; urgency=low
* The Import script for the rating files automatically detects if
a file has been previously imported and skips it
* Hide non-existent radius tables from datasource selection
* Fixed indexes of rating tables (see alter_tables.mysql)
* Fixed errors present in CSV import functions
* Added Country_code per customer, can be used within normalization class
-- Adrian Georgescu <ag@ag-projects.com> Thu, 21 Dec 2006 12:37:31 +0100
cdrtool (5.0-1) unstable; urgency=low
* Added scripts to display quota usage and settings
* Avoid duplicate tables in data source selection
-- Adrian Georgescu <ag@ag-projects.com> Mon, 18 Dec 2006 16:51:08 +0100
cdrtool (5.0) unstable; urgency=low
* Added support for MediaProxy accounting using Radius. Upgrade to
mediaproxy version >=1.8.0 is required to use this feature
* Added MySQL stored procedure for auto-rotation of radacct table using
radacctYYYMM table name format. This avoids manual purging of accounting
tables and the need for optimization of indexes, which can lock database
tables for writing and cause downtime. Requires modification of sql.conf
based on setup/radius/OpenSER/radius_accounting.conf, recompilation of
Freeradius server with CLIENT_MULTI_RESULTS flag enabled for mysql
connections and mediaproxy >= 1.8.0. See the documentation from
setup/radius/OpenSER/radius_accounting.proc for more information
* Added new patch for freeradius setup/radius/freeradius/freeradius.patch
* Replaced the E164Format function with a customizable class from
global.inc: $CDRTool['normalize']['E164Class'] that default instantiates
E164_Europe. See E164_Europe or E164_US in cdrlib.phtml for examples of
how to customize the behaviour of the normalization function
* Remove unused settings from global.inc: CountryNumberLength,
EnableSIPOnline, MinPstnNumLen, RotateThisMonth, RotateTables,
normalize0SecCalls and memcache (only if the OS is Debian, which reads
it from /etc/default/cdrtool)
* Set many defaults in the code to avoid explicit definitions in global.inc
* Default pagination is now 15 records, which better fits one 1024/768 screen
* Allow OpenSER subscriber login in CDRTool based on ha1 encrypted passwords
* Corrected the disposition mysql field in the Asterisk cdr table
* Added invisible property for datasources in global.inc,
useful to hide it from web elements like sip_trace datasource that
cannot be directly accessed
* Fixed media sessions statistics, IP traffic must be multiplied by
two when both SIP UAs are outside the MediaProxy network
* Fixed rating bug when either increment and minduration = 1
* Fixed pid file name of ratingEngine in /etc/init.d/cdrtool
* Updated term and conditions page displayed after login
* Log when quota has been exceeded
* Fixed logging of normalized totals
* More clear syslog logging statements
* Update rotate table logic
-- Adrian Georgescu <ag@ag-projects.com> Thu, 14 Dec 2006 20:33:26 +0100
cdrtool (4.8) unstable; urgency=low
* Log updates of rating tables
* Better display of log entries
* Log access to Registrar, Media and Usage pages
* Show the name of data sources in Log page
* Fixed display of timezone in all main menu items
* CDRTool version number points to the changelog
* It is possible to mark individual sip traces as public
-- Adrian Georgescu <ag@ag-projects.com> Mon, 27 Nov 2006 16:23:59 +0100
cdrtool (4.7-8) unstable; urgency=low
* Show cached usage only if showUsageFromCache is set in global.inc
* Fixed relative link to style.css in login screen
* Show friendly names for SIP Proxy machines in sip trace (see setup/global.inc.in)
* Fixed filtering of media sessions for login accounts with domain filter
* Added arrows to indicate SIP trace packet direction
* Show small SIP UA images for incomming messages in SIP trace
* Adjust trace to src/dst siptrace module fixes in OpenSER >= 1.1
-- Adrian Georgescu <ag@ag-projects.com> Sat, 25 Nov 2006 12:44:55 +0100
cdrtool (4.7-7) unstable; urgency=low
* Write sql trace in daily tables (changed sql.conf in freeradius configuration)
* Display platform total usage in OpenSER datasource (from cache)
* Show transport protocol in SIP online
* Fixed show domain details in sip online
* Filter statistics depending on CDRTool login rights
* Add links to statistrics screen from main menu
* removed /var/www/CDRTool/scripts/generateHTMLUsageIndexFile.php
/var/www/CDRTool/status/usage/index.phtml is generated on the fly
* Fixed relative link to style.css
-- Adrian Georgescu <ag@ag-projects.com> Sun, 19 Nov 2006 13:41:15 +0100
cdrtool (4.7-6) unstable; urgency=low
* Log the real SIP-Proxy-IP in radacct in place of NAS-IP-Address. Requires
update of Freeradius server configuration (sql.conf and dictionary.ser)
and OpenSER configuration
* Added per customer settings to specify the minimum charged duration and
time increments. For example it is possible to charge a minimum of 30
seconds and round up the duration to every next 10 seconds. Requires
two new columns in billing_customers table (see alter_tables.mysql)
* Fixed bugs in quotaCheck process, added quotaCompare.php script to check
sync problems between the CDR usage and cached usage, removed cache for
inbound traffic usage
* Added new SIP UA pictures (Nokia, Scientific-Atlanta Webstar, Ekiga)
* Fixed errors in building statistics for online totals
* Authorized access to the Usage web page.
/var/www/CDRTool/status/usage/index.html must be deleted
/var/www/CDRTool/status/usage/index.phtml must be generated using
/var/www/CDRTool/scripts/generateHTMLUsageIndexFile.php script
* Show memcache capacity usage
-- Adrian Georgescu <ag@ag-projects.com> Thu, 16 Nov 2006 19:49:50 +0100
cdrtool (4.7-5) unstable; urgency=low
* Fixed Reload of rating tables
* Show SIP Proxy IP in CDR results screen
* Fixed quota reset
-- Adrian Georgescu <ag@ag-projects.com> Wed, 1 Nov 2006 14:27:28 +0100
cdrtool (4.7-4) unstable; urgency=low
* Fixed debian package deps to install by default php5-memcache
* Allow login passwords greater than 10 characters
* Minor HTML changes in OpenSER CDR display
* Comment out double definitions present in freeradius server
* Enabled SSL in example virtual host
* Adjust maximum size of network traffic generated by MediaProxy
* Consolidate media statistics per caller domain and add totals
* Added 2 new settings to global.inc to filter zones for statistics
-- Adrian Georgescu <ag@ag-projects.com> Tue, 31 Oct 2006 12:12:59 +0100
cdrtool (4.7-3) unstable; urgency=low
* Increased default memcache and php memory to 128MB
* Fixed statistics to work with domains that have no online users
* Corrected wrong example of memcache location in sample configuration file
* Added style.css file to debian package
-- Adrian Georgescu <ag@ag-projects.com> Thu, 26 Oct 2006 12:20:57 +0200
cdrtool (4.7-2) unstable; urgency=low
* Added monthly usage caches for SIP domains and platform total in and out
* Improved display of SIP traces
* Added new screenshots
* Removed _darcs directory from the debian package
* Use DB_ser database class if DB_online not defined
* Add checks to mysql database creation script
* Log balance updates from the web in prepaid_history table
-- Adrian Georgescu <ag@ag-projects.com> Sun, 22 Oct 2006 14:57:35 +0200
cdrtool (4.7-1) unstable; urgency=low
* Renamed database class used by quota check system
* Updated rating documentation
-- Adrian Georgescu <ag@ag-projects.com> Wed, 11 Oct 2006 09:27:28 +0200
cdrtool (4.7-0) unstable; urgency=low
* Improved the speed of normalization and quota processes with a factor > 10
This requires the installation of a memcache server and setup of
global.inc to point to the memcache server (default is 127.0.0.1:11212)
* Added memcache to cdrtool startup script and /etc/default/cdrtool
* A new database table cdrtool.memcache has been created to store data in mysql
when a memcache server is not available (see setup/mysql/alter_tables.mysql)
* Added graphical statistics for SIP online subscriber and MediaProxy usage
Added a new cron script scripts/buildStatistics.php
* Hide Sendmail button if CDR query has no description
* Quota checks is now much faster by reusing incremental learned data
* Cache SIP subscribers and domains into memcache
* Cache destinations into memcache
* Calls can be rated if the duration is greater than a minimum duration
-- Adrian Georgescu <ag@ag-projects.com> Fri, 29 Sep 2006 18:18:58 +0200
cdrtool (4.6-9) unstable; urgency=low
* Added note about the dependency on the PHP SOAP library in doc/INSTALL.txt
-- Adrian Georgescu <ag@ag-projects.com> Tue, 19 Sep 2006 22:42:21 +0200
cdrtool (4.6-8) unstable; urgency=low
* Fixed variable names in phplib to avoid the need for registering
global variables in php.ini
* Tested CDRTool successfully against apache2/php5
* Create CDRTool/local/images directory during installation
* Remove sample apache configuration, is available in apache2
* Updated apache 2 virtual host definition
-- Adrian Georgescu <ag@ag-projects.com> Sun, 3 Sep 2006 12:26:56 +0200
cdrtool (4.6-7) unstable; urgency=low
* Update sample configuration for new installations
* Update documentation of rating engine
* Perform speeds test for the postpaid and prepaid applications
(results are available in the rating engine documentation)
* Removed Event-Timestamp from dictionary.ser, it is present now
in freeradius standard distribution
* Simplify default configuration
* Remove unused declaration of table_missed
* Replaced $cdr with $this->cdrtool and removed it from global.inc
* Allocate more memory at start time from phplib
-- Adrian Georgescu <ag@ag-projects.com> Fri, 25 Aug 2006 14:01:21 +0200
cdrtool (4.6-6) unstable; urgency=low
* Migrate from CVS to darcs version control
* Set executable flag for php scripts after installation
* Hide _darcs directory in apache
* Log the loading of prepaid accounts during start-up
-- Adrian Georgescu <ag@ag-projects.com> Thu, 10 Aug 2006 15:57:20 +0200
cdrtool (4.6-5) unstable; urgency=low
* Fixed search in query logs by string
-- Adrian Georgescu <ag@ag-projects.com> Tue, 8 Aug 2006 12:14:17 +0200
cdrtool (4.6-4) unstable; urgency=low
* Added script to reload rating engine scripts/reloadRatingTables.php
* cdrtool init.d script can reload the rating engine
* Added sample configuration for monit in setup/monit/monitrc
* Update description of 488 code
-- Adrian Georgescu <ag@ag-projects.com> Mon, 7 Aug 2006 10:49:19 +0200
cdrtool (4.6-3) unstable; urgency=low
* Properly put ratingEngine in background releasing the terminal
-- Adrian Georgescu <ag@ag-projects.com> Sun, 06 Aug 2006 18:05:05 +0200
cdrtool (4.6-2) unstable; urgency=low
* debian packaging improvements
-- Adrian Georgescu <ag@ag-projects.com> Sun, 06 Aug 2006 17:12:05 +0200
cdrtool (4.6-1) unstable; urgency=low
* Created CDRTool debian package
* Added filter for listing the query log, users with admin right may
select and edit all queries
* Added a new index in the log table (see setup/mysql/alter_tables.mysql)
-- Adrian Georgescu <ag@ag-projects.com> Sat, 5 Aug 2006 11:17:56 +0200
diff --git a/setup/global.inc.in b/setup/global.inc.in
index 02554ec..ef52ba0 100644
--- a/setup/global.inc.in
+++ b/setup/global.inc.in
@@ -1,276 +1,295 @@
<?
# This sample file contains examples for all possible settings of CDRTool
#
# 1. Change all hostnames and passwords according to the installation
# 2. Copy this file to /var/www/CDRTool/global.inc
#
ini_set('max_execution_time','120');
ini_set('memory_limit','64M');
###########################################
# System and web paths
$CDRTool['tld'] = "/CDRTool";
$CDRTool['Path'] = "/var/www/CDRTool";
$_PHPLIB['libdir'] = $CDRTool['Path']. "/phplib/";
include($_PHPLIB["libdir"] . "prepend.php3");
$global_local = $CDRTool['Path']."/global.inc.local";
###########################################
# 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'] = "SIP provider";
$CDRTool['provider']['service'] = "SIP service";
-$CDRTool['provider']['timezone'] = "Europe/Amsterdam";
+$CDRTool['provider']['timezone'] = "Europe/Amsterdam";
$CDRTool['provider']['fromEmail'] = "support@example.com";
$CDRTool['provider']['toEmail'] = "support@example.com";
$CDRTool['provider']['sampleLoginSubscriber'] = "317100000@example.com";
$CDRTool['provider']['sampleLoginDomain'] = "317100001@subdomain.example.com";
###########################################
# SMS one time passwords
# You can egister an account at www.simplewire.com
# useful to send temporary password to GSM phones
$simplewire_ID = "471-XXX-471-XXXXX";
$simplewire_Password = "DDDDD";
###########################################
# Where the rating engine listens for network requests:
$RatingEngine=array("socketIP" => "IP.address.of.the.private.interface.of.cdrtool.example.com",
"socketPort" => "9024",
"CDRS_class" => "ser_radius");
###########################################
# SOAP server for SER prepaid and last calls
# (experimental, not very well tested)
$SOAPServer=array("cdr_source" =>"ser_radius",
"location" =>"https://provider.com/CDRTool/SOAP/server.php",
"wsdl" =>"https://provider.com/CDRTool/SOAP/WSDL/",
"DB_ser" =>"DB_ser",
"UserNameField" =>"UserName",
"CanonicalURIField" =>"CanonicalURI"
);
###########################################
# Rating engine settings
$CDRTool['rating']=array(
"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
);
// Overwrite value from /etc/default/cdrtool
// this setting is necessary only for non-Debian systems
// $memcache_server = "127.0.0.1:11212";
###########################################
# Normalize engine settings
$CDRTool['normalize']['defaultCountryCode'] = "31";
# 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"
)
);
$CDRTool['statistics']['zoneFilter']=array("example1.com","example2.com"); // can filter for which zones we wish to build statistics
###########################################
# usage statistics
# filter local SIP domains if many do not have traffic
$CDRTool['statistics']['zoneFilter']=array("example1.com",
"example2.com"
);
# useful to add external domains to the statistics
$CDRTool['statistics']['extraZones']=array("anonymous.invalid",
"example4.com"
);
###########################################
# 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 datasources
# you must define all connections to MySQL database here
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_ser extends DB_Sql {
var $Host = "sipdb";
var $Database = "ser";
var $User = "ser";
var $Password = "PASSWORD";
var $Halt_On_Error ="no";
}
class DB_cisco extends DB_Sql {
var $Host = "sipdb";
var $Database = "radius";
var $User = "radius";
var $Password = "PASSWORD";
var $Halt_On_Error ="no";
}
+// Used by /var/www/CDRTool/scripts/replicationStatus.php
+class DB1 extends DB_Sql {
+ var $Host = "10.0.0.1";
+ var $Database = "radius";
+ var $User = "root";
+ var $Password = "PASSWORD";
+ var $Halt_On_Error ="no";
+}
+
+class DB2 extends DB_Sql {
+ var $Host = "10.0.0.2";
+ var $Database = "radius";
+ var $User = "root";
+ var $Password = "PASSWORD";
+ var $Halt_On_Error ="no";
+}
+
+$CDRTool['replicated_databases']=array('DB1','DB2');
+
# To allow users to login using a custom procedure. See DomainAuth from phplib/local.inc as example
class DomainAuthLocal extends DomainAuth {
}
class PageLayoutLocal extends PageLayout {
}
# To customize E164 normalization
class E164_custom extends E164 { // defined in cdrlib.phtml
}
# $CDRTool['normalize']['E164Class'] = "E164_custom";
$DATASOURCES=array(
"unknown"=>array(
"class" => "CDRS_unknown" // do not delete this datasource
),
"ser_radius"=>array(
"name" => "OpenSER",
"class" => "CDRS_ser_radius",
"db_class" => array("DB_radius2","DB_radius"),
"table" => "radacct", // or radacct".date("Ym") if sql.conf uses the mysql procedure to auto-rotate tables
"db_class_siponline" => "DB_ser", // location of openser location table
"rateField" => "Rate",
"rating" => "1",
"priceField" => "Price",
"DestinationIdField" => "DestinationId",
"normalizedField" => "Normalized",
"BillingPartyIdField"=> "UserName",
"AccountsDBClass" => "DB_ser",
"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
"sipTraceDataSource" => "sip_trace",
"traceOutURL" => array(
"sipvm.example.com"=>"asterisk",
"voipgw02.example.com"=>"cisco"
),
"UserQuotaClass" => "SERQuota",
"UserQuotaTable" => "subscriber",
"UserQuotaNotify" => "0", // send e-mail notifications when quota is exceeded
"EnableNetworkRating"=> "1",
"SOAPUsername" => "", // used by Multimedia Service Platform
"SOAPPassword" => "", // used by Multimedia Service Platform
"SOAPAdmin" => false, // used by Multimedia Service Platform
"SOAPURL" => "", // used by Multimedia Service Platform
"domainTranslation" => array(
"gw02.domain.com" => "pstn.domain.com" // translate Realm
),
"SourceIPRealmTranslation" => array(
"10.0.0.1" => "gateway.example.com" // translate Realm for sessions originating from IP address 10.0.0.1
),
"purgeCDRsAfter" => 120 // how many days to keep old CDRs
),
"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"=>"ser_radius",
"Asterisk"=>"asterisk"
),
"traceOutURL" => array(
"10.0.0.2"=>"ser_radius",
"ISDN 1"=>"ipnxcdr"
),
"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"=>"ser_radius"
),
"traceOutURL" => array(
"SIP"=>"ser_radius"
),
"purgeCDRsAfter" => 180 // how many days to keep the CDRs
),
"sip_trace" =>array(
"name" => "SIP trace",
"db_class" => "DB_ser",
"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
)
);
// load other CDRTool libraries
$CDRToolModules=array("ser","cisco","asterisk","custom","rating");
$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);
}
?>
diff --git a/setup/global.inc.new.installation b/setup/global.inc.new.installation
index 0929e5b..49e4afb 100644
--- a/setup/global.inc.new.installation
+++ b/setup/global.inc.new.installation
@@ -1,160 +1,176 @@
<?
#
# 1. Change all hostnames and passwords according to the installation
# 2. Copy this file to /var/www/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");
$global_local = $CDRTool['Path']."/global.inc.local";
###########################################
# 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@example.com";
$CDRTool['provider']['toEmail'] = "support@example.com";
$CDRTool['provider']['sampleLoginSubscriber'] = "number@example.com";
$CDRTool['provider']['sampleLoginDomain'] = "example.com";
###########################################
# Where the rating engine listens for network requests:
$RatingEngine=array("socketIP" => "IP.address.of.the.private.interface.of.cdrtool.example.com",
"socketPort" => "9024",
"CDRS_class" => "ser_radius");
###########################################
# 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 = "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 ="no";
}
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_radius2 extends DB_Sql {
var $Host = "sipdb2";
var $Database = "radius";
var $User = "radius";
var $Password = "PASSWORD";
var $Halt_On_Error ="no";
}
class DB_ser extends DB_Sql {
var $Host = "sipdb";
var $Database = "openser";
var $User = "openser";
var $Password = "PASSWORD";
var $Halt_On_Error ="no";
}
// Used by /var/www/CDRTool/scripts/replicationStatus.php
+class DB1 extends DB_Sql {
+ var $Host = "10.0.0.1";
+ var $Database = "radius";
+ var $User = "root";
+ var $Password = "PASSWORD";
+ var $Halt_On_Error ="no";
+}
+
+class DB2 extends DB_Sql {
+ var $Host = "10.0.0.2";
+ var $Database = "radius";
+ var $User = "root";
+ var $Password = "PASSWORD";
+ var $Halt_On_Error ="no";
+}
+
$CDRTool['replicated_databases']=array('DB1','DB2');
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 cdrlib.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",
"db_class" => array("DB_radius2","DB_radius"),
"rating" => "1",
"normalizedField" => "Normalized",
"UserQuotaClass" => "SERQuota",
"UserQuotaNotify" => "1",
"EnableNetworkRating"=> "1",
"purgeCDRsAfter" => 120, // how many days to keep the CDRs
"SIPProxies" =>array("11.123.28.150"=>"node01", // friendly names in sip trace table
"13.49.725.105"=>"node02",
)
),
"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_ser",
"table" => "sip_trace",
"purgeRecordsAfter" => "7",
"invisible" => 1
)
);
// load CDRTool libraries
$CDRToolModules=array("ser","asterisk","rating");
if ($_SERVER['REMOTE_ADDR']=="10.0.0.1") {
//$verbose=1;
} else {
// prevent set of verbose via post/get
unset($verbose);
}
?>
diff --git a/version b/version
index 51e67ba..bb09d45 100644
--- a/version
+++ b/version
@@ -1 +1 @@
-5.0.8
+5.0.9

File Metadata

Mime Type
text/x-diff
Expires
Sat, Feb 1, 6:15 AM (1 d, 11 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3488846
Default Alt Text
(34 KB)

Event Timeline