VtigerCRM 6 (Hosted Service)

    版本為 01:41, 27 Dec 2024

    到這個版本。

    返回到 版本存檔.

    查閱目前版本

    系統環境

    • VtigerCRM 6.14.8.3(Hosted on vtiger.com)
    • FreePBX Distro
    • Asterisk 1.8/11
    • VtigerCRM's IP 69.64.x.x(idealmobile.od1.vtiger.com)
    • VtigerAsteriskConnector 1.2/1.4
    • JRE 1.7
    • FreePBX's IP 216.118.x.x

    使用心得

    • Incoming Popup:
      1. 無法連接 IVR
      2. 所有設定在 CRM 的 extension 都會響鈴
    • Click-to-Call:
      1. 撥出的 context 只能是 from-internal,無法指定其他的
      2. 撥出的號碼只能是網頁的號碼,無法在後端自動加上 prefix code。

    開始設定

    1. 安裝/設定 VtigerCRM 模組 - Phone Calls(On VtigerCRM)
    2. 安裝/設定 Vtiger Asterisk Connector (On FreePBX)
    3. 設定 Asterisk
    4. 設定 Vtiger
    安裝/設定 VtigerCRM 模組 - Phone Calls
    1. Go to CRM Settings -> Module Manager.
    2. Click on Import Module.
    3. Click install under Phone Calls.
    4. Go to CRM Settings -> Integration > Phone Calls
    5. Click on Add Gateway
      • Gateway: Asterisk
      • Vtiger Asterisk App URL: http://Asterisk_Server_IP:6666
      • Outbound Context: vtiger_outgoing
      • Outbound Trunk: <Trunk Name on FreePBX>
      • CallBack URL: <這是 VtigerCRM URL>
      • Vtiger Secret Key <take note of this>
         
    安裝/設定 Vtiger Asterisk Connector

    系統需求:

    • Asterisk 1.8
    • Java 1.7+
    • Vtiger 連線資訊(Phone Calls > Add Gateway)
      • CallBack URL
      • Vtiger Secure Key
         

    安裝 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
    
    設定 FreePBX

    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

    • Peer details
      ...
      context=vtiger_incoming

    Q & A

    檢查 VtigerAsteriskConnector/logs/*api.log 出現 UNKNOWN HOST

    Ans:編輯 /etc/hosts,將本機名稱加上。

    Powered by MindTouch Core