The configuration editor
lyno -config configs/lyno.yaml -configure
opens a terminal editor for the entire configuration: tenants, accounts, extensions, dialplan steps, time conditions, ring groups, routes, trunks and system settings.
lyno config unsaved changes
Configuration › Tenants › Tenant acme › Extensions › Extension 200
╭──────────────────────────────────────────────────────────────────────────╮
│ Steps run top to bottom. A dial that nobody answers falls through. │
│ │
│ ▸ ‹ properties › Support follow-me │
│ 1. greeting (play) play ../../../sounds/welcome.wav │
│ 2. follow-me (dial) dial follow-me (2 stages) · 40s · moh default │
│ 3. nobody-home (play) play ../../../sounds/closed.wav │
│ 4. done (hangup) hang up │
╰──────────────────────────────────────────────────────────────────────────╯
↑↓ move · enter edit · a add · d delete · shift+↑↓ reorder · esc back
Structure
The top level splits into Tenants and Global.
| Under Tenants | Under Global |
|---|---|
| Properties: domains, DIDs, caller ID, timezone | Trunks |
| Accounts | Inbound overrides |
| Extensions and their steps | Fallback outbound routes and the default trunk |
| Ring groups | System settings: SIP, media, timezone, inter-tenant |
| Inbound and outbound routes | Music on hold |
| Music on hold |
Forms adapt to what you are editing: a dial step offers a target kind, timeout
and music-on-hold class, while a play step asks for a file.
Keys
| Key | Action |
|---|---|
↑ ↓ | Move |
enter | Open, edit a field, or toggle a checkbox |
← → | Change a choice (step type, transport, strategy) |
a | Add an entry |
d | Delete an entry |
shift+↑ shift+↓ | Reorder steps, stages and routes — order matters |
ctrl+s | In a form: apply. Elsewhere: validate and save |
esc | Back, discarding the current form |
ctrl+q | Quit, asking for confirmation if there are unsaved changes |
What it guarantees
Saving validates first. The editor cannot write a file the PBX would refuse to load. If validation fails, the errors are shown and nothing is written.
Deleting something still referenced is refused, with an explanation — an account a ring group still rings, a trunk a route still names, a ring group an inbound route still points at.
Files are written atomically, mode 0600, because they contain SIP
passwords.
What it costs
Files are regenerated from the parsed configuration. Any comment you wrote by hand is gone after a save. If you maintain the configuration in version control with comments, edit the YAML by hand and use the editor read-only, or accept that the editor owns the files.
The PBX reads configuration only at startup, so restart it after saving.
Bootstrapping a new system
Pointing -config at a path that does not exist is not an error: the editor
starts from defaults. That is the fastest way to create a first configuration
without writing YAML by hand.
lyno -config /etc/lyno/configs/lyno.yaml -configure
Add a tenant, give it a domain, add an account and an extension, save, and you have a working tree on disk.
When to prefer the files
The editor is good at exploration and at one-off changes on a machine you are already logged into. Hand-edited YAML is better when:
- the configuration lives in version control and you review changes as diffs;
- you keep explanatory comments;
- you generate tenants from another system;
- you want to copy a tenant directory between environments.
Both produce the same format, so the two can be mixed — as long as you accept losing comments on any file the editor saves.