mirror of
https://dev.azure.com/globalhealthx/EMR/_git/helix-engage
synced 2026-04-12 02:38:15 +00:00
fix: SIP disconnect on callState change + dispose sends agentId
- Fixed useEffect dependency bug: callState in deps caused cleanup (disconnectSip) to fire on every state transition, killing SIP mid-dial. Now uses useRef for callState in beforeunload handler with empty deps array — cleanup only fires on unmount. - sendBeacon auto-dispose now includes agentId from agent config - Disposition modal submit now includes agentId from agent config Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -90,9 +90,11 @@ export const ActiveCallCard = ({ lead, callerPhone, missedCallId, onCallComplete
|
||||
|
||||
// Submit disposition to sidecar
|
||||
if (callUcid) {
|
||||
const agentCfg = JSON.parse(localStorage.getItem('helix_agent_config') ?? '{}');
|
||||
const disposePayload = {
|
||||
ucid: callUcid,
|
||||
disposition,
|
||||
agentId: agentCfg.ozonetelAgentId,
|
||||
callerPhone,
|
||||
direction: callDirectionRef.current,
|
||||
durationSec: callDuration,
|
||||
|
||||
Reference in New Issue
Block a user