Skip to navigation

escalate

View as MarkdownOpen in Claude

End a chat leg and wait for capture_leg to confirm its record. The browser calls POST /escalate and waits on it before dialing, so the voice leg that follows is guaranteed to find the text leg already recorded. The handle is verified with the gateway’s read_handle().

Parameters

handle
strRequired

The chat handle the browser holds.

Returns

bool — True when the handle was valid and the capture attempt has finished, False for an invalid or expired handle. True doesn’t confirm a record was written: if capture_leg is unset, times out after capture_timeout, or raises, the failure is logged and this still returns True.

Example

if not await handoff.escalate(handle):
return {"error": "not found"}, 404
return {"ok": True}

See HandoffRouter for the route this backs.