Building a handover flow from Cognigy to a live agent. The bot handles the initial greeting, then drops the session to Studio for routing.
The issue is in the Transfer action. It’s throwing a 409 Conflict immediately after the bot says goodbye. The error payload is sparse:
{
"code": 409,
"message": "Resource conflict. Session is not in a valid state for transfer.",
"status": "Conflict"
}
I’ve checked the session state via the debug log. It shows status: "connected" right before the transfer block. I’m using the standard GetRESTProxy to call the internal transfer endpoint, but maybe I’m missing a state update step?
Here’s the snippet in the Studio script:
// Get current session
ASSIGN session = GetSessionInfo()
// Attempt transfer
ASSIGN result = Transfer(session.id, "AgentSkill", "priority:1")
IF result.code == 200
// Success path
ELSE
// Fails here
LogError("Transfer failed: " + result.message)
END IF
The Cognigy side is ending the session cleanly. Is there a specific API call I need to hit in Studio to mark the bot session as “completed” before the transfer? Or is this a timing issue with the websocket close event?
Also, I’m running this in the US/Central region. The API docs don’t mention a state lock for voice sessions.