sub get_abandonned($) { my $dnis = shift; my $total = 0; for my $key(keys %all_calls) { next if ($key =~ /duplicate/); if($all_calls{$key}->[DNIS] eq $dnis && $all_calls{$key}->[SPEECH] == 0 && $all_calls{$key}->[TRANSFER] eq "hungup") { my $time_length = &get_call_length($all_calls{$key}->[TIME]); if($time_length <= -29) { $total++; } } } return $total; }