“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...”) |
|||
第1行: | 第1行: | ||
− | '''fwconsole commands | + | '''fwconsole commands FreePBX 13 以上版本 用户使用指南''' |
− | "fwconsole" | + | "fwconsole" 是Linux命令行的系统指令,用来控制支持FreePBX 13以上版本。 |
− | + | 访问fwconsole 命令,用户需要获得Linux SSH 访问权限来访问freepbx后台系统。 | |
− | + | 以下是命令解释: | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
'''Command List''' | '''Command List''' | ||
− | * chown | + | * chown 修改用户权限 |
− | * context | + | * context 从拨号规则中显示指定的context |
− | * cx | + | * cx 从拨号规则中显示指定的context |
− | * dbug | + | * dbug 保存排查日志打印文件 |
− | * extip | + | * extip 获得外部IP地址 |
− | * help | + | * help 显示帮助命令 |
− | * list | + | * list 命令列表 |
− | * m | + | * m 执行mysql查询语句 |
− | * ma | + | * ma 模块管理员 |
* motd Prints MOTD | * motd Prints MOTD | ||
− | * mysql | + | * mysql 执行mysql查询: |
− | * r | + | * r 重新加载配置文件 |
− | * reload | + | * reload 重新加载配置文件 |
− | * restart | + | * restart 启动 Asterisk,并且运行其他FreePBX相关命令 |
− | * session | + | * session 管理回话 |
− | * set | + | * set 查看更新设置 |
* setting View and update settings | * setting View and update settings | ||
* start Start Asterisk and run other needed FreePBX commands | * start Start Asterisk and run other needed FreePBX commands | ||
− | * stop | + | * stop 停止Asterisk 并且运行其他FreePBX相关命令 |
− | * trunks | + | * trunks 从命令行开启孩子关闭中继 |
− | * unlock | + | * unlock 解锁会话 |
'''Stop/Start''' | '''Stop/Start''' |
2015年11月3日 (二) 10:53的版本
fwconsole commands FreePBX 13 以上版本 用户使用指南
"fwconsole" 是Linux命令行的系统指令,用来控制支持FreePBX 13以上版本。
访问fwconsole 命令,用户需要获得Linux SSH 访问权限来访问freepbx后台系统。
以下是命令解释:
Command List
- chown 修改用户权限
- context 从拨号规则中显示指定的context
- cx 从拨号规则中显示指定的context
- dbug 保存排查日志打印文件
- extip 获得外部IP地址
- help 显示帮助命令
- list 命令列表
- m 执行mysql查询语句
- ma 模块管理员
- motd Prints MOTD
- mysql 执行mysql查询:
- r 重新加载配置文件
- reload 重新加载配置文件
- restart 启动 Asterisk,并且运行其他FreePBX相关命令
- session 管理回话
- set 查看更新设置
- setting View and update settings
- start Start Asterisk and run other needed FreePBX commands
- stop 停止Asterisk 并且运行其他FreePBX相关命令
- trunks 从命令行开启孩子关闭中继
- unlock 解锁会话
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 |
+---+--------+-------+------------+-----+--+--+-----+---------------------+--+--+-----+-----+