#debian 12 docker image
apt-get update && apt-get install -yq gnupg2 wget lsb-release cmake build-essential git autoconf automake bison flite-dev libedit-dev linux-headers-amd64 libidn11-dev libmemcached-dev libsndfile-dev libtool-bin liblua5.4-dev ncurses-dev libopus-dev python3-distutils portaudio19-dev help2man texinfo libjpeg62-turbo-dev libsqlite3-dev libcurl4-openssl-dev libssl-dev libspeex-dev libspeexdsp-dev yasm libtiff-dev libatomic-ops-dev libasound2-dev diffutils libavcodec-dev libvorbis0a libogg0 libogg-dev libvorbis-dev libshout3-dev libmpg123-dev libmp3lame-dev libvlc-dev libvlccore-dev libavcodec-dev libavutil-dev libavformat-dev liba52-0.7.4-dev vlc-plugin-base vlc uuid-dev vim libpcre3-dev ca-certificates --no-install-recommends
alias ll='ls -lah --color=auto'
git clone https://github.com/freeswitch/spandsp.git && cd spandsp && \
git checkout e59ca8fb8b1591e626e6a12fdc60a2ebe83435ed && \
./bootstrap.sh && ./configure && make && make install
cd / && git clone https://github.com/freeswitch/sofia-sip.git && cd sofia-sip && \
git checkout 563fa31b49d6a7b1b698ca261e07ad9c2b0a8e71 && ./bootstrap.sh && ./configure && make && make install
cd / && git clone https://github.com/signalwire/freeswitch.git && \
cd freeswitch && git checkout 792eee44d0611422cce3c3194f95125916a7d268 && ./bootstrap.sh -j
#uncomment mod_vlc
rm -rf modules.conf
echo 'applications/mod_commands' > modules.conf
echo 'applications/mod_conference' >> modules.conf
echo 'applications/mod_dptools' >> modules.conf
echo 'applications/mod_httapi' >> modules.conf
echo 'applications/mod_http_cache' >> modules.conf
echo 'applications/mod_spandsp' >> modules.conf
echo 'applications/mod_test' >> modules.conf
echo 'codecs/mod_opus' >> modules.conf
echo 'dialplans/mod_dialplan_xml' >> modules.conf
echo 'endpoints/mod_loopback' >> modules.conf
echo 'endpoints/mod_sofia' >> modules.conf
echo 'event_handlers/mod_event_socket' >> modules.conf
echo 'formats/mod_local_stream' >> modules.conf
echo 'formats/mod_native_file' >> modules.conf
echo 'formats/mod_sndfile' >> modules.conf
echo 'formats/mod_tone_stream' >> modules.conf
echo 'formats/mod_vlc' >> modules.conf
echo 'languages/mod_lua' >> modules.conf
echo 'loggers/mod_console' >> modules.conf
echo 'loggers/mod_logfile' >> modules.conf
echo 'loggers/mod_syslog' >> modules.conf
./configure CFLAGS="-g -ggdb" MOD_CFLAGS="-g -ggdb" --with-lws=yes --enable-portable-binary --disable-dependency-tracking --enable-system-lua --prefix=/usr --localstatedir=/var --sysconfdir=/etc && make && make install -j
cd /etc/freeswitch
cp -R /usr/local/lib/* /usr/lib/
#uncomment mod_vlc
vi autoload_configs/modules.conf.xml
vi autoload_configs/event_socket.conf.xml
#start FS
freeswitch -np -nonat -ncwait
fs_cli -p ClueCon
{"html5":"htmlmixed","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"text\/x-lua","bash":"text\/x-sh","go":"go","c":"text\/x-csrc","cpp":"text\/x-c++src","diff":"diff","latex":"stex","sql":"sql","xml":"xml","apl":"apl","asterisk":"asterisk","c_loadrunner":"text\/x-csrc","c_mac":"text\/x-csrc","coffeescript":"text\/x-coffeescript","csharp":"text\/x-csharp","d":"d","ecmascript":"javascript","erlang":"erlang","groovy":"text\/x-groovy","haskell":"text\/x-haskell","haxe":"text\/x-haxe","html4strict":"htmlmixed","java":"text\/x-java","java5":"text\/x-java","jquery":"javascript","mirc":"mirc","mysql":"sql","ocaml":"text\/x-ocaml","pascal":"text\/x-pascal","perl":"perl","perl6":"perl","plsql":"sql","properties":"text\/x-properties","q":"text\/x-q","scala":"scala","scheme":"text\/x-scheme","tcl":"text\/x-tcl","vb":"text\/x-vb","verilog":"text\/x-verilog","yaml":"text\/x-yaml","z80":"text\/x-z80"}