TT#9829 calllist call direction out if intra

With this change, calls which have the same customer for source
and destination will be shown with direction "out" when only
filtered by customer.
This makes it easier to as postprocessing change the type to
"call" only when the direction is "in" (see ticket)

Change-Id: I2370bd2192c6cee6c01c89a8b78de5791cb72196
changes/03/11003/4
Gerhard Jungwirth 9 years ago
parent 9c91836078
commit 41fe4482e5

@ -23,6 +23,7 @@ use NGCP::Panel::Utils::Subscriber;
# * own_cli
# * start_time
# * status
# * rating_status
# * type
sub process_cdr_item {
my ($c, $item, $owner, $params) = @_;
@ -47,7 +48,7 @@ sub process_cdr_item {
if(defined $sub && $sub->uuid eq $item->destination_user_id) {
$resource->{direction} = "in";
} elsif (defined $cust && $item->destination_account_id == $cust->id
&& ( $item->source_account_id != $cust->id || $item->destination_user_id ) ) { # ???
&& ( $item->source_account_id != $cust->id ) ) {
$resource->{direction} = "in";
} else {
$resource->{direction} = "out";

Loading…
Cancel
Save