• <strike id="fdgpu"><input id="fdgpu"></input></strike>
    <label id="fdgpu"></label>
    <s id="fdgpu"><code id="fdgpu"></code></s>

  • <label id="fdgpu"></label>
  • <span id="fdgpu"><u id="fdgpu"></u></span>

    <s id="fdgpu"><sub id="fdgpu"></sub></s>

    如何配置開(kāi)源免費的FreePBX-13

    2015-09-16 13:54:21   作者:   來(lái)源:CTI論壇   評論:0  點(diǎn)擊:


      安裝 Centos 7

    • Install Centos 7

      Initial System Setup

      Disable selinux
      Update Your System
      Install Additional Required Dependencies
      Install Legacy Pear requirements
      Firewalld Basic Configuration
      Enable and Start MariaDB
      Enable and Start Apache

      Install Dependencies for Google Voice (if required)
      Install iksemel

      Add the Asterisk User

      Install and Configure Asterisk
      
    Download Asterisk source files。
      Compile and install DAHDI

      Compile and install pjproject

      Compile and Install jansson

      Compile and install Asterisk

      Install Asterisk Soundfiles。
      
    Set Asterisk ownership permissions。

      Install and Configure FreePBX
      
    A few small modifications to Apache。
      Download and install FreePBX。

      That's it!

      Automatic Startup

      ★ Initial System Setup

      用戶(hù)必須是root 用戶(hù)!
      必須確認關(guān)閉 selinux.,否則會(huì )引起很多莫名其妙的錯誤

      ★ 關(guān)閉 selinux

      In /etc/sysconfig/selinux,change the following lines:

      sed -i 's/\(^SELINUX=\).*/\SELINUX=disabled/' /etc/sysconfig/selinux
      sed -i 's/\(^SELINUX=\).*/\SELINUX=disabled/' /etc/selinux/config

      重新啟動(dòng)系統,執行命令 'sestatus' 檢查是否關(guān)閉。結果必須是:

      SELinux status: disabled

      ★ 更新系統

      yum -y update
      yum -y groupinstall core base “Development Tools”

      ★ 安裝依賴(lài)包(確認完全安裝成功,不能偷懶!)

      yum -y install lynx mariadb-server mariadb php php-mysql php-mbstring tftp-server \
      httpd ncurses-devel sendmail sendmail-cf sox newt-devel libxml2-devel libtiff-devel \
      audiofile-devel gtk2-devel subversion kernel-devel git php-process crontabs cronie \
      cronie-anacron wget vim php-xml uuid-devel sqlite-devel net-tools gnutls-devel php-pear

      ★ 安裝 Legacy Pear

      pear install Console_Getopt

      ★ 防火墻設置

      必須開(kāi)啟80端口來(lái)訪(fǎng)問(wèn)GUI

      firewall-cmd --zone=public --add-port=80/tcp --permanent
      firewall-cmd --reload

      ★ 開(kāi)啟,啟動(dòng) MariaDB

      You must have MariaDB running for freepbx to operate normally.It must start automatically,and be running continuously.

      systemctl enable mariadb.service
      systemctl start mariadb

      Now that our MariaDB database is running, we want to run a simple security script that will remove some dangerous defaults and lock down access to our database system a little bit

      mysql_secure_installation

      安裝mysql, 很多用戶(hù)在這一步犯錯誤,這里不用輸入用戶(hù)密碼,直接默認Enter 鍵。后續的腳本安裝文件會(huì )配置數據庫密碼。其余的步驟可以選擇Yes 選項。

      ★ 開(kāi)啟,啟動(dòng) Apache

      執行以下命令來(lái)開(kāi)啟,啟動(dòng) web 服務(wù)器。

      systemctl enable httpd.service
      systemctl start httpd.service

      ★ 添加 Asterisk 系統用戶(hù)

      adduser asterisk -M -c “Asterisk User”

      安裝配置 Asterisk

      ★ 下載源代碼

      cd /usr/src

      wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-current.tar.gz (如果沒(méi)有asterisk 語(yǔ)音卡無(wú)需下載此包)
      wget http://downloads.asterisk.org/pub/telephony/libpri/libpri-1.4-current.tar.gz(同上)
      wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-13-current.tar.gz
      wget -O jansson.tar.gz https://github.com/akheron/jansson/archive/v2.7.tar.gz
      wget http://www.pjsip.org/release/2.4/pjproject-2.4.tar.bz2

      ★ 編輯安裝 DAHDI(如果無(wú)asterisk 語(yǔ)音卡支持,無(wú)需安裝,忽略此步驟)

      cd /usr/src
      tar xvfz dahdi-linux-complete-current.tar.gz
      tar xvfz libpri-1.4-current.tar.gz
      rm -f dahdi-linux-complete-current.tar.gz libpri-1.4-current.tar.gz
      cd dahdi-linux-complete-*
      make all
      make install
      make config
      cd /usr/src/libpri-1.4.*
      make
      make install

      ★ 編譯安裝 pjproject

      cd /usr/src
      tar -xjvf pjproject-2.4.tar.bz2
      rm -f pjproject-2.4.tar.bz2
      cd pjproject-2.4
      CFLAGS='-DPJ_HAS_IPV6=1' ./configure --prefix=/usr --enable-shared --disable-sound\
      --disable-resample --disable-video --disable-opencore-amr --libdir=/usr/lib64
      make dep
      make
      make install

      ★ 編譯安裝 jansson

      cd /usr/src
      tar vxfz jansson.tar.gz
      rm -f jansson.tar.gz
      cd jansson-*
      autoreconf -i
      ./configure --libdir=/usr/lib64
      make
      make install

      ★ 編譯安裝 Asterisk

      cd /usr/src
      tar xvfz asterisk-13-current.tar.gz
      rm -f asterisk-13-current.tar.gz
      cd asterisk-*
      contrib/scripts/install_prereq install
      ./configure --libdir=/usr/lib64
      contrib/scripts/get_mp3_source.sh
      make menuselect

      默認編譯環(huán)境下已經(jīng)支持了大部分的運行功能。如果需要MP3 支持(音樂(lè )等待等等),用戶(hù)則需要開(kāi)啟'format_mp3 模塊,編譯到系統中。

      保存退出以后,繼續執行以下步驟,注意這里不用這些 make samples 命令!

      make
      make install
      make config
      ldconfig
      chkconfig asterisk off

      ★ 安裝語(yǔ)音文件.

      'make install' 命令安裝了標準語(yǔ)音質(zhì)量的語(yǔ)音包。可以適用于大部分中小型系統的使用,或者處理能力不是很強大的平臺,例如嵌入式的平臺,樹(shù)莓派等等。如果大型的系統,可以安裝相對高清的語(yǔ)音文件格式。這里安裝的是 (8khz) 'wav' 語(yǔ)音文件和 G722 (High Definition 'Wideband') audio.

      cd /var/lib/asterisk/sounds
      wget http://downloads.asterisk.org/pub/telephony/sounds/asterisk-core-sounds-en-wav-current.tar.gz
      wget http://downloads.asterisk.org/pub/telephony/sounds/asterisk-extra-sounds-en-wav-current.tar.gz
      tar xvf asterisk-core-sounds-en-wav-current.tar.gz
      rm -f asterisk-core-sounds-en-wav-current.tar.gz
      tar xfz asterisk-extra-sounds-en-wav-current.tar.gz
      rm -f asterisk-extra-sounds-en-wav-current.tar.gz
      # Wideband Audio download
      wget http://downloads.asterisk.org/pub/telephony/sounds/asterisk-core-sounds-en-g722-current.tar.gz
      wget http://downloads.asterisk.org/pub/telephony/sounds/asterisk-extra-sounds-en-g722-current.tar.gz
      tar xfz asterisk-extra-sounds-en-g722-current.tar.gz
      rm -f asterisk-extra-sounds-en-g722-current.tar.gz
      tar xfz asterisk-core-sounds-en-g722-current.tar.gz
      rm -f asterisk-core-sounds-en-g722-current.tar.gz

      ★ 設置 Asterisk 權限(這里用戶(hù)一定要確保執行)

      chown asterisk. /var/run/asterisk
      chown -R asterisk. /etc/asterisk
      chown -R asterisk. /var/{lib,log,spool}/asterisk
      chown -R asterisk. /usr/lib64/asterisk
      chown -R asterisk. /var/www/

      安裝配置 FreePBX

      ★ 安裝前修改 Apache 配置

      sed -i 's/\(^upload_max_filesize = \).*/\120M/' /etc/php.ini
      sed -i 's/^\(User\|Group\).*/\1 asterisk/' /etc/httpd/conf/httpd.conf
      sed -i 's/AllowOverride None/AllowOverride All/' /etc/httpd/conf/httpd.conf
      systemctl restart httpd.service

      ★ 下載安裝 FreePBX.

      cd /usr/src
      wget http://mirror.freepbx.org/modules/packages/freepbx/freepbx-13.0-latest.tgz
      tar xfz freepbx-13.0-latest.tgz
      rm -f freepbx-13.0-latest.tgz
      cd freepbx
      ./start_asterisk start
      ./install –n

      常見(jiàn)問(wèn)題:
      1)登錄界面以后,為什么asterisk 沒(méi)有啟動(dòng):
      解決辦法,登錄系統后臺,執行以下命令:
      [root@localhost ~]# /usr/sbin/fwconsole restart
      Running FreePBX shutdown...

      Checking Asterisk Status...
      sh: warning: setlocale: LC_ALL: cannot change locale (en_EN): No such file or directory
      Asterisk Seems to be NOT running
      Not running Pre-Asterisk Shutdown Hooks.
      Running FreePBX startup...

      Checking Asterisk Status...
      sh: warning: setlocale: LC_ALL: cannot change locale (en_EN): No such file or directory
      Run Pre-Asterisk Hooks

      Starting Asterisk...
      sh: warning: setlocale: LC_ALL: cannot change locale (en_EN): No such file or directory
      99/100 [===========================>]  99%sh: warning: setlocale: LC_ALL: cannot change locale (en_EN): No such file or directory
      100/100 [============================] 100%
      Asterisk Started on  3109

      Running Post-Asterisk Scripts
      [root@localhost ~]#

      [root@localhost ~]# asterisk -r
      Asterisk 13.5.0, Copyright (C) 1999 - 2014, Digium, Inc. and others.
      Created by Mark Spencer <markster@digium.com>
      Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
      This is free software, with components licensed under the GNU General Public
      License version 2 and other licenses; you are welcome to redistribute it under
      certain conditions. Type 'core show license' for details.            
      Connected to Asterisk 13.5.0 currently running on localhost (pid = 3109)
      localhost*CLI>
     

      2)如何修改到中文顯示界面:
      訪(fǎng)問(wèn)高級設置,點(diǎn)擊一下設置參數,修改到 zh_CN, 提交,更新設置。

      3)默認安裝后只有基本模塊功能,如何添加其他的應用模塊:
      訪(fǎng)問(wèn)管理員菜單,點(diǎn)擊模塊管理,下載開(kāi)啟安裝需要的模塊

      4)安裝出現的報錯信息:

      installing files to /var/lib/asterisk/bin..error copying files:
      'cp -rf' from src: '/var/www/html/admin/modules/framework/amp_conf/bin/*' to dst: '/var/lib/asterisk/bin'...details follow
      cp: cannot stat '/var/www/html/admin/modules/framework/amp_conf/bin/*': No such file or directory
      done, see errors below
      installing files to /var/lib/asterisk/agi-bin..error copying files:
      'cp -rf' from src: '/var/www/html/admin/modules/framework/amp_conf/agi-bin/*' to dst: '/var/lib/asterisk/agi-bin'...details follow
      cp: cannot stat '/var/www/html/admin/modules/framework/amp_conf/agi-bin/*': No such file or directory
      done, see errors below

      此報錯說(shuō)明 腳本沒(méi)有安裝 framework 文件夾的所有文件,用戶(hù)可以手動(dòng)添加到安裝路徑

      Updating Hooks...Done
      Checking if directdids need migrating..already done
      updating zap callgroup, pickupgroup..not needed
      checking for delay_answer field..already exists
      checking for reversal field..already exists
      checking for pricid field..already exists
      Checking if trunk table migration required..not needed
      Checking if privacy manager options exists..already exists
      Checking for noanswer_cid field..already exists
      Checking for busy_cid field..already exists
      Checking for chanunavail_cid field..already exists
      Checking for noanswer_dest field..already exists
      Checking for busy_dest field..already exists
      Checking for chanunavail_dest field..already exists
      Unable to add index to extensions field in users
      Checking for General Setting migrations..not needed
      Deleting unused globals..done
      Converting IAX notransfer to transfer if needed..updated 0000 records
      deleting obsoleted record_in and record_out entries..ok
      checking for dest field in outbound_routes..already exists
      checking for continue field in trunks..already exists
      upgrading any zap trunks to dahdi if foundok
      Generating CSS...Done
      Module core successfully installed
      Updating Hooks...Done
      Generating CSS...Done
      Module featurecodeadmin successfully installed
      Updating Hooks...Done
      Refreshing all UCP Assets, this could take a while...
      Generating Module Scripts...Done
      Generating Module CSS...Done
      Generating Main Scripts...Done
      Generating Main CSS...Done
      Done!
      Generating CSS...Done
      Module ucp successfully installed
      Updating Hooks...Done
      Generating CSS...Done
      Module logfiles successfully installed
      Updating Hooks...Done
      Checking for General Setting migrations..not needed
      checking if Voicemail Admin (vmailadmin) is installed..not installed, ok
      Generating CSS...Done
      Module voicemail successfully installed
      Updating Hooks...Done
      Creating cel if needed..OK
      checking for extra field..already exists
      checking for userfield field..already deleted
      Generating CSS...Done
      Module cel successfully installed
      Updating Hooks...Done
      Generating CSS...Done
      Module customappsreg successfully installed
      Updating Hooks...Done
      Generating CSS...Done
      Module dashboard successfully installed
      Updating Hooks...Done
      checking for sipsettings table..already exists
      Migrate rtp.conf values if needed and initialize
      Generating CSS...Done
      Module sipsettings successfully installed
      Updating Hooks...Done
      Generating CSS...Done
      Module callrecording successfully installed
      Updating Hooks...Done
      Generating CSS...Done
      Module userman successfully installed
      Updating Hooks...Done
      Done installing modules
      Installing framework...
      installing files to /var/www/html..done
      installing files to /var/lib/asterisk/bin..done
      installing files to /var/lib/asterisk/agi-bin..done
      Checking for upgrades..
      No further upgrades necessary
      framework file install done, removing packages from module
      file/directory: /var/www/html/admin/modules/framework/amp_conf removed successfully
      file/directory: /var/www/html/admin/modules/framework/upgrades removed successfully
      file/directory: /var/www/html/admin/modules/framework/start_asterisk removed successfully
      file/directory: /var/www/html/admin/modules/framework/install removed successfully
      file/directory: /var/www/html/admin/modules/framework/installlib removed successfully
      Generating CSS...Done
      Module framework successfully installed
      Updating Hooks...Done
      Done
      Generating default configurations...
      Checking for PEAR Console::Getopt..OK
      Skipping extension and destination registry checks
      Please update your modules and reload Asterisk by browsing to your server.
      Finished generating default configurations
      Trusting FreePBX...Trusted
      Setting Permissions...
      8200/8200 [============================] 100%
      Finished setting permissions
      You have successfully installed FreePBX
      [root@localhost freepbx]# reboot

      以上是成功安裝結果

      正常的中文登錄界面:

     

    分享到: 收藏

    專(zhuān)題

    亚洲精品网站在线观看不卡无广告,国产a不卡片精品免费观看,欧美亚洲一区二区三区在线,国产一区二区三区日韩 武安市| 措美县| 新民市| 蓬莱市| 临海市| 富宁县| 明星| 慈溪市| 开远市| 雷波县| 墨竹工卡县| 安顺市| 灵丘县| 祁连县| 凉山| 佛山市| 遂川县| 朔州市| 楚雄市| 法库县| 古蔺县| 龙南县| 满城县| 晴隆县| 澎湖县| 宜城市| 三原县| 农安县| 来凤县| 陇川县| 宝鸡市| 佛坪县| 灌南县| 舞钢市| 措美县| 赫章县| 富源县| 桃园县| 晋中市| 富川| 施甸县| http://444 http://444 http://444 http://444 http://444 http://444