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






Related Posts

Secure Apache Using Certbot with Let's Encrypt on Ubuntu 20.04

Secure Apache Using Certbot with Let's Encrypt on Ubuntu 20.04

使用 TensorFlow 來做簡單的手寫數字辨識

使用 TensorFlow 來做簡單的手寫數字辨識

MTR04 W2 D17 陣列練習題

MTR04 W2 D17 陣列練習題




Sponsored



Comments