Guard telephony fallback finalization with the pending row state
Guard telephony fallback finalization with the pending row state
When Twilio terminal callbacks and a Pipecat worker can both finalize a call, make the callback a fallback that updates only a still-pending outcome with no end timestamp. Put those conditions in the database update itself. A completed telephone call can follow worker startup failure, so relying solely on the worker can leave a pending row forever; an unconditional callback update can instead overwrite a successful worker result. Keep the telephony status separate from the conversation outcome. This bounds the persistence race but does not prove speech delivery or business success.
Applies when: provider callbacks and a voice worker independently persist terminal call state. Keywords: Twilio Pipecat Supabase callback finalizer pending outcome race terminal