[freeside-commits] freeside/bin cdr-opensips.import, 1.1.2.3, 1.1.2.4
Mark Wells
mark at wavetail.420.am
Tue Jan 25 00:32:50 PST 2011
Update of /home/cvs/cvsroot/freeside/bin
In directory wavetail.420.am:/tmp/cvs-serv32325
Modified Files:
Tag: FREESIDE_2_1_BRANCH
cdr-opensips.import
Log Message:
more cleanup, RT#10992
Index: cdr-opensips.import
===================================================================
RCS file: /home/cvs/cvsroot/freeside/bin/cdr-opensips.import,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -u -w -d -r1.1.2.3 -r1.1.2.4
--- cdr-opensips.import 25 Jan 2011 01:03:35 -0000 1.1.2.3
+++ cdr-opensips.import 25 Jan 2011 08:32:48 -0000 1.1.2.4
@@ -59,14 +59,12 @@
my $row;
while ( $row = $sth->fetchrow_hashref ) {
my ($callid) = $row->{'callid'} =~ /(.*)@/;
- my ($src) = $row->{'caller_id'} =~ /^sip(\d+)@/;
- my ($dst) = $row->{'callee_id'} =~ /^sip(\d+)@/;
+ my ($src) = $row->{'caller_id'} =~ /^sip:(\d+)@/;
+ my ($dst) = $row->{'callee_id'} =~ /^sip:(\d+)@/;
my $cdr = $cdrs{$callid};
if ( !$cdr ) {
$cdr = $cdrs{$callid} = FS::cdr->new ({
- src => $src,
- dst => $dst,
uniqueid => $callid,
cdrbatchnum => $cdrbatchnum,
});
@@ -74,6 +72,8 @@
my $date = str2time($row->{'time'});
if ( $row->{'method'} eq 'INVITE' ) {
$cdr->startdate($date);
+ $cdr->src($src);
+ $cdr->dst($dst);
}
elsif ( $row->{'method'} eq 'ACK' ) {
$cdr->answerdate($date);
More information about the freeside-commits
mailing list