From 8f061a0154f506df7a6d2f5010fe464950bc334a Mon Sep 17 00:00:00 2001 From: Andreas Granig Date: Mon, 18 May 2015 12:49:29 +0200 Subject: [PATCH] MT#10537 API: fix calllist dir for srv calls Also properly filter VSC calls, somehow dropped during last change Change-Id: I9773a8bea2efb53f88aa59a9741b0cd5c5090b61 --- lib/NGCP/Panel/Role/API/CallLists.pm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/NGCP/Panel/Role/API/CallLists.pm b/lib/NGCP/Panel/Role/API/CallLists.pm index d094a7f3fe..7e6f4fd462 100644 --- a/lib/NGCP/Panel/Role/API/CallLists.pm +++ b/lib/NGCP/Panel/Role/API/CallLists.pm @@ -46,6 +46,11 @@ sub item_rs { join => ['source_subscriber', 'destination_subscriber'], }); } + $item_rs = $item_rs->search({ + -not => [ + { 'destination_domain_in' => 'vsc.local' }, + ], + }); return $item_rs; } @@ -173,18 +178,21 @@ sub resource_from_item { $resource->{other_cli} = "voicemail"; $other_normalize = 0; $other_skip_domain = 1; + $resource->{direction} = "out"; # rewrite cf to conference to "conference" } elsif($item->destination_user_in =~ /^conf=/ && $item->destination_domain_in eq "conference.local") { $resource->{other_cli} = "conference"; $other_normalize = 0; $other_skip_domain = 1; + $resource->{direction} = "out"; # rewrite cf to auto-attendant to "auto-attendant" } elsif($item->destination_user_in =~ /^auto-attendant$/ && $item->destination_domain_in eq "app.local") { $resource->{other_cli} = "auto-attendant"; $other_normalize = 0; $other_skip_domain = 1; + $resource->{direction} = "out"; # for intra pbx in calls, use extension as other cli } elsif($intra && $src_sub && $src_sub->pbx_extension) { $resource->{other_cli} = $src_sub->pbx_extension;