Merge inbound denial recovery into voice retention

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
DottaandPaperclip committed 2026-10-25 05:40:50 -05:00
commit addbbfe35b
4 files changed
+73 -3

No files matched your search

@@ -249,9 +249,9 @@ export function voiceInboundService(db: Db, options: {
});
if (admission.state === "approved") return projection(admission);
if (!input.approve) {
// Bound calls have already been handed to live-session recovery. Unbound
// rejection uses the same durable claim as scheduled cleanup.
await cleanup.check(admission.id).catch(error => logger.warn({ err: error, callId: admission.id }, "Incoming call termination remains pending"));
// The committed admission signal owns cleanup. Return the saved denial
// without waiting for provider account verification or physical hangup.
// Bound calls have already been handed to live-session recovery.
return projection(admission);
}
const row = await endpoint(companyId, endpointId), credentials = await options.credentials(row, admission.credentialFingerprint);