diff options
author | Ivan Kohler <ivan@freeside.biz> | 2012-09-29 15:43:47 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2012-09-29 15:43:47 -0700 |
commit | a655a75c52c62be3faef81a5cb74de6e52e1b3f6 (patch) | |
tree | abbcdf214b98a992042b908af7a91dbf2287b44f /FS/FS/detail_format/sum_duration_prefix.pm | |
parent | b752066a97429e6c93069754b79553548dccdba9 (diff) |
correct intrastate parsing, RT#18790
Diffstat (limited to 'FS/FS/detail_format/sum_duration_prefix.pm')
-rw-r--r-- | FS/FS/detail_format/sum_duration_prefix.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/FS/FS/detail_format/sum_duration_prefix.pm b/FS/FS/detail_format/sum_duration_prefix.pm index 04590415c..cd7bbe3cc 100644 --- a/FS/FS/detail_format/sum_duration_prefix.pm +++ b/FS/FS/detail_format/sum_duration_prefix.pm @@ -25,7 +25,10 @@ sub append { my $self = shift; my $prefixes = ($self->{prefixes} ||= {}); foreach my $cdr (@_) { - my $phonenum = $self->{inbound} ? $cdr->src : $cdr->dst; + my (undef, $phonenum) = $cdr->parse_number( + column => ( $self->{inbound} ? 'src' : 'dst' ), + ); + $phonenum =~ /^(\d{$prefix_length})/; my $prefix = $1 || 'other'; warn "$me appending ".$cdr->dst." to $prefix\n" if $DEBUG; |