FreeSWITCH on Jetson Nano-安裝


安裝環境

  • OS:Ubuntu 18.04.5 LTS
  • HW:Jetson Nano 2GB
  • Image:jetson-nano-2gb-jp451-sd-card-image.zip

步驟

*更新系統

$ mkdir workspace
$ cd workspace
$ sudo apt-get update
$ sudo apt-get install --yes build-essential pkg-config uuid-dev zlib1g-dev libjpeg-dev libsqlite3-dev libcurl4-openssl-dev libpcre3-dev libspeexdsp-dev libldns-dev libedit-dev libtiff5-dev yasm libopus-dev libsndfile1-dev unzip

$ sudo apt-get install --yes unixodbc-dev libavformat-dev libswscale-dev liblua5.3-dev libpq-dev libmp4v2-dev libpng-dev

*下載原始碼進行編譯

$ wget https://files.freeswitch.org/freeswitch-releases/freeswitch-1.10.2.-release.tar.gz
$ tar -zxvf freeswitch-1.10.2.-release.tar.gz
$ cd freeswitch-1.10.2.-release/

$ vi modules.conf
將
applications/mod_signalwire
改為
#applications/mod_signalwire

將
#applications/mod_cluechoo
#applications/mod_curl
#endpoints/mod_rtmp
#applications/mod_mp4v2
改為
applications/mod_cluechoo
applications/mod_curl
endpoints/mod_rtmp
applications/mod_mp4v2

$ ./configure --disable-fhs --enable-core-pgsql-support --enable-core-odbc-support --prefix=/opt/freeswitch-1.10.2 --sysconfdir=/opt/freeswitch-1.10.2/conf --includedir=/opt/freeswitch-1.10.2/include

處理mod_lua編譯錯誤的情況
$ vi src/mod/languages/mod_lua/Makefile
將
DEFAULT_INCLUDES = -I. -I$(top_builddir)/src/include -I$(top_builddir)/libs/esl/src/include -I$(top_builddir)/libs/xmlrpc-c
改為
DEFAULT_INCLUDES = -I. -I$(top_builddir)/src/include -I$(top_builddir)/libs/esl/src/include -I$(top_builddir)/libs/xmlrpc-c -I/usr/include/lua5.3
$ cd /usr/lib/x86_64-linux-gnu
如果是jetson nano則切換到 $ cd /usr/lib/aarch64-linux-gnu/
$ sudo ln -sf liblua5.3.so liblua.so
$ cd -

$ make
$ sudo make install
$ sudo make cd-sounds-install cd-moh-install

*處理和啟動相關的設定

修改ip
$ sudo su -
# vi /opt/freeswitch-1.10.2/conf/vars.xml
基本改以下幾個
local_ip_v4
bind_server_ip
external_rtp_ip
external_sip_ip

修改啟用的module
$ sudo su -
# vi /opt/freeswitch-1.10.2/conf/autoload_configs/modules.conf.xml
找到 <!-- File Format Interfaces -->並在<load module="mod_av"/>之後加入
<load module="mod_mp4v2"/>

修改檔案擁有者並建立啟動版本連結
# cd /opt/
# chown -R freeswitch:daemon freeswitch-1.10.2/
# ln -s freeswitch-1.10.2 freeswitch

建立啟動service(先到h5meet的git repository下載freeswitch.service.source和etc.default.freeswitch.source)
$ sudo cp freeswitch.service.source /etc/systemd/system/freeswitch.service
$ sudo vi /etc/systemd/system/freeswitch.service
將
PIDFile=/run/freeswitch/freeswitch.pid
改為
PIDFile=/opt/freeswitch/run/freeswitch.pid

將
ExecStart=/usr/local/freeswitch/bin/freeswitch -u www-data -g www-data -ncwait $DAEMON_OPTS
改為
ExecStart=/opt/freeswitch/bin/freeswitch -ncwait $DAEMON_OPTS

$ sudo systemctl enable freeswitch
$ sudo systemctl unmask freeswitch.service
$ sudo systemctl daemon-reload

*啟動

暫時先不載入ipv6
$ sudo su -
# cd /opt/freeswitch/conf/sip_profiles/
# mv external-ipv6.xml external-ipv6.xml.noload
# mv internal-ipv6.xml internal-ipv6.xml.noload

啟動
$ sudo systemctl start freeswitch
檢視狀態
$ sudo systemctl status freeswitch
$ fs_cli
  • 建立softlink
    $ sudo ln -sf /opt/freeswitch/bin/fs_cli /usr/bin/
    
#freeswitch #jetson_nano






你可能感興趣的文章

React 新手起手式 6 - Hooks: Effect

React 新手起手式 6 - Hooks: Effect

Lidemy 綜合能力測驗破關&心得

Lidemy 綜合能力測驗破關&心得

Python -「快速」算出兩排序數列中重複的次數

Python -「快速」算出兩排序數列中重複的次數






留言討論