ubuntu16.0.4安裝freeswitch

1. 安裝 freeswitch 庫

git clone https://github.com/signalwire/freeswitch.git

2. 安裝環境依賴

apt-get install libedit-dev libldns-dev libpcre3-dev libspeexdsp-dev libspeex-dev libcurl4-openssl-dev libopus-dev libncurses5-dev libtiff-dev libjpeg-dev libssl-dev libsqlite3-dev build-essential automake autoconf git-core wget libtool lua5.1 liblua5.1-dev libsndfile1-dev yasm libsndfile-dev libtool-bin sqlite3 libavresample-dev libswscale-dev uuid-dev 

3 . 安裝freeswitch

sudo ./bootstrap.sh
sudo ./configure
sudo make install 

 

問題歸納解決:

making all mod_signalwire
make[4]: Entering directory `/usr/local/src/freeswitch/src/mod/applications/mod_signalwire'
Makefile:916: *** You must install libks to build mod_signalwire.  Stop.
make[4]: Leaving directory `/usr/local/src/freeswitch/src/mod/applications/mod_signalwire'
make[3]: *** [mod_signalwire-all] Error 1

解決辦法:

1. 安裝cmake

複製代碼

cd /usr/local/src
wget https://cmake.org/files/v3.13/cmake-3.13.3.tar.gz
tar -zxvf cmake-3.13.3.tar.gz
cd cmake-3.13.3 
sudo ./bootstrap
sudo make
sudo make install

複製代碼

2. 安裝libks

複製代碼

cd /usr/local/src
git clone https://github.com/signalwire/libks.git
cd libks
sudo cmake .
sudo make
sudo make install
sudo mkdir -p /usr/lib64/pkgconfig/sudo cp /usr/lib/pkgconfig/libks.pc /usr/lib64/pkgconfig/

複製代碼

3. 安裝signalwire-c

複製代碼

cd /usr/local/src
git clone https://github.com/signalwire/signalwire-c.git
cd signalwire-c
sudo cmake .
sudo make
sudo make install
sudo cp /usr/local/lib/pkgconfig/*.pc /usr/lib64/pkgconfig/
sudo cp -f /usr/local/lib/* /usr/lib64/

複製代碼

然後再重新編譯安裝freeswitch,沒有意外的話可以正常安裝freeswitch

cd /usr/local/freeswitch
sudo ./bootstrap.sh -j
sudo ./configure --enable-core-odbc-support  #如果讀者不想使用mysql管理,只需要執行./configure即可
sudo make
sudo make install

成功的界面如下

複製代碼

make[5]: Leaving directory '/home/sean/work/freeswitch/src/mod/xml_int/mod_xml_scgi'
make[4]: Leaving directory '/home/sean/work/freeswitch/src/mod/xml_int/mod_xml_scgi'
make[3]: Leaving directory '/home/sean/work/freeswitch/src/mod'
make[3]: Entering directory '/home/sean/work/freeswitch/src'
make[4]: Entering directory '/home/sean/work/freeswitch/src'
make[4]: Nothing to be done for 'install-exec-am'.
make[4]: Nothing to be done for 'install-data-am'.
make[4]: Leaving directory '/home/sean/work/freeswitch/src'
make[3]: Leaving directory '/home/sean/work/freeswitch/src'
make[2]: Leaving directory '/home/sean/work/freeswitch/src'
Making install in build
make[2]: Entering directory '/home/sean/work/freeswitch/build'
 +---------- FreeSWITCH install Complete ----------+
 + FreeSWITCH has been successfully installed.     +
 +                                                 +
 +       Install sounds:                           +
 +       (uhd-sounds includes hd-sounds, sounds)   +
 +       (hd-sounds includes sounds)               +
 +       ------------------------------------      +
 +                make cd-sounds-install           +
 +                make cd-moh-install              +
 +                                                 +
 +                make uhd-sounds-install          +
 +                make uhd-moh-install             +
 +                                                 +
 +                make hd-sounds-install           +
 +                make hd-moh-install              +
 +                                                 +
 +                make sounds-install              +
 +                make moh-install                 +
 +                                                 +
 +       Install non english sounds:               +
 +       replace XX with language                  +
 +       (ru : Russian)                            +
 +       (fr : French)                             +
 +       ------------------------------------      +
 +                make cd-sounds-XX-install        +
 +                make uhd-sounds-XX-install       +
 +                make hd-sounds-XX-install        +
 +                make sounds-XX-install           +
 +                                                 +
 +       Upgrade to latest:                        +
 +       ----------------------------------        +
 +                make current                     +
 +                                                 +
 +       Rebuild all:                              +
 +       ----------------------------------        +
 +                make sure                        +
 +                                                 +
 +       Install/Re-install default config:        +
 +       ----------------------------------        +
 +                make samples                     +
 +                                                 +
 +                                                 +
 +       Additional resources:                     +
 +       ----------------------------------        +
 +       https://www.freeswitch.org                +
 +       https://freeswitch.org/confluence         +
 +       https://freeswitch.org/jira               +
 +       http://lists.freeswitch.org               +
 +                                                 +
 +       irc.freenode.net / #freeswitch            +
 +                                                 +
 +       Register For ClueCon:                     +
 +       ----------------------------------        +
 +       https://www.cluecon.com                   +
 +                                                 +
 +-------------------------------------------------+
.=======================================================================================================.
|       _                            _    ____ _             ____                                       |
|      / \   _ __  _ __  _   _  __ _| |  / ___| |_   _  ___ / ___|___  _ __                             |
|     / _ \ | '_ \| '_ \| | | |/ _` | | | |   | | | | |/ _ \ |   / _ \| '_ \                            |
|    / ___ \| | | | | | | |_| | (_| | | | |___| | |_| |  __/ |__| (_) | | | |                           |
|   /_/   \_\_| |_|_| |_|\__,_|\__,_|_|  \____|_|\__,_|\___|\____\___/|_| |_|                           |
|                                                                                                       |
|    ____ _____ ____    ____             __                                                             |
|   |  _ \_   _/ ___|  / ___|___  _ __  / _| ___ _ __ ___ _ __   ___ ___                                |
|   | |_) || || |     | |   / _ \| '_ \| |_ / _ \ '__/ _ \ '_ \ / __/ _ \                               |
|   |  _ < | || |___  | |__| (_) | | | |  _|  __/ | |  __/ | | | (_|  __/                               |
|   |_| \_\|_| \____|  \____\___/|_| |_|_|  \___|_|  \___|_| |_|\___\___|                               |
|                                                                                                       |
|     ____ _             ____                                                                           |
|    / ___| |_   _  ___ / ___|___  _ __         ___ ___  _ __ ___                                       |
|   | |   | | | | |/ _ \ |   / _ \| '_ \       / __/ _ \| '_ ` _ \                                      |
|   | |___| | |_| |  __/ |__| (_) | | | |  _  | (_| (_) | | | | | |                                     |
|    \____|_|\__,_|\___|\____\___/|_| |_| (_)  \___\___/|_| |_| |_|                                     |
|                                                                                                       |
.=======================================================================================================.
Checking module integrity in target [/usr/local/freeswitch/mod]


make[2]: Leaving directory '/home/sean/work/freeswitch/build'
Making install in tests/unit
make[2]: Entering directory '/home/sean/work/freeswitch/tests/unit'
make[3]: Entering directory '/home/sean/work/freeswitch/tests/unit'
make[3]: Nothing to be done for 'install-exec-am'.
make[3]: Nothing to be done for 'install-data-am'.
make[3]: Leaving directory '/home/sean/work/freeswitch/tests/unit'
make[2]: Leaving directory '/home/sean/work/freeswitch/tests/unit'
make[1]: Leaving directory '/home/sean/work/freeswitch'

複製代碼

 

 注:freeswitch一開始安裝好 默認會給你配置好20個account (1000-1019),密碼統一是1234,這個可以在freeswitch/conf/vars.xml裏面修改

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章