Who called me back when I never called? Check the claim against your own call log

本文为原文前 6,000 字符的节选翻译,完整内容请查看原文。

“We’re returning your missed call.” If you never called, the claim is testable. Before you search who called me, your phone’s own call history can answer a narrower question: did this device dial that number recently? That check is small enough to script, and the tricky part is not the loop but normalising UK numbers so that two spellings of the same line compare equal.

“我们正在回拨您的未接来电。”如果您从未拨打过该电话,那么这一说法是可以验证的。在搜索“谁给我打了电话”之前,您手机的通话记录可以回答一个更具体的问题:该设备最近是否拨打过那个号码?这项检查编写脚本并不复杂,难点不在于循环,而在于对英国号码进行标准化处理,以便让同一线路的两种不同拼写方式能够匹配相等。

Affiliation and AI note: This post is promotional editorial from the website whocallme.co.uk and was drafted with AI assistance. The Python below is an illustrative sketch. It was run locally on a synthetic log to confirm it executes, and the output shown is from that run. All numbers in the examples come from Ofcom’s ranges reserved for drama and fiction.

隶属关系与人工智能说明:本文是来自网站 whocallme.co.uk 的推广性社论,由人工智能辅助起草。下方的 Python 代码仅为示意草图。它已在本地的合成日志上运行以确认其可执行,显示的输出结果即来自该次运行。示例中的所有号码均来自英国通信管理局(Ofcom)预留给影视剧创作的号码段。

The source note The number page for 07890 642441 lists a mobile, allocation hint EE Limited (Orange), numbering area Mobile. Range labels describe where a number block was allocated. They do not identify the person using it, and caller ID can be spoofed. At fetch time the page showed seven searches, one user report and a “first seen: 1 days ago” page label. That label is not the date of the note. The report is imported and its original publication date is unknown. The visitor chose the category Neutral. The visitor wrote that the caller said they “was calling back after I left a missed call”. The visitor replied that they hadn’t called. The caller suggested “maybe someone is using your number”. The visitor said they didn’t think so and hung up. That is the whole record. Nothing below assumes who was calling or why.

来源说明:07890 642441 的号码页面显示其为移动电话,分配提示为 EE Limited (Orange),编号区域为移动电话。号码段标签描述了号码块的分配位置,但它们无法识别具体的使用者,且来电显示是可以被伪造的。在抓取时,该页面显示了七次搜索、一份用户报告以及一个“首次出现:1天前”的页面标签。该标签并非记录的日期。该报告为导入内容,其原始发布日期未知。访问者选择了“中立”类别。访问者写道,来电者称他们“是在我留下未接来电后回拨的”。访问者回答说自己并未拨打过电话。来电者建议“可能有人在使用您的号码”。访问者表示不认为如此并挂断了电话。这就是全部记录。下文不对来电者身份或动机做任何假设。

Two claims, two different checks The exchange contains two separate assertions: “You called us.” A claim about your outbound history. Your device keeps a log of calls it placed, so this is checkable from your side. “Someone may be using your number.” A claim about spoofing. Calls placed elsewhere with your number shown as the caller ID would never appear in your log, so your device cannot confirm or rule this out. Keeping these apart matters. The first is answerable with local data. The second is a suggestion you cannot verify during the call, and it should not change what you share.

两个主张,两次不同的检查:此次交流包含两个独立的断言:“您给我们打了电话。”这是一个关于您呼出记录的主张。您的设备会保留拨出电话的日志,因此您可以从自己这一侧进行核实。“可能有人在使用您的号码。”这是一个关于号码伪造的主张。在其他地方拨打并显示为您号码的电话永远不会出现在您的日志中,因此您的设备无法确认或排除这种情况。将这两者区分开来很重要。前者可以通过本地数据回答,后者是一个您在通话期间无法验证的建议,且它不应改变您所分享的信息。

Normalising UK numbers A call log export, a contact card and a number read aloud rarely agree on format. The same mobile can appear as 07700 900123, +44 7700 900123, 0044 7700 900123 or the hybrid +44 (0)7700 900123. A naive digit strip turns the last one into 4407700900123, which matches nothing. A small normaliser to E.164 handles the common cases and refuses to guess on the rest:

标准化英国号码:通话记录导出文件、联系人名片和口述号码的格式很少一致。同一个手机号码可能显示为 07700 900123、+44 7700 900123、0044 7700 900123 或混合格式 +44 (0)7700 900123。简单的数字提取会将最后一个号码变成 4407700900123,这无法匹配任何内容。一个小型 E.164 标准化程序可以处理常见情况,并拒绝猜测其余部分:

import csv, io, re
from datetime import datetime, timedelta

def to_e164_uk(raw: str):
    """Normalise a UK-style number for comparison. Returns None if unsure."""
    s = raw.replace("(0)", "") # "+44 (0)7700 ..." trunk-prefix habit
    digits = re.sub(r"\D", "", s)
    if s.strip().startswith("+"): return "+" + digits
    if digits.startswith("00"): return "+" + digits[2:]
    if digits.startswith("0") and len(digits) in (10, 11): return "+44" + digits[1:]
    return None # don't guess

Returning None for 7700900123 (no trunk prefix, no country code) is deliberate. A false match is worse than an honest “can’t tell”.

对于 7700900123(无主干前缀,无国家代码)返回 None 是刻意为之的。错误的匹配比诚实的“无法判断”更糟糕。

Checking the claim against the log Assume a CSV export with a timestamp, a direction, a number and a duration. Many phones and carriers let you export something similar, though column names vary. The check looks for outgoing calls to the claimed number inside a lookback window, and separately notes inbound or missed calls from it:

根据日志核实主张:假设有一个包含时间戳、方向、号码和时长的 CSV 导出文件。许多手机和运营商都允许您导出类似内容,尽管列名各不相同。该检查会在回溯窗口内查找拨往所称号码的呼出电话,并单独记录来自该号码的呼入或未接来电:

def load_log(text: str):
    rows = []
    for r in csv.DictReader(io.StringIO(text)):
        rows.append({
            "at": datetime.fromisoformat(r["timestamp"]),
            "direction": r["direction"],
            "number": to_e164_uk(r["number"]),
            "seconds": int(r["duration_s"]),
        })
    return rows

def check_callback_claim(rows, claimed_number, claimed_at, lookback_days=7):
    target = to_e164_uk(claimed_number)
    if target is None: return {"verdict": "cannot normalise claimed number"}
    start = claimed_at - timedelta(days=lookback_days)
    window = [r for r in rows if start <= r["at"] <= claimed_at]
    out = [r for r in window if r["direction"] == "outgoing" and r["number"] == target]
    inc = [r for r in window if r["direction"] in ("incoming", "missed") and r["number"] == target]
    if out:
        verdict = "this device did dial the number in the window"
    else:
        verdict = "no outgoing call to this number from this device in the window"
    return {"target": target, "window_rows": len(window), "outgoing_matches": [r["at"].isoformat() for r in out], "earlier_inbound_from_it": [r["at"].isoformat() for r in inc], "verdict": verdict}

The synthetic log used for the run: timestamp,direction,number,duration_s 2026-11-03T18:42:00,outgoing,020 7946 0321,0 2026-11-05T09:10:00,incoming,+44 7700 900456,0 2026-11-07T12:00:00,outgoing,0113 496 0999,212 2026-11-08T20:15:00,missed,07700900123,0 2026-11-09T08:05:00,outgoing,+44 (0)20 7946 0321,48

运行所使用的合成日志: timestamp,direction,number,duration_s 2026-11-03T18:42:00,outgoing,020 7946 0321,0 2026-11-05T09:10:00,incoming,+44 7700 900456,0 2026-11-07T12:00:00,outgoing,0113 496 0999,212 2026-11-08T20:15:00,missed,07700900123,0 2026-11-09T08:05:00,outgoing,+44 (0)20 7946 0321,48

Output from the local run (normaliser cases first, then three claims): ‘07700 900123’ -> +447700900123 ‘+44 (0)7700 900123’ -> +447700900123 ‘0044 7700 900123’ -> +447700900123 ‘7700900123’ -> None 07700 900123 {‘target’: ‘+447700900123’, ‘window_rows’: 4, ‘outgoing_matches’: [], ‘earlier_inbound_from_it’: [‘2026-11-08T20:15:00’], ‘verdict’: ‘no outgoing call to this number from this device in the window’} 020 7946 0321 {‘target’: ‘+442079460321’, ‘window_rows’: 4, ‘outgoing_matches’: [‘2026-11-09T08:05:00’], ‘earlier_inbound_from_it’: [], ‘verdict’: ‘this device did dial the number in the window’} 0113 496 0999 {‘target’: ‘+441134960999’, ‘window_rows’: 0, ‘outgoing_matches’: [], ‘earlier_inbound_from_it’: [], ‘verdict’: ‘no outgoing call to this number from this device in the window’}

本地运行输出(先是标准化案例,然后是三个主张): ‘07700 900123’ -> +447700900123 ‘+44 (0)7700 900123’ -> +447700900123 ‘0044 7700 900123’ -> +447700900123 ‘7700900123’ -> None 07700 900123 {‘target’: ‘+447700900123’, ‘window_rows’: 4, ‘outgoing_matches’: [], ‘earlier_inbound_from_it’: [‘2026-11-08T20:15:00’], ‘verdict’: ‘no outgoing call to this number from this device in the window’} 020 7946 0321 {‘target’: ‘+442079460321’, ‘window_rows’: 4, ‘outgoing_matches’: [‘2026-11-09T08:05:00’], ‘earlier_inbound_from_it’: [], ‘verdict’: ‘this device did dial the number in the window’} 0113 496 0999 {‘target’: ‘+441134960999’, ‘window_rows’: 0, ‘outgoing_matches’: [], ‘earlier_inbound_from_it’: [], ‘verdict’: ‘no outgoing call to this number from this device in the window’}

Three things show up in that output: Claim one: no outgoing call, but a missed inbound call from the same number earlier. A “callback” story can grow from the caller’s own unanswered attempt. Claim two: a real outgoing call, written as +44 (0)20 … in the log and 020 … in the claim. Without normalisation, it would have been missed. Claim three: the window

输出结果显示了三件事:第一项主张:没有呼出电话,但之前有来自同一号码的未接来电。“回拨”的故事可能源于来电者自己未被接听的尝试。第二项主张:一通真实的呼出电话,在日志中写作 +44 (0)20 …,而在主张中写作 020 …。如果没有标准化,它就会被漏掉。第三项主张:窗口