"fwconsole" is the Linux command that controls FreePBX 13+ from the Linux command prompt.  

To access the command prompt, log-in to the machine where you installed FreePBX/Asterisk using your "root" username and password.  You can do so by accessing the keyboard of the machine where you installed FreePBX, or remotely using an SSH client such as Putty.

Then type one of the following "fwconsole" commands below

All commands can be suffixed with --help to get more information

Command List

Command TitleCommandAlias(es)Description
Bulk ImportbulkimportbiThis command is used to import extensions and dids
Certificatescertificates
Certificate Management
Chownchown
Change ownership of files
ContextcontextcxShows the specified context from the dialplan
Doctrinedoctrine
Specific database documentation (for Development)
DebugdbugdebugStream log files for debugging
EPMepmendpointEndpoint Manager
External IPextipexternalipGet External IP
Firewallfirewall
Firewall functions
helphelp
Displays help for a command
listlist
Lists commands
Localizationlocalization
Localization Utilities
Databasemysql
Runs MySQL Client using freepbx credentials
Module AdministrationmoduleadminmaModule Administration
Notificationnotification
Manage notifications
Module System ManagermodulesystemmanagermsmView and change Update/Notification Manager Settings
Qxact Reportsqxact

ReloadreloadrReload Configs and Asterisk
Paging Propagingpro
Paging Pro Interface
Phone Apps

Debug Phone App Problems (For XML Style BLFs)
Process Managementpm2
Process Management
Settingsettingset
Sound Languagessound
Sound Languages Management
System AdminsysadminsaSystem Admin Functions
System Updatesystemupdatesysup,sys
Trunkstrunks
Enable and disable trunks from the command line
UnlockunlockunUnlock Session
User Manageruserman
User Manager
Utilitiesutil
Common Utilities
Validatevalidate
Validate the PBX against hacks
vqplusvqplus
VQPlus functions
zuluzulu
Zulu functions

Stop/Start/Restart

This is how FreePBX starts asterisk and any other processes it need.  You should always start and restart asterisk with the amportal command not the service asterisk or /etc/init.d/asterisk commands

fwconsole stop

fwconsole start

fwconsole restart

Chown

fwconsole chown - This will change ownership of all files and directories that FreePBX needs to be owned by the apache user.

Doctrine

This command is used to export out table information to be used in FreePBX table creation for module installations

Two formats are supported. XML and PHP.

The XML should be used in the module.xml file

[root@freepbxdev1 framework]# fwconsole doctrine meetme --format=xml
<database>
  <table name="meetme">
    <field name="exten" type="string" length="50"/>
    <field name="options" type="string" length="15" notnull="false"/>
    <field name="userpin" type="string" length="50" notnull="false"/>
    <field name="adminpin" type="string" length="50" notnull="false"/>
    <field name="description" type="string" length="50" notnull="false"/>
    <field name="joinmsg_id" type="integer" notnull="false"/>
    <field name="music" type="string" length="80" notnull="false"/>
    <field name="users" type="smallint" default="0" unsigned="true" notnull="false"/>
    <field name="language" type="string" length="10"/>
    <key name="PRIMARY" type="unique">
      <column name="exten"/>
    </key>
  </table>
</database>

The PHP code should be used inside install.php or the module's class.

[root@freepbxdev1 framework]# fwconsole doctrine meetme --format=php
$table = FreePBX::Database()->migrate("meetme");
$cols = array (
  'exten' =>
  array (
    'type' => 'string',
    'length' => '50',
  ),
  'options' =>
  array (
    'type' => 'string',
    'length' => '15',
    'notnull' => false,
  ),
  'userpin' =>
  array (
    'type' => 'string',
    'length' => '50',
    'notnull' => false,
  ),
  'adminpin' =>
  array (
    'type' => 'string',
    'length' => '50',
    'notnull' => false,
  ),
  'description' =>
  array (
    'type' => 'string',
    'length' => '50',
    'notnull' => false,
  ),
  'joinmsg_id' =>
  array (
    'type' => 'integer',
    'notnull' => false,
  ),
  'music' =>
  array (
    'type' => 'string',
    'length' => '80',
    'notnull' => false,
  ),
  'users' =>
  array (
    'type' => 'smallint',
    'notnull' => false,
    'unsigned' => true,
    'default' => '0',
  ),
  'language' =>
  array (
    'type' => 'string',
    'length' => '10',
  ),
);

$indexes = array (
  'PRIMARY' =>
  array (
    'type' => 'unique',
    'cols' =>
    array (
      0 => 'exten',
    ),
  ),
);
$table->modify($cols);
unset($table);


Reload

fwconsole reload - This will perform a reload of all the dialplan in Asterisk and all the modules in asterisk.  This is the same as pressing the "Apply Changes" button in the GUI of FreePBX


Unlock

fwconsole unlock xxxxxxxxxxxxxxxx- The fwconsole unlock command will unlock the GUI login of FreePBX to let you into the FreePBX GUI without the username and password.  This is handy if you lost or misplaced your FreePBX GUI username or password and need to get into the GUI to change or setup a new user.  You need to replace the xxxxxxx with your PHP session ID.  Follow the steps below.

Userman

This command provides information about User Manager

Util

General Utility functions for FreePBX

Database

fwconsole m This will connect you to the mysql database as the FreePBX user automatically based on the username and password for MySQL in /etc/freepbx.conf

[root@freepbxdev1 faxpro]# fwconsole m
Connecting to the Database...Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 123880
Server version: 5.1.73-log Source distribution
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>


Module Administration

Command line utility for controlling FreePBX Module installation.

[root@ldev2 ~]# fwconsole ma
Module Administration Help:
Usage: fwconsole moduleadmin [-f][-R reponame][-R reponame][action][arg1][arg2][arg...]
Flags:
-f - FORCE
-R - REPO, accepts reponame as a single argument
--edge - EDGE, forces download from the edge repository
--skipchown           Skip the chown operation
--nopromptdisabled    Don't ask to enable disabled modules
--format              Format can be: json, jsonpretty
--tag                 Download/Upgrade to a specific tag
Module Actions:
checkdepends : Checks dependencies for provided module[s], accepts argument module[s]
disable : Disables module[s] accepts argument module[s]
download : Download module[s], accepts argument module[s] or URLs
downloadinstall : Download and install module[s], accepts argument module[s] or URLs
delete : Deleted module[s], accepts argument module[s]
enable : Enable module[s], accepts argument module[s]
install : Installs module[s], accepts argument module[s]
installlocal : Install local module[s], accepts argument module[s]
uninstall : Uninstalls module[s], accepts argument module[s]
upgrade : Upgrade module[s], accepts argument module[s]
All inclusive Module Actions:
installall : Installs all modules, accepts no arguments
enableall : Trys to enable all modules, accepts no arguments
upgradeall : Upgrades all modules, accepts no arguments
Repository Actions:
disablerepo : Disables repo, accepts argument repo[s]
enablerepo : Enables repo, accepts argument repo[s]
list : List all local modules, accepts no arguments
listonline : List online modules, accepts no arguments
showupgrades : Shows a list of modules that may be updated, accepts no arguments
i18n : Shows translation information for supplied modules, accepts argument module[s]
refreshsignatures : ReDownloads all modules that have invalid signatures

Edge modules:

In Framework 13.0.69 we added the ability to install edge modules. To upgrade to a module in the edge track pass the --edge flag

fwconsole ma --edge upgrade foomodule

Bulk Import

[root@freepbx ~]# fwconsole bulkimport --help

Usage:
  bulkimport [options] [--] <filename>
  bi

Help:
  Import a file: fwconsole bulkimport --type=[extensions|dids] filename.csv --replace(Replace the existing values)

If the Bulk Handler module is installed, you can use the command line to import a csv file as follows:

fwconsole bulkimport -t|--type="..." filename

You must specify the import type and the file name to a valid csv file for import.

CLI Examples:

# fwconsole bi --type='dids' dids.csv
Importing bulk dids
# fwconsole bi --type='extensions' extensions.csv
Importing bulk extensions

EPM

 Usage: fwconsole endpoint action [arg arg...]
 addmapping : Add extension to extension mapping.
 Options:
        --brand     = Brand for extension ie: sangoma
        --mac       = MAC Address for extension.
        --template  = Template for extension.
        --model     = Model for extension.
        --account   = Account for extension.
        --accessory = Accessory setting for extension.
        --vpn       = VPN ID for extension.
 listextensions : List extension(s) by order. Argument 1: Extension or ALL, Argument 2: Column to order by. Option --detail = All mapping information.
 listtemplates : List all templates.
 reboot : Request phone to reboot.  SANGOMA PHONES ONLY
 rebuild : Rebuild the config files for an extension/template/all
 rebuildupdate : Rebuild the config files for an extension/template/all and tell phone(s) to check config.
 remove : Remove an extension. Specify extension.
 update : Send a notify to an extension/template/all to check its the config.  Will cause most phones to reboot.

Notification

[root@freepbxdev1 faxpro]# fwconsole notification --help
Options:
 --list                list notifications
 --delete              Delete notification
 --help (-h)           Display this help message
 --json                format list as json
Help:
 Notifications Help:
 Usage: fwconsole notification [--list] [--delete module id]

Module System Manager

[root@freepbxdev1 faxpro]# fwconsole notification --help
Options:
 --list                List Configs
 --help (-h)           Display this help message
Help:
 Notifications Help:
 Usage: fwconsole modulesystemmanager [--list]

List Settings

[root@Andrew14 framework]# fwconsole modulesystemmanager --list
+------------------------------+------------------------+
| Name                         | Value                  |
+------------------------------+------------------------+
| notification_emails          | admin@admin.com |
| system_ident                 | VoIP Server            |
| auto_system_updates          | disabled               |
| auto_module_updates          | enabled                |
| auto_module_security_updates | emailonly              |
| unsigned_module_emails       | disabled               |
| update_every                 | saturday               |
| update_period                | 4to8                   |
+------------------------------+------------------------+

Change a setting

[root@Andrew14 framework]# fwconsole modulesystemmanager system_ident "My New Server"
Changing "system_ident" from [VoIP Server] to [My New Server]

Qxact Reports

Feature added in 14+

Running fwconsole qxact will display help text:

# fwconsole qxact
Usage:
  qxactreports [options]

Arguments:
  command                    The command to execute

Options:
      --sync                 Syncronize
      --dryrun               Dont execute any SQL statements
      --forcetype=FORCETYPE  Force Type: database or file
      --import=IMPORT        Files to import separate by comma
      --reimport=REIMPORT    Files to reimport separate by comma
  -h, --help                 Display this help message
  -q, --quiet                Do not output any message
  -V, --version              Display this application version
      --ansi                 Force ANSI output
      --no-ansi              Disable ANSI output
  -n, --no-interaction       Do not ask any interactive question
  -v|vv|vvv, --verbose       Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Help:
  QXact Reports

To re-import all the existing rotated queue_log files run:

for i in $(ls -1tr /var/log/asterisk/queue_log*); do fwconsole qxact --reimport=$i --sync --verbose; done

Paging Pro

[root@freepbxdev1 restapps]# fwconsole pagingpro --help
Usage:
 pagingpro [-c|--clean] [-e|--execute="..."] [-l|--list[="..."]]
Options:
 --clean (-c)          Cleanup stale pages and add needed pages
 --execute (-e)        Execute a scheduled page now
 --list (-l)           List Scheduled Pages
 --help (-h)           Display this help message
 --quiet (-q)          Do not output any message
 --verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Phone Apps

[root@freepbxdev1 restapps]# fwconsole phoneapps --help
Arguments:
 blf                   Show BLF States: <ext> [<app>]
Options:
 --help (-h)           Display this help message
 --quiet (-q)          Do not output any message
 --verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

pm2

Used to manage background/long running processes

[root@freepbxdev1 ~]# fwconsole pm2 --help
 ______             _____  ______   __
|  ____|           |  __ \|  _ \ \ / /
| |__ _ __ ___  ___| |__) | |_) \ V /
|  __| '__/ _ \/ _ \  ___/|  _ < > <
| |  | | |  __/  __/ |    | |_) / . \
|_|  |_|  \___|\___|_|    |____/_/ \_\
Usage:
 pm2 [--list] [--stop="..."] [--restart="..."] [--delete="..."] [--update] [--reload-logs] [--log="..."] [--lines="..."]
Options:
 --list                List Process
 --stop                Stop Process
 --restart             Restart Process
 --delete              Delete Process
 --update              Save processes, kill PM2 and restore processes
 --reload-logs         Reload all log file pointers
 --log                 Stream Logs from Process
 --lines               How many lines to stream
 --help (-h)           Display this help message
 --quiet (-q)          Do not output any message
 --verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
 --version (-V)        Display this application version
 --ansi                Force ANSI output
 --no-ansi             Disable ANSI output
 --no-interaction (-n) Do not ask any interactive question

Setting

Used to alter Advanced Settings from the bash prompt:

[root@346 ~]# fwconsole setting --help
______                   ______ ______ __   __
|  ___|                  | ___ \| ___ \\ \ / /
| |_    _ __   ___   ___ | |_/ /| |_/ / \ V /
|  _|  | '__| / _ \ / _ \|  __/ | ___ \ /   \
| |    | |   |  __/|  __/| |    | |_/ // /^\ \
\_|    |_|    \___| \___|\_|    \____/ \/   \/

Usage:
  setting [options] [--] [<args>]...
  set

Arguments:
  args

Options:
  -d, --dump            Dump Configs
  -r, --reset           Reset to defailt
  -i, --import=IMPORT   Import settings from file
  -e, --export=EXPORT   Export settings to file
  -h, --help            Display this help message
  -q, --quiet           Do not output any message
  -V, --version         Display this application version
      --ansi            Force ANSI output
      --no-ansi         Disable ANSI output
  -n, --no-interaction  Do not ask any interactive question
  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Help:
  View and update settings


[root@346 ~]# fwconsole setting -d | grep EDGE
MODULEADMINEDGE=1
[root@346 ~]# fwconsole setting MODULEADMINEDGE 0
Changing "MODULEADMINEDGE" from [1] to [0]
[root@346 ~]# fwconsole setting -d | grep EDGE
MODULEADMINEDGE=0
[root@346 ~]# fwconsole setting MODULEADMINEDGE -r
Are you sure you want to set MODULEADMINEDGE to its default?y
Changing MODULEADMINEDGE to 0

Sound Languages

[root@Andrew14 soundlang]# fwconsole sound --help
Usage:
  sounds [options]

Options:
      --list                 List Process
      --listglobal           Delete Process
      --install=INSTALL      Stop Process
      --uninstall=UNINSTALL  Restart Process
      --global=GLOBAL        Save processes, kill PM2 and restore processes
  -h, --help                 Display this help message
  -q, --quiet                Do not output any message
  -V, --version              Display this application version
      --ansi                 Force ANSI output
      --no-ansi              Disable ANSI output
  -n, --no-interaction       Do not ask any interactive question
  -v|vv|vvv, --verbose       Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Help:
  Sound Language Prompts

System Admin

[root@freepbxdev1 faxpro]# fwconsole sysadmin --help
Help:
 Usage: fwconsole sysadmin action [arg arg...]
 info : Display Activation info
 activate : Activate system with provided Deployment ID
 update : Refresh Activation information

Trunks

Interactive toggle

[root@pbx ~]# fwconsole trunks 
Choose an ID to enable/disable
+----+-------+---------------------+----------+
| ID | TECH  | Channel ID          | Disabled |
+----+-------+---------------------+----------+
| 1  | pjsip | flowroute           | off      |
| 2  | sip   | fpbx-1-QWm3eNC4UIDn | on       |
| 3  | sip   | fpbx-2-QWm3eNC4UIDn | off      |
| 4  | pjsip | Telnyx              | off      |
+----+-------+---------------------+----------+
  [1] 1
  [2] 2
  [3] 3
  [4] 4
 >


List Trunks

[root@pbx ~]# fwconsole trunks --list
+----+-------+---------------------+----------+
| ID | TECH  | Channel ID          | Disabled |
+----+-------+---------------------+----------+
| 1  | pjsip | flowroute           | off      |
| 2  | sip   | fpbx-1-QWm3eNC4UIDn | on       |
| 3  | sip   | fpbx-2-QWm3eNC4UIDn | off      |
| 4  | pjsip | Telnyx              | off      |
+----+-------+---------------------+----------+


Specifying a trunk to enable or disable 

[root@pbx ~]# fwconsole trunks --enable 2
Enabling Trunk 2

[root@pbx ~]# fwconsole trunks --disable 2
Disabling Trunk 2


"fwconsole" is the Linux command that controls FreePBX 13+ from the Linux command prompt.  

To access the command prompt, log-in to the machine where you installed FreePBX/Asterisk using your "root" username and password.  You can do so by accessing the keyboard of the machine where you installed FreePBX, or remotely using an SSH client such as Putty.

Then type one of the following "fwconsole" commands below

All commands can be suffixed with --help to get more information

Command List

CommandShortDescription
bulkimportbiThis command is used to import extensions and dids
certificates
Certificate Management
chown
Change ownership of files
contextcxShows the specified context from the dialplan
doctrine
Specific database documentation (for Development)
debugdbugStream log files for debugging
epm
Endpoint Manager
externalipextipGet External IP
firewall
Firewall functions
help
Displays help for a command
list
Lists commands
mysqlmRuns MySQL Client using freepbx credentials
moduleadminmaModule Administration
notification
Manage notifications
reloadrReload Configs and Asterisk
restart
Start Asterisk and run other needed FreePBX commands
pagingpro
Paging Pro Interface
phoneapps
Debug Phone App Problems (For XML Style BLFs)
pm2
Process Management
settingset
sysadminsaSystem Admin Functions
trunks
Enable and disable trunks from the command line
unlockunUnlock Session
userman
User Manager
util
Common Utilities
vqplus
VQPlus functions

Stop/Start/Restart

This is how FreePBX starts asterisk and any other processes it need.  You should always start and restart asterisk with the amportal command not the service asterisk or /etc/init.d/asterisk commands

fwconsole stop

fwconsole start

fwconsole restart

Chown

fwconsole chown - This will change ownership of all files and directories that FreePBX needs to be owned by the apache user.

Doctrine

This command is used to export out table information to be used in FreePBX table creation for module installations

Two formats are supported. XML and PHP.

The XML should be used in the module.xml file

[root@freepbxdev1 framework]# fwconsole doctrine meetme --format=xml
<database>
  <table name="meetme">
    <field name="exten" type="string" length="50"/>
    <field name="options" type="string" length="15" notnull="false"/>
    <field name="userpin" type="string" length="50" notnull="false"/>
    <field name="adminpin" type="string" length="50" notnull="false"/>
    <field name="description" type="string" length="50" notnull="false"/>
    <field name="joinmsg_id" type="integer" notnull="false"/>
    <field name="music" type="string" length="80" notnull="false"/>
    <field name="users" type="smallint" default="0" unsigned="true" notnull="false"/>
    <field name="language" type="string" length="10"/>
    <key name="PRIMARY" type="unique">
      <column name="exten"/>
    </key>
  </table>
</database>

The PHP code should be used inside install.php or the module's class.

[root@freepbxdev1 framework]# fwconsole doctrine meetme --format=php
$table = FreePBX::Database()->migrate("meetme");
$cols = array (
  'exten' =>
  array (
    'type' => 'string',
    'length' => '50',
  ),
  'options' =>
  array (
    'type' => 'string',
    'length' => '15',
    'notnull' => false,
  ),
  'userpin' =>
  array (
    'type' => 'string',
    'length' => '50',
    'notnull' => false,
  ),
  'adminpin' =>
  array (
    'type' => 'string',
    'length' => '50',
    'notnull' => false,
  ),
  'description' =>
  array (
    'type' => 'string',
    'length' => '50',
    'notnull' => false,
  ),
  'joinmsg_id' =>
  array (
    'type' => 'integer',
    'notnull' => false,
  ),
  'music' =>
  array (
    'type' => 'string',
    'length' => '80',
    'notnull' => false,
  ),
  'users' =>
  array (
    'type' => 'smallint',
    'notnull' => false,
    'unsigned' => true,
    'default' => '0',
  ),
  'language' =>
  array (
    'type' => 'string',
    'length' => '10',
  ),
);

$indexes = array (
  'PRIMARY' =>
  array (
    'type' => 'unique',
    'cols' =>
    array (
      0 => 'exten',
    ),
  ),
);
$table->modify($cols);
unset($table);


Reload

fwconsole reload - This will perform a reload of all the dialplan in Asterisk and all the modules in asterisk.  This is the same as pressing the "Apply Changes" button in the GUI of FreePBX


Unlock

fwconsole unlock xxxxxxxxxxxxxxxx- The fwconsole unlock command will unlock the GUI login of FreePBX to let you into the FreePBX GUI without the username and password.  This is handy if you lost or misplaced your FreePBX GUI username or password and need to get into the GUI to change or setup a new user.  You need to replace the xxxxxxx with your PHP session ID.  Follow the steps below.

Userman

This command provides information about User Manager

Util

General Utility functions for FreePBX

Database

fwconsole m This will connect you to the mysql database as the FreePBX user automatically based on the username and password for MySQL in /etc/freepbx.conf

[root@freepbxdev1 faxpro]# fwconsole m
Connecting to the Database...Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 123880
Server version: 5.1.73-log Source distribution
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>


Module Administration

Command line utility for controlling FreePBX Module installation.

[root@ldev2 ~]# fwconsole ma
Module Administration Help:
Usage: fwconsole moduleadmin [-f][-R reponame][-R reponame][action][arg1][arg2][arg...]
Flags:
-f - FORCE
-R - REPO, accepts reponame as a single argument
--edge - EDGE, forces download from the edge repository
--skipchown           Skip the chown operation
--nopromptdisabled    Don't ask to enable disabled modules
--format              Format can be: json, jsonpretty
--tag                 Download/Upgrade to a specific tag
Module Actions:
checkdepends : Checks dependencies for provided module[s], accepts argument module[s]
disable : Disables module[s] accepts argument module[s]
download : Download module[s], accepts argument module[s] or URLs
downloadinstall : Download and install module[s], accepts argument module[s] or URLs
delete : Deleted module[s], accepts argument module[s]
enable : Enable module[s], accepts argument module[s]
install : Installs module[s], accepts argument module[s]
installlocal : Install local module[s], accepts argument module[s]
uninstall : Uninstalls module[s], accepts argument module[s]
upgrade : Upgrade module[s], accepts argument module[s]
All inclusive Module Actions:
installall : Installs all modules, accepts no arguments
enableall : Trys to enable all modules, accepts no arguments
upgradeall : Upgrades all modules, accepts no arguments
Repository Actions:
disablerepo : Disables repo, accepts argument repo[s]
enablerepo : Enables repo, accepts argument repo[s]
list : List all local modules, accepts no arguments
listonline : List online modules, accepts no arguments
showupgrades : Shows a list of modules that may be updated, accepts no arguments
i18n : Shows translation information for supplied modules, accepts argument module[s]
refreshsignatures : ReDownloads all modules that have invalid signatures

Edge modules:

In Framework 13.0.69 we added the ability to install edge modules. To upgrade to a module in the edge track pass the --edge flag

fwconsole ma --edge upgrade foomodule

Bulk Import

[root@freepbxdev1 faxpro]# fwconsole bulkimport --help
Options:
 --type (-t)           Type of file
Help:
 Import a file: fwconsole bulkimport --type=[extensions|dids|userman|contactmanager] filename.csv

If the Bulk Handler module is installed, you can use the command line to import a csv file as follows:

fwconsole bulkimport -t|--type="..." filename

You must specify the import type and the file name to a valid csv file for import.

CLI Examples:

# fwconsole bi --type='dids' dids.csv
Importing bulk dids
# fwconsole bi --type='extensions' extensions.csv
Importing bulk extensions

EPM

 Usage: fwconsole endpoint action [arg arg...]
 addmapping : Add extension to extension mapping.
 Options:
        --brand     = Brand for extension ie: sangoma
        --mac       = MAC Address for extension.
        --template  = Template for extension.
        --model     = Model for extension.
        --account   = Account for extension.
        --accessory = Accessory setting for extension.
        --vpn       = VPN ID for extension.
 listextensions : List extension(s) by order. Argument 1: Extension or ALL, Argument 2: Column to order by. Option --detail = All mapping information.
 listtemplates : List all templates.
 reboot : Request phone to reboot.  SANGOMA PHONES ONLY
 rebuild : Rebuild the config files for an extension/template/all
 rebuildupdate : Rebuild the config files for an extension/template/all and tell phone(s) to check config.
 remove : Remove an extension. Specify extension.
 update : Send a notify to an extension/template/all to check its the config.  Will cause most phones to reboot.

Notification

[root@freepbxdev1 faxpro]# fwconsole notification --help
Options:
 --list                list notifications
 --delete              Delete notification
 --help (-h)           Display this help message
 --json                format list as json
Help:
 Notifications Help:
 Usage: fwconsole notification [--list] [--delete module id]

Paging Pro

[root@freepbxdev1 restapps]# fwconsole pagingpro --help
Usage:
 pagingpro [-c|--clean] [-e|--execute="..."] [-l|--list[="..."]]
Options:
 --clean (-c)          Cleanup stale pages and add needed pages
 --execute (-e)        Execute a scheduled page now
 --list (-l)           List Scheduled Pages
 --help (-h)           Display this help message
 --quiet (-q)          Do not output any message
 --verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Phone Apps

[root@freepbxdev1 restapps]# fwconsole phoneapps --help
Arguments:
 blf                   Show BLF States: <ext> [<app>]
Options:
 --help (-h)           Display this help message
 --quiet (-q)          Do not output any message
 --verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

pm2

Used to manage background/long running processes

[root@freepbxdev1 ~]# fwconsole pm2 --help
 ______             _____  ______   __
|  ____|           |  __ \|  _ \ \ / /
| |__ _ __ ___  ___| |__) | |_) \ V /
|  __| '__/ _ \/ _ \  ___/|  _ < > <
| |  | | |  __/  __/ |    | |_) / . \
|_|  |_|  \___|\___|_|    |____/_/ \_\
Usage:
 pm2 [--list] [--stop="..."] [--restart="..."] [--delete="..."] [--update] [--reload-logs] [--log="..."] [--lines="..."]
Options:
 --list                List Process
 --stop                Stop Process
 --restart             Restart Process
 --delete              Delete Process
 --update              Save processes, kill PM2 and restore processes
 --reload-logs         Reload all log file pointers
 --log                 Stream Logs from Process
 --lines               How many lines to stream
 --help (-h)           Display this help message
 --quiet (-q)          Do not output any message
 --verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
 --version (-V)        Display this application version
 --ansi                Force ANSI output
 --no-ansi             Disable ANSI output
 --no-interaction (-n) Do not ask any interactive question

Setting

Used to alter Advanced Settings from the bash prompt:

[root@lgaetzdev2 ~]# fwconsole set --help
 ______             _____  ______   __
|  ____|           |  __ \|  _ \ \ / /
| |__ _ __ ___  ___| |__) | |_) \ V /
|  __| '__/ _ \/ _ \  ___/|  _ < > <
| |  | | |  __/  __/ |    | |_) / . \
|_|  |_|  \___|\___|_|    |____/_/ \_\
Usage:
 setting [-d|--dump] [-r|--reset] [-i|--import="..."] [-e|--export="..."] [args1] ... [argsN]
Aliases: set
Arguments:
 args
Options:
 --dump (-d)           Dump Configs
 --reset (-r)          Reset to defailt
 --import (-i)         Import settings from file
 --export (-e)         Export settings to file
 --help (-h)           Display this help message
 --quiet (-q)          Do not output any message
 --verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output,2 for more verbose output and 3 for debug
 --version (-V)        Display this application version
 --ansi                Force ANSI output
 --no-ansi             Disable ANSI output
 --no-interaction (-n) Do not ask any interactive question


System Admin

[root@freepbxdev1 faxpro]# fwconsole sysadmin --help
Help:
 Usage: fwconsole sysadmin action [arg arg...]
 info : Display Activation info
 activate : Activate system with provided Deployment ID
 update : Refresh Activation information

Trunks

Validate

This script will check your system to the best of it's ability
It should not be relied upon for complete validation
Every hack is different. This just tries to discover and clean them up as best as possible
Upgrade the Framework module to ensure you are always running the latest version.

Localization

This uses https://weblate.sangoma.com to download and apply localization updates for modules. Normally when modules are published they update from weblate automatically however if you go through weblate and make changes and want to see them in your system you will need to use this utility.

Requests to weblate are limited to 100/day, without setting --authroization. See https://weblate.sangoma.com/accounts/profile/#api for more information. You will need to login to https://weblate.sangoma.com/accounts/profile/#api to get this token


[root@freepbxdev1 faxpro]# fwconsole localization --help
Usage:
  localization [options]

Options:
      --authorization=AUTHORIZATION  Authorization Token. Requests are limited to 100/day, without setting this. See https://weblate.sangoma.com/accounts/profile/#api for more information
      --list                         List Modules with localizations
      --update                       Update localizations, optionally provide --module
      --module=MODULE                Module to work against, if not provided all modules are assumed
      --language=LANGUAGE            The language code to work against, if not provided all languages are assumed
      --ignorechange                 Ignore last change date, process regardless