Use the UnifiedBX CLI¶
UnifiedBX provides a command-line interface (fwconsole) for system maintenance, scripting, and recovery operations. Faster than clicking through the GUI for repetitive tasks; sometimes the only way to recover when the GUI is broken.
Common Commands¶
Reload / restart¶
# Apply Config equivalent (reload Asterisk + dialplan):
fwconsole reload
# Hard restart Asterisk (drops calls):
fwconsole restart
# Stop Asterisk:
fwconsole stop
# Start Asterisk:
fwconsole start
Module management¶
# List installed modules:
fwconsole ma list
# List available updates:
fwconsole ma listonline
# Update a module:
fwconsole ma upgrade core
fwconsole ma upgradeall
# Install a module:
fwconsole ma downloadinstall <modulename>
# Enable / disable:
fwconsole ma enable <modulename>
fwconsole ma disable <modulename>
# Uninstall:
fwconsole ma uninstall <modulename>
fwconsole ma remove <modulename>
User management (recovery)¶
# Add a GUI admin user (when locked out):
fwconsole userman addUser admin newPass123 admin@example.com
# Set permissions:
fwconsole userman setPermissions admin all
Backup / restore¶
# Run a configured backup template:
fwconsole backup --backup=<backup-id>
# Restore from a tarball:
fwconsole backup --restore=/tmp/backup.tar.gz
Firewall¶
# Trust an IP (whitelist for admin / SIP):
fwconsole firewall trust 203.0.113.45
# Untrust:
fwconsole firewall untrust 203.0.113.45
# Show firewall status:
fwconsole firewall status
Certificate management¶
# Update all Let's Encrypt certs:
fwconsole certificates --updateall
Asterisk CLI¶
For raw Asterisk operations (channels, registrations, dialplan):
# Interactive Asterisk console:
asterisk -rvvvv
# One-off command:
asterisk -rx "pjsip show endpoints"
asterisk -rx "core show channels"
asterisk -rx "queue show"
asterisk -rx "dialplan show 1001@from-internal"
HA management (if installed)¶
fwconsole ha status
fwconsole ha failover
Useful Recovery Commands¶
"I can't log into the GUI"¶
# Reset admin password:
fwconsole userman setPassword admin newpassword
# Or recreate admin entirely:
fwconsole userman addUser newadmin strongPass admin@example.com
fwconsole userman setPermissions newadmin all
"Apply Config is hung"¶
# Check what's stuck:
tail -f /var/log/asterisk/freepbx.log
# Force reload:
fwconsole reload --force
# If totally stuck, restart:
fwconsole restart
"Database corrupt / weird module errors"¶
# Repair MySQL tables:
fwconsole chown
mysqlcheck -u root --auto-repair --all-databases
# Clear FreePBX cache:
fwconsole cache clean
Verify¶
Most commands print status. For long-running ops (reload, restart), watch:
tail -f /var/log/asterisk/freepbx.log /var/log/asterisk/full
Common Issues¶
fwconsole: command not found. Not in PATH; use full path/usr/sbin/fwconsoleor/var/lib/asterisk/bin/fwconsole.- Permission errors. Run as root or with sudo.
reloadhangs. Almost always a config error in a custom file. Check logs.asterisk -rxreturns "Asterisk is not running." Service is down.fwconsole start.- CLI shows different state than GUI. Browser cache, OR you're hitting a different host (HA cluster). Confirm hostname.