-
Notifications
You must be signed in to change notification settings - Fork 0
Scenarios and Recipes
If you want importable workflows that build up to the canonical demo, start here instead of treating this page as a tutorial:
Answer a carrier call, play a prompt, collect DTMF, and route the caller.
-
SIP PBX Trigger->Trunk Event -
SIP PBX->Call->Answer -
SIP PBX->Media->Play Audio -
SIP PBX->Call->Wait For Event
Rules:
-
1->Sales -
2->Support -
0->Operator
Also consider:
- enable
DTMF Fallbackif you want a catch-all branch - set
Interdigit Timeoutexplicitly for multi-digit menus
- the trigger provides a stable
legId - playback can be blocking for deterministic IVR flow
- DTMF branches map directly to business paths
Dial one or more registered extensions without manually naming a specific extensions trigger ref.
- trunk or extension call arrives
-
SIP PBX->Dial->Make Call Mode = ExtensionExtensions = 100,101,102-
SIP PBX->Dial->Wait For Event -
SIP PBX->Call->Bridgeonce answered
- it searches all matching extensions refs within the current workflow
- it can fan out to multiple endpoints of the same extension number
- by default it ignores busy endpoints
Disable it only if you intentionally want to target busy registered endpoints as well.
Try extension 200 first, then 100, while exhausting all 200 endpoints before moving on.
Make Call:
Mode = ExtensionExtensions = 200,100Call Strategy = Sequential
Optional tuning:
Sequential Attempt Timeout (Seconds)Sequential Gap (Seconds)
The runtime preserves the extension number order you entered and exhausts all matching endpoints of one number before moving to the next.
Place a caller in queue, keep them there while waiting, and preserve queue position if they hang up and call back later.
Caller path:
- inbound trigger
Answer- optional announcement
Queue -> Put Leg In Queue-
Media -> Play AudioinBackgroundmode for hold music
Queue event path:
-
SIP PBX Trigger->Queue Event - branch on
Placed,Dispatch,Offline
Callback support:
Queue -> Set CallbackCallback Enabled = true
Important behavior:
- enabling callback does not remove the caller from the live queue immediately
- it only changes what queue does later if the caller hangs up before service
Put Leg In Queue:
Rejoin Existing = trueRetry AttemptsRetry Cooldown
Queue Event:
- operator extension numbers
- the daemon, not the workflow, owns operator redial and pacing
- a returning caller can rejoin the preserved queue entry instead of starting from scratch
Decide per call whether automatic call recording should start and where the file should go.
-
Trunk EventorExtension Event - enable
Global Call Recording - use the
Recordingtrigger branch - route through business logic
-
SIP PBX->Global recording->Respond to recording
- record only certain queues or callers
- split channels for later analysis
- wait for completion when downstream logic needs final size or duration
Use n8n to participate in extension auth decisions.
-
SIP PBX Trigger->Extension Event - set
Auth Mode = Digest FirstorRaw - on
Authbranch inspect:requestTypeauth.usernameauth.realmremoteIp
- respond with
Respond To Auth
-
Allowtrusted users immediately -
Verify Digest Passwordfrom a workflow-managed secret source -
ChallengeorDenybased on policy -
Not Applicablewhen this workflow is not the final decision-maker
Bridge a live caller to an AI voice agent running on a WebSocket leg.
- inbound caller arrives
-
SIP PBX->Dial->Make Call Mode = WebSocket- choose
OpenAI RealtimeorGemini Live - optionally set
WebSocket Start Mode = Deferred -
SIP PBX->AI->Attach Voice Agent -
SIP PBX->Call->Bridge
- connect an
ai_memoryinput - connect one or more
Invoke AI Toolnodes asai_toolinputs
It lets the workflow load memory and tool definitions before the provider session starts.
Let the model call workflow tools during a live voice interaction.
- create WebSocket AI leg
- attach voice agent with connected
ai_toolnodes - tool call lands on
AI Tool Call - inspect
flowParamsandtoolParams - run business logic
Respond To AI Tool
- CRM lookup
- order status
- appointment scheduling
- internal routing decisions
Start recording immediately but stop it later based on a different event.
Record Audio- set
Execution Mode = Background - save
mediaId - later:
-
Stop MediabymediaId - or
Wait Media
-
The workflow does not block while the daemon keeps the recording alive.