#16811: Fix Telnyx inbound calls silently dropped — normalizeEvent missing direction/from/to
channel: voice-call
stale
size: S
trusted-contributor
Cluster:
Voice Call Enhancements and Fixes
Stumbled on this while looking at #16601. The Telnyx provider's `normalizeEvent` never passes `direction`, `from`, or `to` from the webhook payload into the normalized event. Without `direction: "inbound"`, `processEvent` can't tell it's an incoming call and just drops it.
Twilio already does this correctly (via `parseDirection`), so I followed the same pattern — added a static `parseDirection` helper that maps Telnyx's `incoming`/`outgoing` to the normalized `inbound`/`outbound` format, and put all three fields on `baseEvent` so every event type gets them.
Tests added for both inbound and outbound direction mapping through `parseWebhookEvent`.
Fixes #16601
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
Fixes a bug where Telnyx inbound calls were silently dropped because `normalizeEvent` never populated the `direction`, `from`, or `to` fields on the normalized event. Without `direction: "inbound"`, `processEvent` in `events.ts` couldn't identify the call as inbound and would skip creating a call record for it.
- Adds a `parseDirection` static method to `TelnyxProvider` that maps Telnyx's `"incoming"`/`"outgoing"` values to the normalized `"inbound"`/`"outbound"` format (mirrors the existing pattern in the Twilio and Plivo providers)
- Populates `direction`, `from`, and `to` on `baseEvent` so all Telnyx event types carry these fields
- Adds tests covering inbound direction, outbound direction, and missing direction scenarios
<h3>Confidence Score: 5/5</h3>
- This PR is safe to merge — it fixes a clear bug with a well-scoped, pattern-consistent change.
- The change is minimal and targeted: it adds three fields to the base event object and a pure static helper method. It follows the exact same pattern already established by the Twilio and Plivo providers. The fix is necessary — without it, inbound Telnyx calls are silently dropped because processEvent cannot identify them. Tests cover inbound, outbound, and missing direction cases. No security implications, no breaking changes.
- No files require special attention.
<sub>Last reviewed commit: 97e21d2</sub>
<!-- greptile_other_comments_section -->
<!-- /greptile_comment -->
Most Similar PRs
#14011: fix(voice-call): Telnyx inbound call support - missing direction/fr...
by mcwigglesmcgee · 2026-02-11
87.8%
#16617: fix(voice-call): preserve Telnyx inbound event direction metadata
by harshang03 · 2026-02-14
79.3%
#7652: fix(voice-call): fix Telnyx transcription (STT) not working
by tturnerdev · 2026-02-03
78.4%
#6128: Fail closed when Telnyx webhook public key is missing (voice-call p...
by yueyueL · 2026-02-01
71.3%
#8251: fix(voice-call): remove redundant transcript from extraSystemPrompt
by geodeterra · 2026-02-03
68.3%
#12325: fix: trim leading/trailing whitespace from outbound messages
by jordanstern · 2026-02-09
68.2%
#19567: Fix: tighten Slack multi-account event filtering via api_app_id
by TARS-Nolan · 2026-02-17
68.1%
#8297: fix(voice-call): prevent empty TwiML for non-in-progress outbound c...
by vishaltandale00 · 2026-02-03
68.0%
#22101: fix(slack): dedupe mentions by ts fallback for app_mention
by AIflow-Labs · 2026-02-20
68.0%
#6702: fix(voice-call): mark calls as ended when media stream disconnects
by johngnip · 2026-02-01
67.9%