diff --git a/app/calls_active/calls_active_inc.php b/app/calls_active/calls_active_inc.php
index 2c341145a4..0418c94a1f 100644
--- a/app/calls_active/calls_active_inc.php
+++ b/app/calls_active/calls_active_inc.php
@@ -93,7 +93,21 @@ else {
echo " ";
echo "";
- echo "".$text['title']."";
+ $rows = array();
+ foreach ($results["rows"] as &$row) {
+ //determine show all
+ if (!($show == 'all' && permission_exists('call_active_all'))) {
+ $foreign_call = true;
+ foreach ($row as $key => $value) {
+ if (substr_count($value, $_SESSION['domain_name']) > 0) { $foreign_call = false; }
+ }
+ if ($foreign_call) { continue; }
+ }
+ // append call
+ $rows[] = $row;
+ }
+
+ echo "".$text['title']." (" . count($rows) . ")"."";
echo "
\n";
echo $text['description']."\n";
echo "
\n";
@@ -123,15 +137,7 @@ else {
echo "