返回列表 發帖

成功進入了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後的使用設定,是否一切如常的。大家一齊努力。

之前記起ckleea 兄說他是從原本對應 Asterisk 1.6 GUI 轉過來的,沒有太大問題。而我們直接新裝Asterisk 1.8 便有問題,相信就是Asterisk 官方沒有把1.8 在GUI的適用句子也加進javascript 之內,因而引致無法進入的情況。

TOP

本帖最後由 bubblestar 於 2011-1-17 12:29 編輯

回復 3# ckleea


   
因為有理無理,chomd 777 懶人可以唔使理邊度是否有足夠權限嘛,不過呢個我都不建議亂用。

index.js as attached.

index.rar (10.71 KB)

TOP

基本測試內線沒有問題,PSTN 出入沒有問題。
但內線訊號燈一直是綠色,即使有電話打出、打入也沒有轉為黃色或紅色。

TOP

每次update 都只是改少少,所以以前可能 fully support Asterisk 1.6,但隨著過渡性的轉折而朝向真正支援Asterisk 1.8,我猜想有部份功能兩頭唔到岸,苦了我們一班用家。 唯一辦法是------等

TOP

In my case, the default  SSH port is set to point to Router ex-factory but I think it is quite dangerous.  Hence, I disable it and use other ports to access my internal devices.  In fact, it is always headache for me to remember so many other forwarding ports.

其實經常改用其它Ports 去進入一些服務,自己想起來真是有點本末倒置,default 就是 default,如果個個人都不用default ports,要做forwarding,我覺得不如不要再有default ports 呢個 concept 了,好唔方便。到底要default ports 幹嗎?
保安方面應該由其它更有效的方法去處理,會不會好些呢!

TOP

I can't agree more

TOP

Yes, it supports SSL-VPN.  Manufacturer also provides its dedicated software to us for connection.

TOP

IE 係唔work,但Firefox OK 的。
Access rights 777 只在static-http 第一層做未必足夠,你留意Folder 之下的子Folder 及files 有沒有改動相關access rights,也有需要全改的。

TOP

本帖最後由 bubblestar 於 2011-2-11 15:32 編輯

If you are brave enough, you can try with this latest working method.  Only need to edit a few lines on index.js

留意只需更改有 + 號 的地方

http://www.mail-archive.com/aste ... m.com/msg01736.html
  1. Here is a quick and dirty patch,  the isAST_1_6_1 will give you most
  2. of the actions that you need.  I just got my svn access so I will work
  3. to add 1.8, 1.10 support to this soon.  Keep in mind that the new
  4. mjson addition to the manager will enable us to rewrite a lot of this
  5. more cleanly.

  6. Index: config/js/index.js
  7. ===================================================================
  8. --- config/js/index.js  (revision 5132)
  9. +++ config/js/index.js  (working copy)
  10. @@ -134,13 +113,11 @@
  11.                                         'h263p': 'H.263p',
  12.                                         'h264' : 'H.264'
  13.                                 };
  14. -
  15. -                               /* add video codecs for 1.6 platforms */
  16. -                       } else { /* if system is either 1.4 or unknown */
  17. -                               sessionData.PLATFORM.isAST_1_4 = true ;
  18. -                               sessionData.PLATFORM.isAST_1_6 = false ;
  19. +                       } else {
  20. +                               sessionData.PLATFORM.isAST_1_4 = false ;
  21. +                               sessionData.PLATFORM.isAST_1_6 = true ;
  22. +                               sessionData.PLATFORM.isAST_1_6_1 = true ;
  23.                         }
  24. -               }
  25.         },

  26.         check_ReadWritePermissions : function(){
  27. @@ -551,7 +528,7 @@
  28.                 }

  29.                 //if( sessionData.PLATFORM.isAA50  ){
  30. -                       DOM_mainscreen.src = 'home.html?status=1';
  31. +                       DOM_mainscreen.src = 'home.html?status=0';
  32.                 //}

  33.                 if( sessionData.PLATFORM.isAA50 &&
  34. sessionData.PLATFORM.AA50_SKU.contains('800') ){
  35. @@ -1117,7 +1094,7 @@
  36.                  * doing time intervals for includes :-/
  37.                  * */
  38.                 if (!sessionData.PLATFORM.isAST_1_6) {
  39. -                       top.session.delimiter = '|';
  40. +                       top.session.delimiter = ',';
  41.                 }
  42.         };



  43. ~~~ Andrew "lathama" Latham lath...@gmail.com ~~~
複製代碼

TOP

返回列表