close

 

http://www.osslab.org.tw/%e5%af%a6%e9%a9%97%e5%b0%88%e6%a1%88/Asterisk/Addons/Asternic_Call_Center_Stats

轉貼

這是一個用來將 Queue 的使用狀況,在 Web 顯示成各種圖表的套件,它有分 GPL 及商業授權,兩者差別只有在商業授權有多一些的報表。

 

下載套件檔

shell>wget http://www.asternic.org/stats/asternic-stats-1.0.1.tgz

開始安裝

shell>tar -xzf asternic-stats-1.0.1.tgz
shell>cd asternic-stats
shell>cp -r html /var/www/html/asternic-stats

新增資料庫並匯入資料

shell>mysqladmin -u root -p create qstat
shell>mysql -u root -p qstat < sql/qstat.sql

修改設定

shell>vi /var/www/html/asternic-stats/config.php

$dbname = 'qstat';
$dbuser = 'root';
$dbpass = '資料庫密碼';

$language = "en";

shell>vi /var/www/html/asternic-stats/config_realtime.php

$manager_secret = "admin連線密碼";
這裡的密碼請檢查 /etc/asterisk/manager.conf,[admin] 下方的設定。

shell>cd ..
shell>cp -r asternic-stats /opt
shell>cd /opt/asternic-stats/parselog
shell>vi config.php

$dbpass = '資料庫密碼';

第一次執行

shell>cd /opt/asternic-stats/parselog
shell>php -q parselog.php convertlocal

瀏覽網頁 http://你的主機/asternic-stata/

定時自動更新資料

shell>cd /etc/cron.hourly
shell>vi qstats.sh
  1. #!/bin/sh   
  2. # Runs the queue stats program parsing the logs   
  3. # If you're short on disk space, you might want to tune this commandline.   
  4.   
  5. /opt/asternic-stats/parselog/parselog.php convertlocal   
  6. exit 0  
shell>chmod 0755 qstats.sh

完成

參考連結:

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 安德森 的頭像
    安德森

    安德森技術備忘板

    安德森 發表在 痞客邦 留言(0) 人氣()