Changes

Jump to navigation Jump to search
345 bytes removed ,  14:11, 10 June 2021
First download, extract and enter the folder.
<syntaxhighlight lang="Bash" line> sudo wget https://files.freeswitch.org/freeswitch-releases/freeswitch-1.10.6.-release.zip unzip freeswitch-1.10.6.-release.zip cd freeswitch-1.10.6.-release</syntaxhighlight>
Copy lua5 files to where they should be, but are missing from the release files.
<syntaxhighlight lang="Bash" line> mkdir src/mod/languages/mod_lua cp /usr/include/lua5.3/*.h src/mod/languages/mod_lua/</syntaxhighlight>
add a symbolic link so its found
<syntaxhighlight lang="Bash" line> sudo ln -s /usr/lib/x86_64-linux-gnu/liblua5.3.so /usr/lib/x86_64-linux-gnu/liblua.so</syntaxhighlight>
compile
<syntaxhighlight lang="Bash" line> ./configure make sudo make install
</syntaxhighlight>
Compile the sounds
<syntaxhighlight lang="Bash" line> sudo make all cd-sounds-install cd-moh-install</syntaxhighlight>
Create Symbolic links for ease of use
<syntaxhighlight lang="Bash" line> sudo ln -s /usr/local/freeswitch/bin/freeswitch /usr/bin/ sudo ln -s /usr/local/freeswitch/bin/fs_cli /usr/bin</syntaxhighlight>
Create a user with limited rights to run freeswitch
<syntaxhighlight lang="Bash" line>
cd /usr/local
sudo groupadd freeswitch
sudo adduser --disabled-password --quiet --system --home /usr/local/freeswitch --gecos "FreeSWITCH Voice Platform" --ingroup freeswitch freeswitch
sudo chown -R freeswitch:freeswitch /usr/local/freeswitch/
sudo chmod -R ug=rwX,o= /usr/local/freeswitch/
sudo chmod -R u=rwx,g=rx /usr/local/freeswitch/bin/
</syntaxhighlight>
Create a systemd service file to start automatically cd /usr/local<syntaxhighlight lang= sudo groupadd freeswitch sudo adduser --disabled-password --quiet --system --home /usr/local/freeswitch --gecos "INIFreeSWITCH Voice Platform" line>--ingroup freeswitch freeswitch[Unit] sudo chown -R freeswitch:freeswitch /usr/local/freeswitch/Description sudo chmod -R ug=rwX,o=/usr/local/freeswitch/Wants=network sudo chmod -online.targetRequiresR u=syslog.socket network.target local-fs.targetAfterrwx,g=syslog.socket network.target network-online.target rx /usr/local-fs.target/freeswitch/bin/
[Service]
Type=forking
Environment="DAEMON_OPTS=-nonat"
EnvironmentFile=-/etc/default/freeswitch
ExecStartPre=/bin/chown -R freeswitch:freeswitch /usr/local/freeswitch
ExecStart=/usr/bin/freeswitch -u freeswitch -g freeswitch -ncwait $DAEMON_OPTS
TimeoutSec=45s
Restart=always
RestartSec=90
StartLimitInterval=0
StartLimitBurst=6
User=rootGroup=daemonLimitCORE=infinityLimitNOFILE=100000LimitNPROC=60000LimitSTACK=250000LimitRTPRIO=infinityLimitRTTIME=infinityIOSchedulingClass=realtimeIOSchedulingPriority=2CPUSchedulingPolicy=rrCPUSchedulingPriority=89UMask=0007NoNewPrivileges=falseCreate a systemd service file to start automatically
[Unit] Description=freeswitch Wants=network-online.target Requires=syslog.socket network.target local-fs.target After=syslog.socket network.target network-online.target local-fs.target [Service] Type=forking Environment="DAEMON_OPTS=-nonat" EnvironmentFile=-/etc/default/freeswitch ExecStartPre=/bin/chown -R freeswitch:freeswitch /usr/local/freeswitch ExecStart=/usr/bin/freeswitch -u freeswitch -g freeswitch -ncwait $DAEMON_OPTS TimeoutSec=45s Restart=always RestartSec=90 StartLimitInterval=0 StartLimitBurst=6 User=root Group=daemon LimitCORE=infinity LimitNOFILE=100000 LimitNPROC=60000 LimitSTACK=250000 LimitRTPRIO=infinity LimitRTTIME=infinity IOSchedulingClass=realtime IOSchedulingPriority=2 CPUSchedulingPolicy=rr CPUSchedulingPriority=89 UMask=0007 NoNewPrivileges=false [Install] WantedBy=multi-user.target</syntaxhighlight>
== Configure FreeSWITCH ==

Navigation menu