diff options
author | Li-Wen Hsu <lwhsu@FreeBSD.org> | 2007-07-28 09:21:15 +0000 |
---|---|---|
committer | Li-Wen Hsu <lwhsu@FreeBSD.org> | 2007-07-28 09:21:15 +0000 |
commit | a369277b0d99e6eb306a59fab75b05dd2a5db3d7 (patch) | |
tree | e166a2dcaa372c0c3ea4c5d61f90503fe6acd223 /www/asterisk-stat/files | |
parent | - Transfer maintainer to Phillip Neumann (diff) |
Add asterisk-stat 2.0.1, ASTERISK Call Detail Records Analizer.
PR: ports/113738
Submitted by: Fumihiko Kimura <jfkimura at yahoo.com>
Notes
Notes:
svn path=/head/; revision=196447
Diffstat (limited to 'www/asterisk-stat/files')
-rw-r--r-- | www/asterisk-stat/files/cdr_mysql.tbl | 24 | ||||
-rw-r--r-- | www/asterisk-stat/files/cdr_pgsql.tbl | 23 | ||||
-rw-r--r-- | www/asterisk-stat/files/mysql__patch-cdr.php | 11 | ||||
-rw-r--r-- | www/asterisk-stat/files/mysql__patch-defines.php | 27 | ||||
-rw-r--r-- | www/asterisk-stat/files/patch-export_pdf.php | 11 | ||||
-rw-r--r-- | www/asterisk-stat/files/pgsql__patch-cdr.php | 11 | ||||
-rw-r--r-- | www/asterisk-stat/files/pgsql__patch-defines.php | 23 | ||||
-rw-r--r-- | www/asterisk-stat/files/pkg-message.in | 5 |
8 files changed, 135 insertions, 0 deletions
diff --git a/www/asterisk-stat/files/cdr_mysql.tbl b/www/asterisk-stat/files/cdr_mysql.tbl new file mode 100644 index 000000000000..78a5f2021e54 --- /dev/null +++ b/www/asterisk-stat/files/cdr_mysql.tbl @@ -0,0 +1,24 @@ +USE asterisk; + +CREATE TABLE cdr ( + calldate datetime NOT NULL default '0000-00-00 00:00:00', + clid varchar(80) NOT NULL default '', + src varchar(80) NOT NULL default '', + dst varchar(80) NOT NULL default '', + dcontext varchar(80) NOT NULL default '', + channel varchar(80) NOT NULL default '', + dstchannel varchar(80) NOT NULL default '', + lastapp varchar(80) NOT NULL default '', + lastdata varchar(80) NOT NULL default '', + duration int(11) NOT NULL default '0', + billsec int(11) NOT NULL default '0', + disposition varchar(45) NOT NULL default '', + amaflags int(11) NOT NULL default '0', + accountcode varchar(20) NOT NULL default '', + uniqueid varchar(32) NOT NULL default '', + userfield varchar(255) NOT NULL default '' +); + +ALTER TABLE `cdr` ADD INDEX ( `calldate` ); +ALTER TABLE `cdr` ADD INDEX ( `dst` ); +ALTER TABLE `cdr` ADD INDEX ( `accountcode` ); diff --git a/www/asterisk-stat/files/cdr_pgsql.tbl b/www/asterisk-stat/files/cdr_pgsql.tbl new file mode 100644 index 000000000000..ff668d27e7eb --- /dev/null +++ b/www/asterisk-stat/files/cdr_pgsql.tbl @@ -0,0 +1,23 @@ + +CREATE TABLE cdr ( + calldate timestamp with time zone DEFAULT now() NOT NULL, + clid varchar(80) NOT NULL default '', + src varchar(80) NOT NULL default '', + dst varchar(80) NOT NULL default '', + dcontext varchar(80) NOT NULL default '', + channel varchar(80) NOT NULL default '', + dstchannel varchar(80) NOT NULL default '', + lastapp varchar(80) NOT NULL default '', + lastdata varchar(80) NOT NULL default '', + duration int(11) NOT NULL default '0', + billsec int(11) NOT NULL default '0', + disposition varchar(45) NOT NULL default '', + amaflags int(11) NOT NULL default '0', + accountcode varchar(20) NOT NULL default '', + uniqueid varchar(32) NOT NULL default '', + userfield varchar(255) NOT NULL default '' +); + +CREATE INDEX calldate_ind ON cdr USING btree (calldate); +CREATE INDEX dst_ind ON cdr USING btree (dst); +CREATE INDEX accountcode_ind ON cdr USING btree (accountcode); diff --git a/www/asterisk-stat/files/mysql__patch-cdr.php b/www/asterisk-stat/files/mysql__patch-cdr.php new file mode 100644 index 000000000000..339406825991 --- /dev/null +++ b/www/asterisk-stat/files/mysql__patch-cdr.php @@ -0,0 +1,11 @@ +--- cdr.php.orig Mon Mar 7 19:20:48 2005 ++++ cdr.php Thu Jul 20 23:47:46 2006 +@@ -36,7 +36,7 @@ + <head> + <title>Asterisk CDR</title> + <meta http-equiv="Content-Type" content="text/html"> +- <link rel="stylesheet" type="text/css" media="print" href="/css/print.css"> ++ <link rel="stylesheet" type="text/css" media="print" href="css/print.css"> + <SCRIPT LANGUAGE="JavaScript" SRC="./encrypt.js"></SCRIPT> + <style type="text/css" media="screen"> + @import url("css/layout.css"); diff --git a/www/asterisk-stat/files/mysql__patch-defines.php b/www/asterisk-stat/files/mysql__patch-defines.php new file mode 100644 index 000000000000..3a90bfc5be4e --- /dev/null +++ b/www/asterisk-stat/files/mysql__patch-defines.php @@ -0,0 +1,27 @@ +--- lib/defines.php.orig Tue Mar 8 04:07:23 2005 ++++ lib/defines.php Thu Jul 20 21:51:35 2006 +@@ -1,7 +1,7 @@ + <?php + + define ("WEBROOT", "http://domainname.com/asterisk-stat/"); +-define ("FSROOT", "/var/www/html/HTTP2/Asterisk/asterisk-stat-v2/"); ++define ("FSROOT", "/usr/local/www/asterisk-stat/"); + + + +@@ -9,11 +9,11 @@ + + + define ("HOST", "localhost"); +-define ("PORT", "5432"); +-define ("USER", "postgres"); ++define ("PORT", "3306"); ++define ("USER", "asterisk"); + define ("PASS", ""); +-define ("DBNAME", "cdrasterisk"); +-define ("DB_TYPE", "postgres"); // mysql or postgres ++define ("DBNAME", "asterisk"); ++define ("DB_TYPE", "mysql"); // mysql or postgres + + + define ("DB_TABLENAME", "cdr"); diff --git a/www/asterisk-stat/files/patch-export_pdf.php b/www/asterisk-stat/files/patch-export_pdf.php new file mode 100644 index 000000000000..b40656fedf02 --- /dev/null +++ b/www/asterisk-stat/files/patch-export_pdf.php @@ -0,0 +1,11 @@ +--- export_pdf.php.orig Thu Mar 3 00:11:32 2005 ++++ export_pdf.php Thu Jul 20 23:50:45 2006 +@@ -2,7 +2,7 @@ + include_once(dirname(__FILE__) . "/lib/defines.php"); + include_once(dirname(__FILE__) . "/lib/Class.Table.php"); + define(FPDF_FONTPATH,dirname(__FILE__).'/lib/font/'); +-include_once(dirname(__FILE__) . "/lib/fpdf.php'); ++include_once(dirname(__FILE__) . "/lib/fpdf.php"); + + session_start(); + diff --git a/www/asterisk-stat/files/pgsql__patch-cdr.php b/www/asterisk-stat/files/pgsql__patch-cdr.php new file mode 100644 index 000000000000..339406825991 --- /dev/null +++ b/www/asterisk-stat/files/pgsql__patch-cdr.php @@ -0,0 +1,11 @@ +--- cdr.php.orig Mon Mar 7 19:20:48 2005 ++++ cdr.php Thu Jul 20 23:47:46 2006 +@@ -36,7 +36,7 @@ + <head> + <title>Asterisk CDR</title> + <meta http-equiv="Content-Type" content="text/html"> +- <link rel="stylesheet" type="text/css" media="print" href="/css/print.css"> ++ <link rel="stylesheet" type="text/css" media="print" href="css/print.css"> + <SCRIPT LANGUAGE="JavaScript" SRC="./encrypt.js"></SCRIPT> + <style type="text/css" media="screen"> + @import url("css/layout.css"); diff --git a/www/asterisk-stat/files/pgsql__patch-defines.php b/www/asterisk-stat/files/pgsql__patch-defines.php new file mode 100644 index 000000000000..af94b2f5e686 --- /dev/null +++ b/www/asterisk-stat/files/pgsql__patch-defines.php @@ -0,0 +1,23 @@ +--- lib/defines.php.orig Tue Mar 8 04:07:23 2005 ++++ lib/defines.php Sat Jun 23 07:26:44 2007 +@@ -1,7 +1,7 @@ + <?php + + define ("WEBROOT", "http://domainname.com/asterisk-stat/"); +-define ("FSROOT", "/var/www/html/HTTP2/Asterisk/asterisk-stat-v2/"); ++define ("FSROOT", "/usr/local/www/asterisk-stat/"); + + + +@@ -10,9 +10,9 @@ + + define ("HOST", "localhost"); + define ("PORT", "5432"); +-define ("USER", "postgres"); ++define ("USER", "asterisk"); + define ("PASS", ""); +-define ("DBNAME", "cdrasterisk"); ++define ("DBNAME", "asterisk"); + define ("DB_TYPE", "postgres"); // mysql or postgres + + diff --git a/www/asterisk-stat/files/pkg-message.in b/www/asterisk-stat/files/pkg-message.in new file mode 100644 index 000000000000..761a90bcb51e --- /dev/null +++ b/www/asterisk-stat/files/pkg-message.in @@ -0,0 +1,5 @@ +===> asterisk-stat: + + **** NOTE **** + Before the first use of Asterisk-stat, copy defines.php-dist to defines.php + in %%ASTERISKDIR%% |