系統需求:
安裝 Java Runtime 1.7
檔案下載:http://java.com/zh_TW/download/manual.jsp
NOTE:下載適合的 32-bit 或 64-bit 版本
# rpm -qa | grep -i jre jre-1.6.0_18-fcs # yum remove jre-1.6.0_18-fcs # rpm ivh jre-7u55-linux-x64.rpm # java -version java version "1.7.0_55" Java(TM) SE Runtime Environment (build 1.7.0_55-b13) Java HotSpot(TM) 64-Bit Server VM (build 24.55-b03, mixed mode)
安裝 Vtiger Asterisk Connector
下載位址:https://www.vtiger.com/add-ons/
wget https://www.vtiger.com/products/apps/VtigerAsteriskConnector/VtigerAsteriskConnector-1.1.zip unzip VtigerAsteriskConnector-1.1.zip mv VtigerAsteriskConnector /opt cd /opt/VtigerAsteriskConnector/ mkdir storagedir/ mkdir appdb/ vi conf/VtigerAsteriskConnector.properties
VtigerAsteriskConnector.properties:
// Location where the application server will be running. ServerIP = 0.0.0.0 ServerPort = 6666 StorageDir = /opt/VtigerAsteriskConnector/storagedir //Location where the applications database files will be stored. AsteriskAppDBPath = /opt/VtigerAsteriskConnector/appdb // Asterisk Server Details AsteriskServerPublicIP = 123.123.123.123 AsteriskServerIP = 127.0.0.1 AsteriskServerPort = 5038 AsteriskUsername = vtigercrm AsteriskPassword = vtigercrm_pass // Vtiger CRM URL VtigerURL = <從 VtigerCRM 複製> VtigerSecretKey = <從 VtigerCRM 複製>
啟動/關閉 VtigerAsteriskConnector
啟動 bin/start.sh 關閉 bin/stop.sh 檢查程序 ps -ef | grep -i vtiger
1. 編輯 /etc/asterisk/manager_custom.conf
[vtigercrm] secret = vtigercrm_pass deny = 0.0.0.0/0.0.0.0 permit = 127.0.0.1/255.255.255.0 read = all write = all
套用新設定
# asterisk -rx "manager reload" # asterisk -rx "manager show users"
2. 編輯 /etc/asterisk/extensions_custom.conf
[vtiger_incoming] exten => _X.,1,Agi(agi://0.0.0.0/incoming.agi) [vtiger_outgoing] exten => _X.,1,Agi(agi://0.0.0.0/incoming.agi)
套用新設定
# asterisk -rx "dialplan reload"
3. 設定 cdr_manager
檢查模組 cdr_manager.so
asterisk -rx "module show like cdr"
新增或編輯 /etc/asterisk/cdr_manager.conf
; ; Asterisk Call Management CDR ; [general] enabled = yes
# chown asterisk:asterisk /etc/asterisk/cdr_manager.conf
套用設定
# asterisk -rx "config reload /etc/asterisk/cdr_manager.conf" 或者 # amportal stop # amportal start
檢查狀態
# asterisk -rx "cdr show status" Call Detail Record (CDR) settings ---------------------------------- Logging: Enabled Mode: Simple Log unanswered calls: No * Registered Backends ------------------- mysql cdr_manager <=== cdr-custom
For Inbound Call
FreePBX > Trunks > 選擇 Trunk Name
Ans:編輯 /etc/hosts,將本機名稱加上。