Page MenuHomePhabricator

No OneTemporary

diff --git a/debian/control b/debian/control
index f80497f..54d8548 100644
--- a/debian/control
+++ b/debian/control
@@ -1,37 +1,38 @@
Source: cdrtool
Section: web
Priority: optional
Maintainer: Adrian Georgescu <ag@ag-projects.com>
Uploaders: Tijmen de Mes <tijmen@ag-projects.com>
Build-Depends: debhelper (>= 9)
Standards-Version: 3.9.8
Homepage: http://cdrtool.ag-projects.com
Package: cdrtool
Architecture: all
Depends: ${misc:Depends},
debconf (>= 1.5),
apache2 | httpd,
libapache2-mod-php | libapache2-mod-php5,
php | php5,
php-cli | php5-cli,
php-mysql | php5-mysql,
php-curl | php5-curl,
php-gd | php5-gd,
php-pear,
php-net-socket,
php-net-url2,
+ php-monolog,
mrtg,
smarty3,
php-geoip | php5-geoip,
geoip-database
Suggests:
Description: CDR mediation and rating engine for OpenSIPS
CDRTool provides a CDR mediation and rating engine for Call Details Records
generated by OpenSIPS SIP Proxy/Registrar/Presence server.
.
CDRTool is a simple to use WEB application, which can be put in service with
minimal training of the helpdesk and operations staff. It provides instant
access to SIP usage information, traces from CDR level to protocol level,
statistics grouped by criteria like release cause, destination or billing
parties and can help pin-point SIP call flows failure reason.
diff --git a/phplib/logger.php b/phplib/logger.php
new file mode 100644
index 0000000..05b71ba
--- /dev/null
+++ b/phplib/logger.php
@@ -0,0 +1,29 @@
+<?php
+
+require 'Monolog/autoload.php';
+
+use Monolog\Logger;
+use Monolog\Handler\SyslogHandler;
+use Monolog\Formatter\LineFormatter;
+
+global $logger;
+
+$logger = new Logger('WEB');
+$syslog = new SyslogHandler('cdrtool', 'local0');
+$formatter = new LineFormatter("%channel%: %message% %extra%");
+$syslog->setFormatter($formatter);
+$logger->pushHandler($syslog);
+
+function log($message, $level = 'notice')
+{
+ global $logger;
+ if ($level == 'notice') {
+ notice($message);
+ }
+}
+
+function notice($message)
+{
+ $global $logger;
+ $logger->notice($message);
+}
diff --git a/phplib/prepend.php3 b/phplib/prepend.php3
index 8d2773d..d79ccef 100644
--- a/phplib/prepend.php3
+++ b/phplib/prepend.php3
@@ -1,27 +1,29 @@
<?php
//define_syslog_variables();
openlog("cdrtool", LOG_PID, LOG_LOCAL0);
ini_set('register_globals','on');
ini_set('max_execution_time','120');
ini_set('magic_quotes_gpc','Off');
$lib_dirs=$_PHPLIB['libdir'].":".
$CDRTool['Path']."/library:".
"/etc/cdrtool/local:".
ini_get('include_path');
ini_set('include_path', $lib_dirs);
if (!is_array($_PHPLIB)) $_PHPLIB["libdir"] = "";
+require "logger.php";
+
require("db_mysqli.inc"); /* Change this to match your database. */
require("ct_sql.inc"); /* Change this to match your data storage container */
require("session.inc"); /* Required for everything below. */
require("auth.inc"); /* Disable this, if you are not using authentication. */
require("perm.inc"); /* Disable this, if you are not using permission checks. */
require("user.inc"); /* Disable this, if you are not using per-user variables. */
require("oohforms.inc");
require("local.inc"); /* Required, contains your local configuration. */
require("page.inc"); /* Required, contains the page management functions. */
?>

File Metadata

Mime Type
text/x-diff
Expires
Tue, Nov 26, 5:00 AM (1 d, 18 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3414175
Default Alt Text
(3 KB)

Event Timeline