Skip to main content

Step types

Every step shares three optional keys:

KeyMeaning
idA label used in logs and in the editor. Defaults to the step type.
typeplay, dial, moh or hangup. Required.
whenA 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
FieldRequiredNotes
fileyesPath 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
FieldRequiredDefaultNotes
targetyesWhat to ring. See the kinds below.
timeoutno30sHow long to ring. For followme, the fallback for stages without their own.
mohnoringbackMusic-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:

FormMeaning
"101"An account extension of this tenant.
external:0612345678A number routed through the outbound routes.
tenant:globex/900An 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
FieldRequiredDefaultNotes
mohnodefaultClass 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:

configs/lyno.yaml
moh:
default: ../sounds/moh/default.wav
classes:
jazz: ../sounds/moh/jazz.wav
configs/tenants/acme/tenant.yaml
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.