aboutsummaryrefslogtreecommitdiff
path: root/comms/atslog
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2007-03-21 12:32:48 +0000
committerMartin Wilke <miwi@FreeBSD.org>2007-03-21 12:32:48 +0000
commit0f865b7b6d5671d316c80872b6dc9dd567dbc3bd (patch)
treeb4e71234b8bd2753e06c4ef378a02f548dc1d5e0 /comms/atslog
parentd2f083e53039133b4c2f828525833d18d8e6d5e5 (diff)
downloadports-0f865b7b6d5671d316c80872b6dc9dd567dbc3bd.tar.gz
ports-0f865b7b6d5671d316c80872b6dc9dd567dbc3bd.zip
Notes
Diffstat (limited to 'comms/atslog')
-rw-r--r--comms/atslog/Makefile3
-rw-r--r--comms/atslog/files/patch-bp-250.lib16
-rw-r--r--comms/atslog/files/patch-kx-td1232.lib142
-rw-r--r--comms/atslog/files/patch-ldk-300.lib54
-rw-r--r--comms/atslog/pkg-descr2
5 files changed, 215 insertions, 2 deletions
diff --git a/comms/atslog/Makefile b/comms/atslog/Makefile
index 7ffe7215d9cc..bbacf721ff18 100644
--- a/comms/atslog/Makefile
+++ b/comms/atslog/Makefile
@@ -7,6 +7,7 @@
PORTNAME= atslog
PORTVERSION= 2.1.1
+PORTREVISION= 1
CATEGORIES= comms
MASTER_SITES= BERLIOS
@@ -108,7 +109,7 @@ do-install:
${INSTALL_SCRIPT} ${WRKSRC}/data/sql/install-sql.pl ${DATADIR}/sql
${MKDIR} ${PREFIX}/libexec/${PORTNAME}
cd ${WRKSRC}/libexec && \
- ${FIND} . -type f ! -iregex ".*\.sh" -exec \
+ ${FIND} -E . -type f ! -iregex ".*\.(sh|orig)" -exec \
${INSTALL_DATA} "{}" "${PREFIX}/libexec/${PORTNAME}/{}" \;
${INSTALL_SCRIPT} ${WRKSRC}/libexec/genindex.sh ${PREFIX}/libexec/${PORTNAME}/
.if !defined(WITHOUT_WWW)
diff --git a/comms/atslog/files/patch-bp-250.lib b/comms/atslog/files/patch-bp-250.lib
new file mode 100644
index 000000000000..bf5670efdff1
--- /dev/null
+++ b/comms/atslog/files/patch-bp-250.lib
@@ -0,0 +1,16 @@
+--- libexec/bp-250.lib.orig Sun Mar 4 17:48:54 2007
++++ libexec/bp-250.lib Tue Mar 20 19:55:47 2007
+@@ -97,7 +97,12 @@
+ $number=0;
+ }
+
+- $forwarded=0;
++ if ($transfer_conditio=~(/1[1234]/)) {
++ $forwarded=1;
++ }
++ else {
++ $forwarded=0;
++ }
+ # print("$timeofcall,$forwarded,$internally,$co,$way,$number,$duration\n");
+ WriteRecord($timeofcall, $forwarded, $internally, $co, $way, $number, $duration);
+ }
diff --git a/comms/atslog/files/patch-kx-td1232.lib b/comms/atslog/files/patch-kx-td1232.lib
new file mode 100644
index 000000000000..8388d6faf023
--- /dev/null
+++ b/comms/atslog/files/patch-kx-td1232.lib
@@ -0,0 +1,142 @@
+--- libexec/kx-td1232.lib.orig Sun Mar 4 17:48:54 2007
++++ libexec/kx-td1232.lib Tue Mar 20 20:08:42 2007
+@@ -10,70 +10,81 @@
+ # TESTLOG: Panasonic KX-TDA600.txt
+ #
+ sub parsecurcalls() {
+- while ($str=<PBX_DATA>)
+- {
+- $stringnumber++;
+- if ($str =~ /(\d{2})\/(\d{2})\/(\d{2}) (\d{2})\:(\d{2})(.{2}) (.{5}) (\d{2}) (.{25}).{5} (\d{2}):(\d{2})\'(\d{2}) (.{10}) (.{2})/){
+- unitecurcalls();
+- }else{
+- if ($vars{debug} =~ /yes/i){
+- if ($str !~ /^\s*$/){
+- print $str;
++ while ($str=<PBX_DATA>)
++ {
++ $stringnumber++;
++ if ($str =~ /(\d{2})\/(\d{2})\/(\d{2}) (\d{2})\:(\d{2})(.{2}) (.{5}) (\d{2}) (.{25}).{5} (\d{2}):(\d{2})\'(\d{2}) (.{10}) (.{2})/){
++ unitecurcalls();
++ }else{
++ if ($vars{debug} =~ /yes/i){
++ if ($str !~ /^\s*$/){
++ print $str;
++ };
++ };
+ };
+- };
+- };
+- };
++ };
+ };
+
+ sub unitecurcalls() {
+-
+- my $Month = $1;
+- my $Day=$2;
+- my $Year=$3+2000;
+- my $code=$13;
+-
+- my $CallHour=&AmPmTo24($4,$6);
+-
+- if($14 eq 'FW' or $14 eq 'TR'){
+- $forwarded =1;
+- }else{
+- $forwarded =0;
+- };
+-
+- $CallMinute=$5;
+-
+- $internally=$7;
+-
+- $co=$8;
+-
+- $duration = (($10*60*60)+($11*60)+$12);
+- $forIncoming=$9;
+-
+- $earlyIncoming=$10;
+-
+- $timeofcall = "$Year-$Month-$Day $CallHour\:$CallMinute\:00";
+-
+- if($forIncoming =~ /<I(NCOMING)?>\s*/i){
+- $way='1';
+- if ($forIncoming=~/(\d+)/)
+- {
+- $number=$1;
++ my $Day='';my $Month='';
++ # TDA600 has dd/mm/yy format
++ if($vars{model} eq 'KX-TDA600'){
++ $Day=$1;
++ $Month = $2;
+ }
+- else {
+- $number=0;
++ else { # 1232 has mm/dd/yy format
++ $Month = $1;
++ $Day=$2;
+ }
+- }else{
+- $way='2';
+- $number=$forIncoming;
+- $forIncoming =~ s/\D+//;
+- $number = substr($forIncoming,0,100);
+- };
+-
+- if ($timeofcall ne ""){
+- $callsCount++;
+- }
+- #print("$stringnumber $timeofcall $forwarded $internally $co $way $number $duration\n");
+- WriteRecord($timeofcall, $forwarded, $internally, $co, $way, $number, $duration);
++ my $Year=$3+2000;
++
++ my $code=$13;
++
++ my $CallHour=&AmPmTo24($4,$6);
++
++ if($14 eq 'FW' or $14 eq 'TR'){
++ $forwarded =1;
++ }else{
++ $forwarded =0;
++ };
++
++ $CallMinute=$5;
++
++ $internally=$7;
++
++ $co=$8;
++
++ $duration = (($10*60*60)+($11*60)+$12);
++ $forIncoming=$9;
++
++ $earlyIncoming=$10;
++
++ $timeofcall = "$Year-$Month-$Day $CallHour\:$CallMinute\:00";
++
++ if($forIncoming =~ /<I(NCOMING)?>\s*/i){
++ $way='1';
++ if ($forIncoming=~/(\d+)/)
++ {
++ $number=$1;
++ }
++ else {
++ $number=0;
++ }
++ }else{
++ $way='2';
++ $number=$forIncoming;
++ if ($forIncoming=~/([\d*#P]+)/)
++ {
++ $number=$1;
++ }
++
++ };
++
++ if ($timeofcall ne ""){
++ $callsCount++;
++ }
++ #print("$stringnumber $timeofcall $forwarded $internally $co $way $number $duration\n");
++ WriteRecord($timeofcall, $forwarded, $internally, $co, $way, $number, $duration);
+ }
+
+ 1;
diff --git a/comms/atslog/files/patch-ldk-300.lib b/comms/atslog/files/patch-ldk-300.lib
new file mode 100644
index 000000000000..4bc0f972e6ab
--- /dev/null
+++ b/comms/atslog/files/patch-ldk-300.lib
@@ -0,0 +1,54 @@
+--- libexec/ldk-300.lib.orig Sun Mar 4 17:48:54 2007
++++ libexec/ldk-300.lib Tue Mar 20 19:59:52 2007
+@@ -1,7 +1,7 @@
+ # ATSlog version 2.1.1 build 664 www.atslog.com
+ #
+ # VENDOR: LG
+-# MODELS: LDK-100,LDK-300
++# MODELS: LDK-100,LDK-300,ARIASOHO
+ # AUTHOR: Alex Samorukov samm@os2.kiev.ua
+ #
+ # TESTLOG: LG LDK-300.txt
+@@ -42,7 +42,7 @@
+
+
+ $co=int($co);
+- $forwarded=0; # please, FIXME
++ $forwarded=0;
+
+ if ($dialed_number=~/(\d+)/)
+ {
+@@ -52,19 +52,22 @@
+ $number=0;
+ }
+
+- if($dialed_number =~ /I/){
++ if($dialed_number =~ /^[IG]/){
+ $way='1';
+- # detection of the CID line
+- if($dialed_number =~ /^I(\d+)/)
+- {
+- $nubmer=$1;
+- }
+- else {
+- $number=0;
+- }
+- }else{
++ $forwarded=0;
++ }
++ elsif($dialed_number =~ /^O/){
++ $way='2';
++ $forwarded=0;
++ }
++ elsif($dialed_number =~ /^T/){
+ $way='2';
+- };
++ $forwarded=1;
++ }
++ elsif($dialed_number =~ /^t/){
++ $way='1';
++ $forwarded=1;
++ }
+
+ if ($date=~(/(\d{2})\/(\d{2})\/(\d{2})/)) {
+ $Month=$2;
diff --git a/comms/atslog/pkg-descr b/comms/atslog/pkg-descr
index 3aec0630e1bb..d47ca4824e2a 100644
--- a/comms/atslog/pkg-descr
+++ b/comms/atslog/pkg-descr
@@ -1,6 +1,6 @@
The ATSlog software provides a handy Web-oriented interface for collecting,
viewing and analyzing calls for various types of PBX (Private Branch eXchange)
models. At present, the program operates successfully with Panasonic, Samsung,
-Hybrex, Siemens, LG, and Alcatel PBX models.
+Hybrex, Siemens, LG, Ericsson, NEC and Alcatel PBX models.
WWW: http://www.atslog.com/en/about/