mirror of
https://dev.azure.com/globalhealthx/EMR/_git/helix-engage
synced 2026-04-11 18:28:15 +00:00
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:
@@ -124,7 +124,7 @@ export const ActiveCallCard = ({ lead, callerPhone }: ActiveCallCardProps) => {
|
||||
</div>
|
||||
<div className="mt-3 flex gap-2">
|
||||
<Button size="sm" color="primary-destructive" onClick={() => { hangup(); handleReset(); }}>
|
||||
Cancel
|
||||
End Call
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user