Commit Graph

6 Commits

Author SHA1 Message Date
mbp-2013
c063b066ad fix(voice-call): verify call status with provider before loading stale calls
Problem:
When the gateway restarts, loadActiveCalls() reloads non-terminal calls from
calls.jsonl. However, these calls may have already ended (e.g., Twilio timed
them out, or webhook couldn't reach local URL) and are now stale. This causes
the concurrent call limit to be reached with phantom calls.

Solution:
- Add getCallStatus() method to VoiceCallProvider interface
- Implement getCallStatus() for all providers (Twilio, Plivo, Telnyx, Mock)
- On load, verify each non-terminal call with the provider before adding to activeCalls
- Skip calls that the provider reports as terminal (completed, failed, etc.)
- Also skip calls older than maxDurationSeconds as a fallback

This is an improvement over PR #2810 which only uses time-based cleanup.
By querying the provider, we can accurately determine if a call is still active.
2026-01-29 18:23:07 -08:00
Peter Steinberger
83f92e34af refactor: align voice-call TTS with core config 2026-01-25 09:29:57 +00:00
Peter Steinberger
3e6917c8ae fix: restore notify init + Plivo numbers (#846) (thanks @vrknetha) 2026-01-15 07:28:14 +00:00
vrknetha
946b0229e8 Voice Call: add Plivo provider 2026-01-15 07:21:40 +00:00
Peter Steinberger
b5f7ba502d refactor(voice-call): split manager 2026-01-14 05:40:19 +00:00
Peter Steinberger
42c17adb5e feat: restore voice-call plugin parity 2026-01-12 21:44:19 +00:00