“Fwconsole commands支持FreePBX-13 以上版本”的版本间的差异
(创建页面,内容为“'''fwconsole commands (13+)''' "fwconsole" is the Linux command that controls FreePBX 13+ from the Linux command prompt. To access the command prompt, log-i...”) |
(没有差异)
|
2015年11月3日 (二) 10:43的版本
fwconsole commands (13+)
"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:
- [ Command List]
- [ Stop/Start]
- [ Chown]
- [ Reload]
- [ Unlock]
- [ Database]
Command List
- chown Change ownership of files
- context Shows the specified context from the dialplan
- cx Shows the specified context from the dialplan
- dbug Stream files for debugging
- extip Get External IP
- help Displays help for a command
- list Lists commands
- m Run a mysql Query:
- ma Module Administration
- motd Prints MOTD
- mysql Run a mysql Query:
- r Reload Configs
- reload Reload Configs
- restart Start Asterisk and run other needed FreePBX commands
- session Manage Session
- set View and update settings
- setting View and update settings
- start Start Asterisk and run other needed FreePBX commands
- stop Stop Asterisk and run other needed FreePBX commands
- trunks Enable and disable trunks from the command line
- unlock Unlock Session
Stop/Start
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
Chown
''''fwconsole chown - This will change ownership of all files and directories that FreePBX needs to be owned by the apache user.
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 u xxxxxxxxxxxxxxxx- The fwconsole u 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.
- Bring up the main login page to FreePBX in your browser. Such as http://192.168.0.2/admin
- Do a "ctrl a" to highlight the whole page and look to the left center of the screen for some text. This is your unique php session ID. Copy this into your clipboard.
- Go into the linux CLI and type the following command replacing the session ID below with your own.
- [root@localhost ~]# fwconsole u ppnr8l1vle32s3q8b79s4n1sp7
- Please wait...
- session unlocked!
[root@localhost ~]#
- Go refresh your browser page and it will log you in this one time automatically for you based on that php session ID. Now you can go add or change the FreePBX admin users.
Database
fwconsole m This will log you to pass queries into the mysql database as the FreePBX user automatically for you based on the username and password for MySQL in /etc/freepbx.conf
[root@localhost ~]# fwconsole m 'SELECT * FROM trunks;'
+---+--------+-------+------------+-----+--+--+-----+---------------------+--+--+-----+-----+
| 1 | | dahdi | | | | | 555 | g0 | | | off | off |
| 3 | fpbx-2 | sip | 4805001104 | off | | | | fpbx-2-Dz2RzUvGHZCR | | | off | off |
| 2 | fpbx-1 | sip | 4805001104 | off | | | | fpbx-1-Dz2RzUvGHZCR | | | off | off |
+---+--------+-------+------------+-----+--+--+-----+---------------------+--+--+-----+-----+