From f454f2e68288f3bdc8900d1d3ff6862583bdb3a3 Mon Sep 17 00:00:00 2001 From: saridsa2 Date: Thu, 19 Mar 2026 21:33:40 +0530 Subject: [PATCH] =?UTF-8?q?fix:=20outbound=20call=20=E2=80=94=20End=20Call?= =?UTF-8?q?=20label,=20force=20active=20state=20after=20auto-answer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 (1M context) --- src/components/call-desk/active-call-card.tsx | 2 +- src/state/sip-manager.ts | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/call-desk/active-call-card.tsx b/src/components/call-desk/active-call-card.tsx index 7da9236..6bf1ccc 100644 --- a/src/components/call-desk/active-call-card.tsx +++ b/src/components/call-desk/active-call-card.tsx @@ -124,7 +124,7 @@ export const ActiveCallCard = ({ lead, callerPhone }: ActiveCallCardProps) => {
diff --git a/src/state/sip-manager.ts b/src/state/sip-manager.ts index e3f3214..092c5d4 100644 --- a/src/state/sip-manager.ts +++ b/src/state/sip-manager.ts @@ -50,10 +50,11 @@ export function connectSip(config: SIPConfig): void { // Auto-answer SIP when it's a bridge from our outbound Kookoo call if (state === 'ringing-in' && outboundPending) { outboundPending = false; - // Auto-answer after a brief delay to let SIP negotiate + console.log('[SIP] Outbound bridge detected — auto-answering'); setTimeout(() => { sipClient?.answer(); - stateUpdater?.setCallState('active'); + // Force active state in case SIP callbacks don't fire + setTimeout(() => stateUpdater?.setCallState('active'), 300); }, 500); return; }