fix: outbound call — End Call label, force active state after auto-answer

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-19 21:33:40 +05:30
parent 26b9d93f32
commit f454f2e682
2 changed files with 4 additions and 3 deletions

View File

@@ -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;
}