average-fireman-39457
12/04/2025, 3:38 PMTimeline:
14:53:22 - [JOB:AJ_FxE7xhip4M8t] entrypoint() called (first time)
14:54:12 - Warm transfer completed successfully
14:54:14 - Agent session closed via session.aclose()
14:55:22 - [JOB:AJ_FxE7xhip4M8t] entrypoint() called (second time) ← Same job ID!
Context:
• We're running a voice agent that handles inbound SIP calls
• After a successful warm transfer, we call await self.session.aclose() to close the agent session
• The room still has participants (original caller + transfer target) after the agent leaves
• About 1 minute later, our entrypoint function gets called again with the same job ID
• The second dispatch fails because it tries to get agent_id from participant metadata, but the participant is now the transfer target (who doesn't have agent metadata)
Questions:
1. Is it expected behavior for LiveKit to re-dispatch an agent to a room when the agent leaves but participants remain?
2. If so, does it reuse the same job.id or create a new one?
3. What's the recommended way to prevent re-dispatch after a warm transfer? Should we update room metadata, delete the room, or handle this differently?refined-appointment-81829
12/04/2025, 8:50 PMaverage-fireman-39457
12/04/2025, 10:15 PMrefined-appointment-81829
12/04/2025, 10:33 PMaverage-fireman-39457
12/04/2025, 11:50 PMrefined-appointment-81829
12/05/2025, 12:36 AM