voice-control
voice-control

Giveback Call

Hand a taken-over 1:1 call back to the agent. The mirror of /takeover.

Take Over was documented as one-way, but nothing about it is: the worker never left the room, it only went silent (_taken_over=True), and the agent_state disabled=false control event already flips it back and triggers session.generate_reply() — the group Bot toggle has used that path since 2026-08-05. What was missing for a 1:1 was the session-mode flip in the other direction, so the header could return to the agent layout and the operator's browser leg could come down.

Effects, in order:

  1. voice_sessions.metadata.mode flips back to 'agent'; given_back_at / given_back_by_user_id recorded. taken_over_at stays — it is audit, not state.
  2. runtime-hash agent_disabled=false, then the durable control event the worker XREADs: it clears _taken_over and speaks again.
  3. WS voice:call:mode_changed {mode:'agent'}. The frontend mounts RejoinUserCallOverlay only for mode==='user_call', so this alone takes the operator's microphone leg down; the tab keeps listening through a listen leg it opens itself. The publisher registry is left alone — with the mode back on 'agent' nothing re-claims.
post/api/voice/giveback/{call_id}

Request

  • Base URL: https://api.dialogbrain.com (the document declares no server; this is the origin it was published from)
  • URL: https://api.dialogbrain.com/api/voice/giveback/{call_id}
  • Auth: none declared

Path parameters

call_idstring required

Response

Successful Response

statusstring required
call_idstring required
modestring required

Changes

No recorded changes to this operation across all 5 revisions of this API.