asterisk-gui 下載:
http://downloads.asterisk.org/pub/telephony/asterisk-gui/releases/
如果是用 dahdi 的話, 那最低要安裝 asterisk-gui-2.1.0-rc1
安裝:
$ ./configure
.............. configure: Package configured for: configure: OS type : linux-gnu configure: Host CPU : x86_64
$ make
+------- Asterisk-GUI Build Complete -------+ + Asterisk-GUI has successfully been built, + + and can be installed by running: + + + + make install + +-------------------------------------------+
$ make install
mkdir -p /etc/asterisk Installing into /var/lib/asterisk/static-http mkdir -p /var/lib/asterisk/static-http/config mkdir -p /var/lib/asterisk/static-http/config/images mkdir -p /var/lib/asterisk/static-http/config/js ..................................................
檔案: /etc/asterisk/http.conf
enabled=yes enablestatic=yes bindaddr=0.0.0.0 bindport=8088 sessionlimit = 10 redirect = / /static/config/index.html [post_mappings] backups = /var/lib/asterisk/gui_backups moh = /var/lib/asterisk/moh
檔案: /etc/asterisk/manager.conf
enabled = yes webenabled = yes <-- manager over HTTP port = 5038 bindaddr = 127.0.0.1 [admin] secret = yourpw read = system,call,log,verbose,command,agent,config write = system,call,log,verbose,command,agent,config
$ make checkconfig
--- Checking Asterisk configuration to see if it will support the GUI --- * Checking for http.conf: OK * Checking for manager.conf: OK * Checking if HTTP is enabled: OK * Checking if HTTP static support is enabled: OK * Checking if manager is enabled: OK * Checking if manager over HTTP is enabled: OK --- Everything looks good --- * GUI should be available at http://192.168.88.151:8088/asterisk/static/config/cfgbasic.html * The login and password should be an entry from /etc/asterisk/manager.conf which has 'config' permission in read and write. For example: [admin] secret = mysecret109806 read = system,call,log,verbose,command,agent,config write = system,call,log,verbose,command,agent,config --- Good luck! ---
GUI 安裝位置:
/var/lib/asterisk
Asterisk 的安裝位置:
/usr/share/asterisk
由於它們在不同位置, 所以要 linkup 它們
rmdir /usr/share/asterisk/static-http/
ln -s /var/lib/asterisk/static-http /usr/share/asterisk/static-http
問題1: Checking write permission for gui folder:
chown asterisk. /usr/share/asterisk/static-http
問題2: web panel 不斷 refresh
extensions.conf 有parse error 時, GUI 是開不到的
log 會見到:
[Apr 22 13:12:56] WARNING[31537] config.c: No '=' (equal sign) in line 17 of /etc/asterisk/manager.conf [Apr 22 13:12:56] WARNING[31538] config.c: parse error: No category context for line 7 of /etc/asterisk/extensions.conf [Apr 22 13:12:56] WARNING[31539] config.c: parse error: No category context for line 7 of /etc/asterisk/extensions.conf
問題3: playback 找不到 file
[Apr 22 14:42:16] WARNING[4713] file.c: File record/who does not exist in any format [Apr 22 14:42:16] WARNING[4713] file.c: Unable to open record/who (format 0x4 (ulaw)): No such file or directory [Apr 22 14:42:16] WARNING[4713] app_playback.c: ast_streamfile failed on SIP/202-00000004 for record/who
Default:
astdatadir => /usr/share/asterisk // system-provided data, such as the sound files
recordings -> /var/lib/asterisk/sounds/custom
ln -s /usr/share/asterisk/sounds/record /var/lib/asterisk/sounds/record
Start it
/etc/init.d/asterisk restart
Testing
telnet localhost 5038
telnet localhost 8088
server*CLI> http show status
HTTP Server Status: Prefix: Server Enabled and Bound to 0.0.0.0:8088
Enabled URI's:
/httpstatus => Asterisk HTTP General Status /phoneprov/... => Asterisk HTTP Phone Provisioning Tool /manager => HTML Manager Event Interface /rawman => Raw HTTP Manager Event Interface /static/... => Asterisk HTTP Static Delivery /mxml => XML Manager Event Interface
Enabled Redirects:
None.
server*CLI> manager show users
username -------- admin ------------------- 1 manager users configured.
Asterisk HTTP Status:
http://192.168.88.151:8088/httpstatus
Manager Tester:
http://192.168.88.151:8088/manager
Panel:
http://192.168.88.151:8088/static/index.html
GUI Usage
Configure Hardware
Digital Hardware
Analog Hardware
kewl start
loop start
Trunks
New Analog Trunk
Outgoing Calling Rules
Dial Plans
Users (User Extensions on PBX )
Ring Groups
Music On Hold
Voice Menus
Incoming Calling Rules
Voicemail
Conferencing