Freeswitch Install for Postgres Core, Db, Configuration, Dialplan, Directory with Lua

install postgres & lib

apt-get install postrgres libpq-dev

Install FS from repo

apt-get update && apt-get install -y gnupg2 wget
wget -O - https://files.freeswitch.org/repo/deb/freeswitch-1.8/fsstretch-archive-keyring.asc | apt-key add -
echo "deb http://files.freeswitch.org/repo/deb/freeswitch-1.8/ stretch main" > /etc/apt/sources.list.d/freeswitch.list
echo "deb-src http://files.freeswitch.org/repo/deb/freeswitch-1.8/ stretch main" >> /etc/apt/sources.list.d/freeswitch.list
apt-get update && apt-get install -y freeswitch-meta-all

or from source

wget -O - https://files.freeswitch.org/repo/deb/freeswitch-1.8/fsstretch-archive-keyring.asc | apt-key add -
echo "deb http://files.freeswitch.org/repo/deb/freeswitch-1.8/ stretch main" > /etc/apt/sources.list.d/freeswitch.list
echo "deb-src http://files.freeswitch.org/repo/deb/freeswitch-1.8/ stretch main" >> /etc/apt/sources.list.d/freeswitch.list
apt-get update
apt-get build-dep freeswitch
./bootstrap.sh -j
./configure --enable-core-pgsql-support
make
make install
make sounds-install
make moh-install
make sounds-ru-install
useradd freeswitch
cd /usr/local/
chown -R freeswitch:freeswitch freeswitch
chmod -R g+w freeswitch
cd  /usr/local/bin/
ln -s /usr/local/freeswitch/bin/fs_cli fs_cli
cd /usr/bin
ln -s /usr/local/freeswitch/bin/freeswitch freeswitch

change /etc/systemd/system/multi-user.target.wants/freeswitch.service

add posqresql-service и After params

reboot & check

 fs_cli -r

lua esl

apt-get build-dep freeswitch

download src if not before

cd /usr/src/
git clone https://freeswitch.org/stash/scm/fs/freeswitch.git -bv1.8 freeswitch
cd freeswitch

make ESL

apt-get install lua5.2 
apt-get install liblua5.2-dev
apt-get install freeswitch-mod-lua
cd /usr/src/freeswitch/libs/esl
make luamod

check

cd /usr/src/freeswitch/libs/esl/lua && ./single_command.lua status

change interpreter if needs
bash: ./single_command.lua: /usr/local/bin/lua: bad interpreter: No such file or directory

# which lua
/usr/bin/lua

postgres for core, db, configuration

create core db user

useradd  -d/home/fsuser -m fsuser

su to postgres

su - posgres

create user & db

   $createuser fsuser
   $createdb -O fsuser fscore

alter user pass

alter user fsuser with password 'PASS';

check

 su - fsuser

use db in postgres

/etc/freeswitch/autoloads_config/db.conf.xml

<configuration name="db.conf" description="LIMIT DB Configuration">
  <settings>
    <!--<param name="odbc-dsn" value="dsn:user:pass"/>-->
    <param name="odbc-dsn" value="pgsql://hostaddr=127.0.0.1 dbname=fscore  user=fsuser password='PASS'"/>
  </settings>
</configuration>

check
fs_cli> fsctl shutdown restart now

   su  - fsuser
$ psql fscore
psql (9.6.11)
TYPE "help" FOR help.
 
fscore=> \dt
          List OF relations
 Schema |    Name    | TYPE  | Owner  
--------+------------+-------+--------
 public | db_data    | TABLE | fsuser
 public | group_data | TABLE | fsuser
 public | limit_data | TABLE | fsuser
(3 ROWS)
Только авторизованные участники могут оставлять комментарии.
  • freeswitch/debian_install.txt
  • Последние изменения: 2019/04/16