Queues & Operators
Queues & Operators provide structured call distribution for teams that answer shared inbound calls. Callers wait in a queue while Callytics connects them to available operators based on the queue setup.
Operators log in from their softphone by entering a PIN — no admin UI interaction needed to change availability. The system tracks whether operators are available, busy, or offline so you can understand staffing in real time.
Queue live state is held entirely in Redis. PostgreSQL is never polled for queue state — only Redis keys determine who is available and whether a match can be made.
Operator softphone Caller softphone
│ │
│ dials queue_login flow │ dials inbound DID
▼ ▼
┌─────────────┐ ┌─────────────┐
│ queue_login │ │ queue │
│ node │ │ node │
└──────┬──────┘ └──────┬──────┘
│ DTMF PIN match │ polls Redis every 500ms
▼ │ queue:<id>:operators
┌─────────────────────┐ │
│ Redis │◄────────────────┘
│ operator:<id>:queue │
│ operator:<id>:chan │────────────────► bridge created
│ queue:<id>:operators│ mixing,dtmf_events
└─────────────────────┘Operator Login Flow
Operators are created in the Operators page. Each operator can have a linked SIP extension and a hashed PIN (operators.pin_hash). To log into a queue, the operator calls their softphone into a flow that contains a queue_login node.
Login sequence:
- Operator dials into a flow containing a
queue_loginnode - Stasis prompts for PIN via DTMF
- Stasis matches the entered digits against
operators.pin_hashin the database - On successful match, Stasis writes to Redis:
operator:<id>:queue= queue IDoperator:<id>:channel= ARI channel ID- Adds the operator's channel to the
queue:<id>:operatorsset
- The operator is now visible as available in the live dashboard
- To log out, the operator dials
#during the PIN prompt
Queue Matching Flow
When a caller hits a queue node in a flow:
- Stasis checks the
queue:<id>:operatorsset in Redis for available operator channels - If no operators are available, Stasis polls Redis every 500ms
- When an operator channel appears in the set, Stasis creates a
mixing,dtmf_eventsARI bridge between the caller channel and the operator channel - Both parties are connected — the bridge type
mixing,dtmf_eventsis required to prevent Asterisk from upgrading to a native RTP bridge, which would break audio through NAT after approximately 30 seconds - If the caller abandons or the timeout expires, the queue node follows the configured abandon or timeout edge
sequenceDiagram
participant Operator
participant Stasis
participant Redis
participant Caller
Operator->>Stasis: dials queue_login flow
Stasis->>Operator: prompt for PIN (DTMF)
Operator->>Stasis: enters PIN
Stasis->>Redis: write operator state + add to queue set
Caller->>Stasis: enters queue node
loop poll every 500ms
Stasis->>Redis: check queue:<id>:operators
Redis-->>Stasis: operator available
end
Stasis->>Stasis: create mixing,dtmf_events bridge
Stasis-->>Caller: connected to operator
Stasis-->>Operator: connected to callerCapabilities
- Queue-based inbound call distribution
- Operator PIN login from softphone keypresses
- Real-time operator status: available, busy, or offline
- Caller wait handling when no operator is free
- Abandoned-call routing
- Timeout routing
- Live dashboard visibility for queues and operators