Was this page helpful?

A2Billing 安裝篇

    系統環境

    a2billing-home.pngTrixbox 2.6.2.3
    A2Billing 1.3.4
    CentOS Linux 5.3

    開始安裝

    // 安裝 php-pcntl

    #>rpm -ivh php-pcntl-4.3.11-2.5.1.i386.rpm
    

    Tips:

    If you want to enable pcntl on Elastix 1.6.x, following these steps:

    #>yum install php-devel
    #>cd /usr/src
    #>wget http://museum.php.net/php5/php-5.1.6.tar.gz
    #>tar -xzf php-5.1.6.tar.gz
    #>cd php-5.1.6/ext/pcntl
    #>phpize
    #>./configuere
    #>make
    #cp modules/pcntl.so /usr/lib/php/modules
    #echo "extension=pcntl.so" > /etc/php.d/pcntl.ini
    #service httpd restart

    how to enable pcntl on php5
    http://centos.org/modules/newbb/view...forumpost83973

    // 解壓安裝檔

    #>mkdir a2billing_install
    #>tar -xzf A2Billing_1.3.4.tar.gz -C a2billing_install
    

    // 安裝 A2Billing 資料庫

    #>cd a2billing_install/DataBase/mysql/Mysql-5.x/
    #>echo "GRANT ALL PRIVILEGES ON *.* TO 'a2billinguser'@'localhost' IDENTIFIED BY 'a2billing' WITH GRANT OPTION;" | mysql -uroot -ppassw0rd
    #>mysqladmin create mya2billing -u a2billinguser -pa2billing
    #>mysql -ua2billinguser -pa2billing mya2billing < a2billing-mysql-schema-MYSQL.5.X-v1.3.0.sql

    // 安裝 Web UI

    #>cd ../
    #>cd ../
    #>cd ../
    #>cp -a A2Billing_UI/ /var/www/html
    #>cp -a A2BCustomer_UI/ /var/www/html

    // 安裝 A2Billing 設定檔

    #>cp a2billing.conf /etc/asterisk

    // 安裝 AGI

    #>cd A2Billing_AGI
    #>cp -a a2billing.php libs_a2billing/ /var/lib/asterisk/agi-bin

    // 安裝語音檔

    #>cd ../
    #>cp -a addons/sounds/* /var/lib/asterisk/sounds/
    

    // 設定 IAX 及 SIP conf 檔

    #>cd /etc/asterisk
    #>touch additional_a2billing_iax.conf
    #>touch additional_a2billing_sip.conf
    #>touch extensions_a2billing.conf

    // 設定目錄權限

    #>chmod 664 /etc/asterisk/a2billing.conf
    #>chmod 664 /etc/asterisk/additional_a2billing_iax.conf
    #>chmod 664 /etc/asterisk/additional_a2billing_sip.conf
    #>chmod 664 /etc/asterisk/extensions_a2billing.conf
    
    #>chown -R asterisk:asterisk /etc/asterisk/*
    #>chown -R asterisk:asterisk /var/www/html/*
    #>chown -R asterisk:asterisk /var/lib/asterisk/*

    // 設定 A2Billing.conf
    #>vi /etc/asterisk/a2billing.conf

    [database]
    hostname = localhost
    port = 5432
    user = a2billinguser
    password = a2billing
    dbname = mya2billing
    ;dbtype = postgres
    dbtype = mysql
    
    ; MANAGER CONNECTION PARAMETERS
    manager_host = localhost
    manager_username = a2billinguser
    manager_secret = a2billing
    

    // 設定 Asterisk Manager Interface

    #>vi /etc/asterisk/manager_custom.conf

    [a2billinguser]
    secret=a2billing
    deny=0.0.0.0
    permit=127.0.0.1/255.255.255.0
    read=system,call,log,verbose,command,agent,user
    write=system,call,log,verbose,command,agent,user
    

    // Include 設定檔

    #>vi /etc/asterisk/sip.conf

    ;for A2Billing
    #include additional_a2billing_sip.conf
    

    #>vi /etc/asterisk/iax.conf

    ;for A2Billing
    #include additional_a2billing_iax.conf
    

    #>vi /etc/asterisk/extensions_custom.conf

    #include extensions_hud.conf
    ;for A2Billing
    #include extensions_a2billing.conf
    

    // 設定 A2Billing Context

    #>vi /etc/asterisk/extensions_a2billing.conf

    [a2billing]
    exten => _X.,1,Answer
    exten => _X.,n,Wait(1)
    exten => _X.,n,DeadAGI(a2billing.php|1)
    exten => _X.,n,Hangup

    註:a2billing.php 後方的 1,這是對應 a2billing.conf 的 [agi-conf1] 參數,若有多個 AGI 設定項,若是 agi-conf2 應該修改為 (a2billing.php|2)。

    重啟 Asterisk 服務,套用所有新的設定。

    設定 A2Billing UI

    打開瀏覽器,輸入 http://10.10.10.104/A2Billing_UI/,登入帳號:root, 密碼:myroot

    Was this page helpful?
    標籤 (Edit tags)
    • No tags

    文件 1

    文件大小日期附件上傳者 
     a2billing-home.png
    A2Billing
    77.48 KB23:16, 13 Dec 2009alang動作
    您必須 登入 才能發佈評論。
    Powered by MindTouch Core