Call Flow Studio
Features Demo Pricing Screenshots FAQ Docs
Install free →
Docs

Command-line reference

The cfs tool on the PBX · run with sudo

Documentation
  • Installing CFS
  • What it installs
  • Licensing & activation
  • Moving a license
  • Command-line (cfs)
  • Log files

Questions? support@callflowstudio.io

Install adds a small cfs command to the PBX (at /usr/sbin/cfs, alongside fwconsole and asterisk). Run it as root. Day to day, cfs upgrade is the one you’ll use; the rest are for rare situations.

cfs: command not found? The shortcut wasn’t created on your box. Run the same commands as sudo php /usr/local/lib/cfstudio/bin/cfs <command> instead. Everything below works identically. On an older install, run the installer again to get the cfs command.

cfs upgrade

Upgrades Call Flow Studio in place to the current release. It shows the current and latest version and asks before changing anything; your settings, views, and license are preserved. If you’re already up to date it does nothing. This is the normal way to stay current.

sudo cfs upgrade

It installs a release only after checking its signature, and never installs a version older than the one you have.

OptionWhat it does
--checkSays whether a newer release is available. Changes nothing.
--forceNo confirmation prompt, and reinstalls even when you’re already on the latest version.
--source <folder>For a PBX without internet access. Takes the release from a folder on the PBX. On a machine that has access, download https://callflowstudio.io/downloads/cfstudio-latest.json and the release file it names, copy both into one folder on the PBX, and give that folder’s full path. The signature is still checked.
ExitMeaning
0Upgraded, already up to date, or cancelled
1This install can’t check signatures. Reinstall with the installer.
2Bad arguments, or not run as root
3No release could be verified: it couldn’t be fetched, its signature didn’t check out, or it’s older than what’s installed
4The download didn’t match the signed release, or unpacking or the install step failed

cfs release-license

Only needed when you’re moving a paid license to different hardware. It frees this PBX’s license: it confirms with you, tells the licensing server to unbind this machine, clears the local key, and drops this box to viewer mode. Then activate the same code on the new PBX.

sudo cfs release-license

A trial has nothing to release; this is only for a paid license.

ExitMeaning
0Released successfully
1General error (e.g. network/server)
2Bad arguments
3No license file, or it’s unreadable
4This is a trial, nothing to release
5License is revoked
6You declined the confirmation

cfs export

Writes this PBX’s call routing to one JSON file: the call flow of every inbound number, and every IVR, queue, ring group, time condition and extension, including the ones nothing routes to. Use it to keep snapshots, compare them, or give your own scripts and tools an up-to-date picture of the PBX. Available on every license, including free. Works on the FreePBX family and on VitalPBX, where each tenant gets its own file (see below).

sudo cfs export --out /var/backups/pbx-routing.json

It only reads, so run it as often as suits you from your own cron. For example, every night at 2:15 (in root’s crontab, crontab -e):

15 2 * * * /usr/sbin/cfs export --out /var/backups/pbx-routing.json

That keeps one file, replaced on each run. To keep a history instead, put the date in the file name and remove old files yourself, for example after 30 days:

15 2 * * * /usr/sbin/cfs export --out /var/backups/pbx-routing-$(date +\%F).json
45 2 * * * find /var/backups -name 'pbx-routing-*.json' -mtime +30 -delete

In a crontab, % has to be written as \%: cron cuts the command off at a bare %, and the job fails.

An unchanged PBX gives an identical file apart from the time of the export and the registration snapshot, so two snapshots can be compared directly and only real changes show up. Settings a person changes, such as do not disturb, call forward, day/night mode and time condition overrides, are part of the routing, because they change where calls go. Whether each phone was registered when the export ran is recorded in its own section, extension_status.

The file explains its own format at the top (_spec), so a person or an AI assistant can read it without any other documentation. It contains no passwords or PINs. On a large PBX an export can take a minute or two.

On VitalPBX each tenant is its own routing plan, so each tenant is its own file. --out-dir writes one file per tenant, named after the tenant’s name in VitalPBX, and makes the folder if it isn’t there:

sudo cfs export --out-dir /var/backups/pbx-routing

That gives /var/backups/pbx-routing/acme.json for a tenant named acme, and so on. To export one tenant, name it with --tenant:

sudo cfs export --tenant acme --out /var/backups/acme.json

A VitalPBX with a single tenant works with --out alone. With more than one, the export asks for --out-dir or --tenant and lists the tenant names. For a nightly copy of every tenant, use --out-dir in place of --out in the cron line above. Tenants switched off in VitalPBX, and tenants beyond the ones your Call Flow Studio license covers, are not exported. Each tenant’s file uses VitalPBX’s own names for things and explains its format at the top in the same way.

OptionMeaning
--out FILEWrite FILE, replacing it in one step so a reader never sees half a file. Without it, the JSON goes to standard output.
--out-dir DIRVitalPBX: one file per tenant in DIR, each replaced in one step
--tenant NAMEVitalPBX: only this tenant, by its name in VitalPBX
--prettyIndented JSON
--verboseShow progress
ExitMeaning
0Written
1Error, nothing written
2Bad arguments, or a VitalPBX with more than one tenant and neither --out-dir nor --tenant
3Written, but some inbound routes could not be read (listed in routes_not_walked). That list also includes catch-all routes and a number’s extra caller ID routes; those alone still exit 0.

Reset the admin password

Locked out of the admin login? Reset it from the PBX shell:

sudo php /usr/local/lib/cfstudio/api/cfs-reset-password.php

The same command works on FreePBX and VitalPBX. If that file isn’t there, your install is older: run the installer again first.

With no arguments it lists the active admin accounts, so you can see the exact username on each one, then prompts you to pick an account and set a new password. That password must be changed again at next login.

If you already know the username or email address on the account, pass it directly. Add --random to have a temporary password generated instead of typing one:

sudo php /usr/local/lib/cfstudio/api/cfs-reset-password.php admin --random

cfs --help

Lists the available commands.

Call Flow Studio

A visual editor for Asterisk-based PBXes. Self-hosted. Free 30-day trial, then a free tier you keep for good, with an optional one-time license. Built by PBX admins for PBX admins.

Product
Features Screenshots Pricing Get Call Flow Studio
Resources
Documentation Installation guide FAQ Time Group Checker DPviz vs Call Flow Studio VitalPBX call flow visualizer
Contact
hello@callflowstudio.io support@callflowstudio.io PBX not on the list? Tell us
© 2026 Call Flow Studio
Privacy Terms Refunds
Call Flow Studio is an independent product, not affiliated with or endorsed by Sangoma, VitalPBX, ElevenLabs or OpenAI. FreePBX® and Asterisk® are registered trademarks of Sangoma; VitalPBX® is a registered trademark of VitalPBX. Other names belong to their owners and are used only to describe what Call Flow Studio works with.