diff --git a/setup/global.inc.complex.sample b/setup/global.inc.complex.sample index d0bd600..ec86e42 100644 --- a/setup/global.inc.complex.sample +++ b/setup/global.inc.complex.sample @@ -1,362 +1,363 @@ "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 importing CSV files "priceDenominator" => 10000, // e.g. 1 Eur = 10000 units "priceDecimalDigits" => 4, // how many digits to round the prices to "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 "rate_longer_than" => 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 "rate_on_net_calls" => false, "rate_on_net_diverted_calls" => false ); /* // temporary testing mongo backend capabilities "database_backend" => "mongo", "mongo_db" => array("uri" => "mongo1.example.com, mongo2.example.com", "database" => "rating", "replicaSet" => "sipthor", "safe" => 1) $CDRTool['mongo_db']['sipthor'] = array("uri" => "mongo1.example.com, mongo2.example.com", "database" => "accounting", "replicaSet" => "sipthor"); */ /** * Normalize engine settings */ $CDRTool['normalize']['defaultCountryCode'] = "31"; /** * Where to retrieve the reseller settings from */ $CDRTool['ngnpro_reseller_engine'] = 'sip'; /** * 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 { public $Host = "sipdb"; public $Database = "cdrtool"; public $User = "cdradmin"; public $Password = "PASSWORD"; public $Halt_On_Error ="yes"; } class DB_Locker extends DB_Sql { public $Host = "sipdb"; public $Database = "cdrtool"; public $User = "locker"; public $Password = "PASSWORD"; public $Halt_On_Error ="yes"; } class DB_radius extends DB_Sql { public $Host = "sipdb"; public $Database = "radius"; public $User = "radius"; public $Password = "PASSWORD"; public $Halt_On_Error ="no"; } class DB_opensips extends DB_Sql { public $Host = "sipdb"; public $Database = "opensips"; public $User = "opensips"; public $Password = "PASSWORD"; public $Halt_On_Error ="yes"; } class DB_siptrace extends DB_Sql { public $Host = "sipdb"; public $Database = "siptrace"; public $User = "opensips"; public $Password = "PASSWORD"; public $Halt_On_Error ="yes"; } class DB_mediaproxy extends DB_Sql { public $Host = "sipdb"; public $Database = "mediaproxy"; public $User = "mediaproxy"; public $Password = "PASSWORD"; public $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", "skipNormalizeOnPageLoad" => 0, "skipNormalize" => 0, // set it it to true to disable the normalization process "BillingPartyIdField" => "UserName", "db_susbcribers" => "DB_opensips", #"mongo_db" => "sipthor", // experimental/testing purposes only "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", "daily_quota" => "0", // a percentage [1 to 99] of monthly quota to check for daily usage, 0 means disabled "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 ), "domainTranslationDestination" => array( "gw02.domain.com" => "pstn.domain.com" // translate destination ), "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 "skipStatistics" => 0, // Skip usage graphs, "db_ngnpro_stats" => "DB_CDRTool" // Database for provisioning stats ), "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); } ?>