問題描述:A2Billing 預設是以 Asterisk Realtime Mode 與 Asterisk 作連結,但若沒有經過一些設定,會使兩者的設定無法同步。
軟體版本:A2Billing 1.7.x, 1.9.x
// 檢查 asterisk 有無啟動以下的模組
$ asterisk -rx "module show like res" Module Description Use Count ... res_config_mysql.so MySQL RealTime Configuration Driver 0 res_realtime.so Realtime Data Lookup/Rewrite 0
// 編輯 /etc/asterisk/res_mysql.conf
// 增加這幾行
... [mya2b] dbhost = 127.0.0.1 dbname = mya2billing dbuser = a2billinguser dbpass = a2billing dbport = 3306 dbsock = /var/lib/mysql/mysql.sock ; NOTE! If running Asterisk 1.6 or later add the following line requirements = warn
TIPS:
* dbname,dbuser,dbpass 可以參考 /etc/asterisk/a2billing.conf
// 編輯 /etc/asterisk/extconfig.conf
[settings] ;This is used for A2B realtime mode sipusers => mysql,mya2b,cc_sip_buddies sippeers => mysql,mya2b,cc_sip_buddies iaxusers => mysql,mya2b,cc_iax_buddies iaxpeers => mysql,mya2b,cc_iax_buddies
Tips:
For Asterisk 1.6.x+,mya2b 必須是 res_mysql.conf 的定義名稱。
For Asterisk 1.4.x,mya2b 必須是實際的資料庫名稱,例如是 mya2billing。