From: Michael Tremer Date: Mon, 15 Oct 2018 11:36:22 +0000 (+0100) Subject: people: Don't show duplicate calls X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ea13b8d7511b35bb4307ef3d296ca677f50804bc;p=ipfire.org.git people: Don't show duplicate calls Signed-off-by: Michael Tremer --- diff --git a/src/backend/talk.py b/src/backend/talk.py index ab07b436..ed0b1210 100644 --- a/src/backend/talk.py +++ b/src/backend/talk.py @@ -50,7 +50,8 @@ class Freeswitch(Object): def get_cdr_by_account(self, account, limit=None): res = self.db.query("SELECT * FROM cdr \ - WHERE caller_id_number = %s OR destination_number = %s \ + WHERE (caller_id_number = %s AND bleg_uuid IS NOT NULL) \ + OR (destination_number = %s AND bleg_uuid IS NULL) \ ORDER BY end_stamp DESC LIMIT %s", account.sip_id, account.sip_id, limit) for row in res: