Outbound external calls were missing from FreePBX call history

FixVOIPService
Порезанный
27 августа 2026 г. в 17:14 UTC
Автор
Kamo
Обещать
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.

Все изменения

Как вы видите судоходство?

Каждое из этих обновлений автоматически попадает в ваше рабочее пространство. Начните бесплатно и смотрите, как он растет неделю за неделей.

Начните бесплатно навсегдаПосмотреть цены