Outbound external calls were missing from FreePBX call history

FixVOIPService
Name
lúc 17:14 27 tháng 8, 2026 UTC
Tác giả
Kamo
Cam kết
8b09ad1

On an outbound external call FreePBX rewrites the CDR `src` to the trunk's outbound caller ID — the org's own DID — so a call ext 8080 placed to 9493747110 is recorded as src=9492989960, dst=9493747110. Neither side is the extension, and getCallHistory matched rows on `src`/`dst` alone, so every outbound external call was dropped from the member's history: placed, answered, recorded and billed, and shown nowhere. What survived the filter were the Local-channel legs the connect contexts produce, whose `src` is empty — which is why the tab looked like it logged calls without a number. The placing extension survives on `cnum`, now added to the fetchAllCdrs selection set. `cnum` is empty on every inbound row and on those Local legs, so it establishes the originator without ever relabelling an inbound call as outbound. The channel name is deliberately not consulted: Local/8080@from-internal names 8080 on legs ringing it, not placed by it. Row mapping is extracted to FreePBXProvider.toCallLogEntry so it can be pinned by test. Every CDR in the test is a verbatim row from the live K1M1 instance, because the defect was an assumption about what FreePBX puts in those fields.

Mọi thay đổi

Như những gì anh thấy vận chuyển?

Mỗi một bản cập nhật này đều được tự động cập nhật trong không gian làm việc của bạn. Bắt đầu tự do và xem nó lớn lên tuần này qua tuần khác.

Bắt đầu tự do mãi mãiXem truy cập