成功進入了Asterisk 1.8 GUI 2.0 的解決方法
| 本帖最後由 bubblestar 於 2011-1-17 11:56 編輯 
 Asterisk 1.8 的 GUI 2.0 一直未能成功安裝,因為GUI 版本仍有很多BUGS 未解決。現在找到了一個暫時性的辦法,但仍只是能在Firefox 之下可以運行。
 
 如常安裝 GUI 2.0
 cd /usr/src
 svn co http://svn.digium.com/svn/asterisk-gui/branches/2.0 asterisk-gui
 cd asterisk-gui
 sh configure && make && make install
 
 如常修改 /etc/asterisk/http.conf
 [general]
 enabled=yes
 bindaddr=0.0.0.0
 bindport=8088
 prefix=gui
 enablestatic=yes
 
 如常修改 /etc/asterisk/manager.conf
 [general]
 enabled=yes
 webenabled=yes
 port=5038
 bindaddr=0.0.0.0
 [admin]
 secret=password
 read=system,call,log,verbose,command,agent,user,config,originate,read,write
 write=system,call,log,verbose,command,agent,user,config,originate,read,write
 
 之後在Console
 make checkconfig
 再 /etc/init.d/asterisk restart
 
 問題來了:
 Firefox address bar 鍵入
 http://your_ip_address:8088/asterisk/static/config/index.html
 
 出現以下徵狀:
 On the browser I was able to reach the asterisk gui login panel. After inputting user and password asterisk, GUI makes a series of proccess and loop on the pop-up saying: Your configuration will now be upgraded to work with the latest version of GUI.
 An automatic backup of your old configuration is available from the backups panel
 
 但此情況不斷重覆,無論按多少次 OK 都是不斷endless-loop。
 
 元凶之一是寫入權限問題,解決辦法是
 /var/lib/asterisk/static-http 改為 chmod 777
 
 元凶之二是Asterisk 的 /var/lib/asterisk/static-http/config/js/index.js 呢個javascript未改好,沒有包括1.8 的適當語法,解決辦法是:
 在上述的 index.js 找出以下一行:
 if ( resp_lower.contains("branches/1.6") || resp_lower.contains("asterisk/1.6") || resp_lower.contains("svn-branch-1.6") || resp_lower.contains("svn-trunk-") )
 把它更改為:
 if ( resp_lower.contains("branches/1.6") || resp_lower.contains("asterisk/1.6") || resp_lower.contains("svn-branch-1.6") || resp_lower.contains("svn-trunk-") || resp_lower.contains("asterisk/1.8") )
 
 攪掂晒,重啟Asterisk,再用Firefox 按正常進入,呢次成功了。
 
 注意,我暫時仲未試過其它進入GUI後的使用設定,是否一切如常的。大家一齊努力。
  |