ports/110575: [maintainer update] comms/atslog: PBX library fixes from source trunk

Alexander Logvinov ports at logvinov.com
Tue Mar 20 11:50:17 UTC 2007


>Number:         110575
>Category:       ports
>Synopsis:       [maintainer update] comms/atslog: PBX library fixes from source trunk
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Tue Mar 20 11:50:16 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Alexander Logvinov
>Release:        FreeBSD 6.2-RELEASE-p3 i386
>Organization:
>Environment:

>Description:

  PBX library fixes from source trunk
  Bump PORTREVISION
    
>How-To-Repeat:

>Fix:

Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/comms/atslog/Makefile,v
retrieving revision 1.9
diff -u -r1.9 Makefile
--- Makefile	6 Mar 2007 20:04:24 -0000	1.9
+++ Makefile	20 Mar 2007 11:31:50 -0000
@@ -7,6 +7,7 @@
 
 PORTNAME=	atslog
 PORTVERSION=	2.1.1
+PORTREVISION=	1
 CATEGORIES=	comms
 MASTER_SITES=	BERLIOS
 
@@ -108,7 +109,7 @@
 	${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)
Index: pkg-descr
===================================================================
RCS file: /home/pcvs/ports/comms/atslog/pkg-descr,v
retrieving revision 1.2
diff -u -r1.2 pkg-descr
--- pkg-descr	11 Jan 2007 16:33:29 -0000	1.2
+++ pkg-descr	20 Mar 2007 11:31:50 -0000
@@ -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/
Index: files/patch-bp-250.lib
===================================================================
RCS file: files/patch-bp-250.lib
diff -N files/patch-bp-250.lib
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-bp-250.lib	20 Mar 2007 11:31:50 -0000
@@ -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);
+ }
Index: files/patch-kx-td1232.lib
===================================================================
RCS file: files/patch-kx-td1232.lib
diff -N files/patch-kx-td1232.lib
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-kx-td1232.lib	20 Mar 2007 11:31:50 -0000
@@ -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;
Index: files/patch-ldk-300.lib
===================================================================
RCS file: files/patch-ldk-300.lib
diff -N files/patch-ldk-300.lib
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-ldk-300.lib	20 Mar 2007 11:31:50 -0000
@@ -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 at 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;
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list