Step types
Every step shares three optional keys:
| Key | Meaning |
|---|---|
id | A label used in logs and in the editor. Defaults to the step type. |
type | play, dial, moh or hangup. Required. |
when | A time condition gating the step. |
play
Answers the call if it is not answered yet, then plays a WAV file to completion.
- id: greeting
type: play
file: ../../../sounds/welcome.wav
| Field | Required | Notes |
|---|---|---|
file | yes | Path to an 8 kHz mono 16-bit PCM WAV, relative to the tenant directory. |
Files are validated and cached in memory at startup, so a bad file fails fast instead of mid-call. See Audio files.
Playback always continues to the next step.
dial
Rings a destination and bridges the first leg that answers.
- id: follow-me
type: dial
timeout: 30s
moh: default
target:
kind: followme
stages:
- targets: ["101"]
timeout: 15s
- targets: ["100", "external:0612345678"]
timeout: 25s
| Field | Required | Default | Notes |
|---|---|---|---|
target | yes | — | What to ring. See the kinds below. |
timeout | no | 30s | How long to ring. For followme, the fallback for stages without their own. |
moh | no | ringback | Music-on-hold class the caller hears instead of ringback. |
If nobody answers, execution continues with the next step. If somebody answers, the legs are bridged and the plan ends there.
target.kind: endpoint
One extension of this tenant, or a tenant: reference.
target:
kind: endpoint
endpoint: "101"
Every device registered to that extension rings in parallel; first answer wins.
The value must be an account extension of the tenant, external:<number>,
or tenant:<name>/<extension> when
inter-tenant calling is enabled.
target.kind: ring_group
A named group defined in tenant.yaml.
target:
kind: ring_group
group: support
See Ring groups and follow-me.
target.kind: followme
Sequential stages; each stage rings all of its targets in parallel.
target:
kind: followme
stages:
- targets: ["101"]
timeout: 15s
- targets: ["100", "external:0612345678"]
timeout: 25s
At least one stage is required, and each stage needs at least one target. A
stage without a timeout falls back to the step's timeout, then to 30s.
target.kind: external
A number placed through the outbound routes.
target:
kind: external
number: "+31612345678"
Target references
Anywhere a list of targets is accepted — endpoint, ring group targets,
follow-me stage targets — these three forms are valid:
| Form | Meaning |
|---|---|
"101" | An account extension of this tenant. |
external:0612345678 | A number routed through the outbound routes. |
tenant:globex/900 | An extension of another tenant, if allowed. |
A reference that resolves to nothing at call time — an extension with no registered device, for instance — is skipped rather than failing the step. If every target in a stage resolves to nothing, that stage rings nobody and the next one starts.
moh
Plays a music-on-hold class in a loop until the caller hangs up.
- id: hold
type: moh
moh: jazz
| Field | Required | Default | Notes |
|---|---|---|---|
moh | no | default | Class name, resolved in the tenant then globally. |
Because it only returns when the call ends, moh is effectively a terminal
step; anything after it is unreachable.
hangup
Ends the call.
- id: done
type: hangup
No fields. Useful as an explicit final step so a plan does not simply run off the end, and as a conditional cut-off:
- id: block-weekends
type: hangup
when:
days: [sat, sun]
Music on hold classes
moh on a dial step and the moh step both take a class name:
moh:
default: ../sounds/moh/default.wav
classes:
jazz: ../sounds/moh/jazz.wav
moh:
classes:
jazz: ../../sounds/moh/acme-jazz.wav # overrides the global jazz
The class default resolves to the tenant's moh.default, then the global one.
Validation refuses a class no tenant and no global definition provides — and
refuses default when neither level defines it.