]> git.ipfire.org Git - ipfire.org.git/commitdiff
people: Don't show duplicate calls
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 15 Oct 2018 11:36:22 +0000 (12:36 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 15 Oct 2018 11:36:22 +0000 (12:36 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/backend/talk.py

index ab07b436f4b35ea70da403983c170e2463ab3b30..ed0b1210bd50e773a43d1cd1c8fdc9eb494495e6 100644 (file)
@@ -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: