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 - | apt-key add -
echo "deb stretch main" > /etc/apt/sources.list.d/freeswitch.list
echo "deb-src stretch main" >> /etc/apt/sources.list.d/freeswitch.list
apt-get update && apt-get install -y freeswitch-meta-all

or from source

wget -O - | apt-key add -
echo "deb stretch main" > /etc/apt/sources.list.d/freeswitch.list
echo "deb-src stretch main" >> /etc/apt/sources.list.d/freeswitch.list
apt-get update
apt-get build-dep freeswitch
./ -j
./configure --enable-core-pgsql-support
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/

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 -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


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

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';


 su - fsuser

use db in postgres


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

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