summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authormark <mark>2011-02-14 23:01:10 +0000
committermark <mark>2011-02-14 23:01:10 +0000
commit6d167446d719a361d84bf6be752ad24d718eaa35 (patch)
tree681ba28e2a5b161b77285ff9c4c8671cc606fee8 /bin
parent7d1cf3b75da3ba9aab3667cdc0125e25bbc76438 (diff)
VoipNow import adjustment, RT#11178
Diffstat (limited to 'bin')
-rwxr-xr-xbin/cdr-voipnow.import6
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/cdr-voipnow.import b/bin/cdr-voipnow.import
index eb36010af..c16b00d7c 100755
--- a/bin/cdr-voipnow.import
+++ b/bin/cdr-voipnow.import
@@ -45,7 +45,8 @@ print "Selecting CDRs from $start_id to ".($end_id || 'end')."...\n";
my $table = $opt{T} || 'call_history';
# spelled "disposion" in the table
my @cols = ( qw(
- id extension_number flow channel partyid start answer duration disposion) );
+ id extension_number flow channel partyid start answer duration disposion did
+ client_client_id ) );
my $sql = 'SELECT '.join(',', @cols). " FROM $table WHERE id >= $start_id";
$sql .= " AND id <= $end_id" if $end_id;
$sql .= " ORDER BY id";
@@ -80,6 +81,7 @@ while ( $row = $sth->fetchrow_hashref ) {
startdate => str2time($row->{start}),
answerdate => str2time($row->{answer}),
cdrbatchnum => $cdrbatchnum,
+ accountcode => $row->{client_client_id},
}
);
print $row->{id},"\n" if $opt{v};
@@ -88,7 +90,7 @@ while ( $row = $sth->fetchrow_hashref ) {
$cdr->dst($row->{'partyid'});
}
elsif ( $row->{flow} eq 'in' ) {
- $cdr->dst($row->{'extension_number'});
+ $cdr->dst($row->{'did'});
$cdr->src($row->{'partyid'});
}
else {