-
Notifications
You must be signed in to change notification settings - Fork 0
Demo Part 1 Step 2 Trunk to Queue With AI Offline
Andrey Egorov edited this page May 18, 2026
·
2 revisions
Import: part-1-step-2-trunk-to-queue-with-ai-offline.json
Keep the same basic queue behavior, but replace the plain offline branch with an AI fallback:
- no representatives online
- create a WebSocket AI leg
- bridge the caller to that AI leg
- let the WebSocket leg start immediately without a separate attachment stage
| Reused node | Change | Why |
|---|---|---|
offline_is_live |
now routes into dial_ai instead of ending at a plain announcement |
the offline branch now becomes a live AI handoff |
dial_ai |
WebSocket Start Mode = Immediate |
this step has no attached voice agent yet, so the AI session must start on its own |
dial_ai |
uses shortened OpenAI instructions | the AI leg should not mention tools that do not exist yet |
play_offline |
becomes a background, voice-interruptible handoff prompt | it explains the AI fallback while the session is already taking over |
- the queue side stays on the same basic structure as step 1. That keeps the new concept isolated to offline AI handoff.
-
offline_is_livestill checks that a live caller leg exists before the workflow moves into the AI branch. -
dial_aiusesImmediatebecause there is noAttach voice agentnode yet. The transport has to start by itself. -
dial_aigoes directly tobridge_ai, so the caller is connected to the AI leg without an extra orchestration layer. -
play_offlineremains in the flow as a background prompt. It explains the fallback, but because it is background media it does not block the AI conversation from starting.
- Import and activate the workflow.
- Ensure no queue representatives are online.
- Place a caller into the queue.
- Let the queue reach the
Offlinebranch.
| Stage | Result |
|---|---|
| offline branch |
dial_ai creates the WebSocket leg |
| handoff | caller is bridged to the AI leg through bridge_ai
|
| prompt |
play_offline plays as a handoff announcement while AI is already active |
Part 1 now forms one complete line:
- basic queue
- then the same queue with AI replacing the offline dead-end