Commit Graph

24 Commits

Author SHA1 Message Date
Peter Steinberger ed614938d7 test(voice-call): accept oversize webhook socket resets 2026-03-23 06:37:57 +00:00
Peter Steinberger 651dc7450b
fix(voice-call): harden webhook pre-auth guards 2026-03-22 23:33:30 -07:00
Peter Steinberger 2a66eaf473 test: harden voice call regression assertions 2026-03-22 17:23:01 +00:00
Peter Steinberger 36c951769c test: harden voice call provider regressions 2026-03-22 17:07:20 +00:00
Josh Avant 3f7f2c8dc9
Voice Call: enforce spoken-output contract and fix stream TTS silence regression (#51500)
* voice-call: harden streaming startup and fallback behavior

* voice-call: suppress barge-in during intro

* voice-call: skip first-turn auto-response while greeting plays

* Voice-call: improve telephony audio fidelity and pacing

* voice-call: enforce spoken JSON and first-message barge skip

* voice-call: fix silent stream TTS regression

* voice-call: remove TTS timing diagnostics and document stream behavior

* voice-call: fail stream playback when stream sends are dropped

* voice-call: harden spoken contract and initial stream replay

* voice-call: suppress barge transcripts during initial greeting

* voice-call: harden stream fallback and media safety
2026-03-21 04:15:16 -05:00
Peter Steinberger a8508f2b31 test: share voice webhook reaper harness 2026-03-13 21:40:53 +00:00
Peter Steinberger 3087893ef9 refactor: normalize voice-call runtime defaults 2026-03-08 03:02:25 +00:00
Peter Steinberger 9f691099db fix(voice-call): harden webhook lifecycle cleanup and retries (#32395) (thanks @scoootscooob) 2026-03-03 02:39:50 +00:00
scoootscooob e707c97ca6 fix(voice-call): prevent EADDRINUSE by guarding webhook server lifecycle
Three issues caused the port to remain bound after partial failures:

1. VoiceCallWebhookServer.start() had no idempotency guard — calling it
   while the server was already listening would create a second server on
   the same port.

2. createVoiceCallRuntime() did not clean up the webhook server if a step
   after webhookServer.start() failed (e.g. manager.initialize). The
   server kept the port bound while the runtime promise rejected.

3. ensureRuntime() cached the rejected promise forever, so subsequent
   calls would re-throw the same error without ever retrying. Combined
   with (2), the port stayed orphaned until gateway restart.

Fixes #32387

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 02:39:50 +00:00
Peter Steinberger fe14be2352 Merge pull request #4325: fix(voice-call) verify stale calls with provider 2026-03-03 00:14:37 +00:00
Andrii Furmanets 662f389f45 Tests: isolate webhook path suite and reset cron auth state 2026-03-02 18:57:46 +00:00
Andrii Furmanets 3bd0505433 Voice Call: enforce exact webhook path match 2026-03-02 18:57:46 +00:00
Peter Steinberger ad8d766f65 refactor(extensions): dedupe channel config, onboarding, and monitors 2026-03-02 08:54:20 +00:00
garnetlyx ffa7c13c9b fix(voice-call): verify call status with provider before loading stale calls
On gateway restart, persisted non-terminal calls are now verified with
the provider (Twilio/Plivo/Telnyx) before being restored to memory.
This prevents phantom calls from blocking the concurrent call limit.

- Add getCallStatus() to VoiceCallProvider interface
- Implement for all providers with SSRF-guarded fetch
- Transient errors (5xx, network) keep the call with timer fallback
- 404/known-terminal statuses drop the call
- Restart max-duration timers for restored answered calls
- Skip calls older than maxDurationSeconds or without providerCallId
2026-03-01 22:13:24 -08:00
Peter Steinberger 192df12d60 test(voice-call): cover verification key and header helpers 2026-02-26 21:54:09 +01:00
Peter Steinberger 1aadf26f9a fix(voice-call): bind webhook dedupe to verified request identity 2026-02-26 21:43:51 +01:00
Peter Steinberger 1d28da55a5 fix(voice-call): block Twilio webhook replay and stale transitions 2026-02-24 02:37:24 +00:00
Peter Steinberger b8b43175c5 style: align formatting with oxfmt 0.33 2026-02-18 01:34:35 +00:00
Peter Steinberger 31f9be126c style: run oxfmt and fix gate failures 2026-02-18 01:29:02 +00:00
cpojer d0cb8c19b2
chore: wtf. 2026-02-17 13:36:48 +09:00
Sebastian ed11e93cf2 chore(format) 2026-02-16 23:20:16 -05:00
Sebastian df8f7ff1ab docs(voice-call): document stale call reaper config 2026-02-16 22:26:31 -05:00
cpojer cf6cdc74d0
chore: Fix types in tests 23/N. 2026-02-17 12:24:03 +09:00
Sebastian bfaa03981b test(voice-call): cover stream disconnect auto-end 2026-02-16 22:13:08 -05:00