Call Flows

Visual IVR builder with drag-and-drop nodes for call routing

Call Flows are visual IVR (Interactive Voice Response) menus that you build with a drag-and-drop canvas. Each flow is a directed graph of nodes that process the call step by step -- greeting the caller, collecting input, routing to the right destination.

Node Types

NodeDescription
InboundEntry point -- extracts caller ID, time of day, and other context
AnnouncementPlay audio or TTS greeting to the caller
MenuCollect DTMF input and branch to different nodes
Ring GroupRing a group of extensions
QueuePlace caller in an ACD queue
VoicemailPlay greeting, record message, transcribe
TransferBlind or attended transfer to extension or external number
Time CheckBranch based on business hours or day of week
ConditionBranch based on caller data (number, region, etc.)
WebhookCall an external API and use the response for routing
AI AgentHand off to a conversational AI voice agent
Open/ClosedBranch based on business open/closed status
HangupEnd the call

Building Flows

The visual flow editor in the PBX Dashboard lets you drag nodes onto a canvas and connect them. Each node has a configuration panel for its specific settings.

You can also create and update flows via the API:

POST/v1/pbx/call-flows

Create a new call flow

Requires:pbx:call-flows:write
curl -X POST "https://api.do.dev/v1/pbx/call-flows" \
  -H "Authorization: Bearer do_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "After Hours",
    "nodes": [
      {
        "type": "time_check",
        "businessHours": { "start": "09:00", "end": "17:00", "days": [1,2,3,4,5] },
        "openPath": "greeting",
        "closedPath": "after_hours"
      },
      {
        "id": "greeting",
        "type": "announcement",
        "text": "Thank you for calling Acme Corp."
      },
      {
        "id": "after_hours",
        "type": "voicemail",
        "mailboxId": "vm_main",
        "greeting": "We are currently closed. Please leave a message."
      }
    ]
  }'

Validation

The flow editor validates your graph in real-time:

  • Dead-end detection -- nodes with no outgoing connections (except Hangup and Voicemail)
  • Loop detection -- circular paths that would trap a caller
  • Missing configuration -- nodes with required fields left empty
  • Unreachable nodes -- nodes not connected to the Inbound entry point

Assigning Flows to Numbers

Once created, assign a call flow to an inbound number:

curl -X PATCH "https://api.do.dev/v1/pbx/inbound-numbers/did_xyz789" \
  -H "Authorization: Bearer do_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "destinationType": "call_flow",
    "destinationId": "flow_abc123"
  }'

AI-Assisted Creation

In the dashboard, describe what you want in plain English and the AI assistant will generate a call flow graph:

"Create a menu that asks callers to press 1 for sales, 2 for support, or 3 for billing. After hours, go straight to voicemail."

The generated flow can be edited visually before saving.