TT#5811 MT#15667 MT#15793 api/callist "call_id" param

- including the desired sorting by call leg depth
- "... order by length(call_id) asc, start_time asc;"
  seems to cover the call flow sceanrios.

Change-Id: I294c27985627bea6a9acdaff8aeedc84e365c34e
changes/16/11416/4
Rene Krenn 9 years ago
parent 03380debd1
commit 0cd86ff68f

@ -205,6 +205,23 @@ sub query_params {
second => sub {},
},
},
{
param => 'call_id',
description => 'Filter for a particular call_id and sort by call leg depth.',
query => {
first => sub {
my $q = shift;
{
call_id => { like => $q.'%' },
};
},
second => sub {
{
order_by => \"length(call_id) ASC, start_time ASC",
};
},
},
},
];
}

@ -21,6 +21,7 @@ sub _item_rs {
my ($self, $c) = @_;
my $item_rs = $c->model('DB')->resultset('cdr');
if($c->user->roles eq "admin") {
} elsif($c->user->roles eq "reseller") {
$item_rs = $item_rs->search({

Loading…
Cancel
Save