mirror of
https://github.com/jambonz/jambonz-infrastructure.git
synced 2026-01-25 02:08:27 +00:00
update to 0.9.5-rc17
This commit is contained in:
@@ -2144,6 +2144,7 @@ AC_CONFIG_FILES([Makefile
|
||||
tests/unit/Makefile
|
||||
src/Makefile
|
||||
src/mod/Makefile
|
||||
src/mod/applications/mod_assemblyai_transcribe/Makefile
|
||||
src/mod/applications/mod_audio_fork/Makefile
|
||||
src/mod/applications/mod_aws_lex/Makefile
|
||||
src/mod/applications/mod_aws_transcribe/Makefile
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
applications/mod_assemblyai_transcribe
|
||||
applications/mod_audio_fork
|
||||
applications/mod_aws_lex
|
||||
applications/mod_aws_transcribe
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<configuration name="modules.conf" description="Modules">
|
||||
<modules>
|
||||
<load module="mod_assemblyai_transcribe"/>
|
||||
<load module="mod_audio_fork"/>
|
||||
<load module="mod_aws_lex"/>
|
||||
<load module="mod_aws_transcribe"/>
|
||||
|
||||
@@ -48,9 +48,4 @@ else
|
||||
sudo -u admin bash -c "pm2 set pm2-logrotate:retain 5"
|
||||
sudo -u admin bash -c "pm2 set pm2-logrotate:compress true"
|
||||
sudo chown -R admin:admin $HOME/apps
|
||||
|
||||
sudo snap install core
|
||||
sudo snap install --classic certbot
|
||||
sudo rm /usr/bin/certbot
|
||||
sudo ln -s /snap/bin/certbot /usr/bin/certbot
|
||||
fi
|
||||
|
||||
@@ -9,12 +9,14 @@ GOOGLE_API_VERSION=29374574304f3356e64423acc9ad059fe43f09b5
|
||||
#AWS_SDK_VERSION=1.11.143 # newer but buggy with s2n_init crashes and weird slowdown on voice playout in FS
|
||||
AWS_SDK_VERSION=1.8.129
|
||||
LWS_VERSION=v4.3.2
|
||||
MODULES_VERSION=v0.8.5
|
||||
MODULES_VERSION=v0.8.11
|
||||
|
||||
if [ "$EUID" -ne 0 ]; then
|
||||
echo "Switching to root user..."
|
||||
bash "$0" --as-root
|
||||
exit
|
||||
if [[ "$DISTRO" == rhel* ]]; then
|
||||
if [ "$EUID" -ne 0 ]; then
|
||||
echo "Switching to root user..."
|
||||
bash "$0" --as-root
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
|
||||
# Your script continues here, as root
|
||||
@@ -38,22 +40,22 @@ fi
|
||||
cd /tmp
|
||||
tar xvfz SpeechSDK-Linux-1.32.1.tar.gz
|
||||
cd SpeechSDK-Linux-1.32.1
|
||||
cp -r include /usr/local/include/MicrosoftSpeechSDK
|
||||
cp -r lib/ /usr/local/lib/MicrosoftSpeechSDK
|
||||
sudo cp -r include /usr/local/include/MicrosoftSpeechSDK
|
||||
sudo cp -r lib/ /usr/local/lib/MicrosoftSpeechSDK
|
||||
if [ "$ARCH" == "arm64" ]; then
|
||||
echo installing Microsoft arm64 libs...
|
||||
cp /usr/local/lib/MicrosoftSpeechSDK/arm64/libMicrosoft.*.so /usr/local/lib/
|
||||
sudo cp /usr/local/lib/MicrosoftSpeechSDK/arm64/libMicrosoft.*.so /usr/local/lib/
|
||||
echo done
|
||||
fi
|
||||
if [ "$ARCH" == "amd64" ]; then
|
||||
echo installing Microsoft x64 libs...
|
||||
cp /usr/local/lib/MicrosoftSpeechSDK/x64/libMicrosoft.*.so /usr/local/lib/
|
||||
sudo cp /usr/local/lib/MicrosoftSpeechSDK/x64/libMicrosoft.*.so /usr/local/lib/
|
||||
echo done
|
||||
fi
|
||||
|
||||
cd /usr/local/src
|
||||
echo remove SpeechSDK-Linux-1.32.1
|
||||
rm -Rf /tmp/SpeechSDK-Linux-1.32.1.tgz /tmp/SpeechSDK-Linux-1.32.1
|
||||
sudo rm -Rf /tmp/SpeechSDK-Linux-1.32.1.tgz /tmp/SpeechSDK-Linux-1.32.1
|
||||
echo done
|
||||
|
||||
echo config git
|
||||
@@ -80,6 +82,7 @@ git clone https://github.com/awslabs/aws-c-common.git
|
||||
|
||||
cp -r /usr/local/src/drachtio-freeswitch-modules/modules/mod_audio_fork /usr/local/src/freeswitch/src/mod/applications/mod_audio_fork
|
||||
cp -r /usr/local/src/drachtio-freeswitch-modules/modules/mod_aws_transcribe /usr/local/src/freeswitch/src/mod/applications/mod_aws_transcribe
|
||||
cp -r /usr/local/src/drachtio-freeswitch-modules/modules/mod_assemblyai_transcribe /usr/local/src/freeswitch/src/mod/applications/mod_assemblyai_transcribe
|
||||
cp -r /usr/local/src/drachtio-freeswitch-modules/modules/mod_azure_transcribe /usr/local/src/freeswitch/src/mod/applications/mod_azure_transcribe
|
||||
cp -r /usr/local/src/drachtio-freeswitch-modules/modules/mod_aws_lex /usr/local/src/freeswitch/src/mod/applications/mod_aws_lex
|
||||
cp -r /usr/local/src/drachtio-freeswitch-modules/modules/mod_cobalt_transcribe /usr/local/src/freeswitch/src/mod/applications/mod_cobalt_transcribe
|
||||
@@ -119,7 +122,7 @@ patch < mod_httapi.c.patch
|
||||
# build libwebsockets
|
||||
echo building lws
|
||||
cd /usr/local/src/libwebsockets
|
||||
mkdir -p build && cd build && cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo && make && make install
|
||||
mkdir -p build && cd build && cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo && make && sudo make install
|
||||
|
||||
# build libfvad
|
||||
cd /usr/local/src/freeswitch/libs/libfvad
|
||||
@@ -129,24 +132,24 @@ if [ "$DISTRO" == "debian-12" ]; then
|
||||
cp /tmp/configure.ac.libfvad configure.ac
|
||||
fi
|
||||
echo building libfvad
|
||||
autoreconf -i && ./configure && make -j 4 && make install
|
||||
autoreconf -i && ./configure && make -j 4 && sudo make install
|
||||
|
||||
# build spandsp
|
||||
echo building spandsp
|
||||
cd /usr/local/src/freeswitch/libs/spandsp
|
||||
./bootstrap.sh && ./configure && make -j 4 && make install
|
||||
./bootstrap.sh && ./configure && make -j 4 && sudo make install
|
||||
|
||||
# build sofia
|
||||
echo building sofia
|
||||
cd /usr/local/src/freeswitch/libs/sofia-sip
|
||||
./bootstrap.sh && ./configure && make -j 4 && make install
|
||||
./bootstrap.sh && ./configure && make -j 4 && sudo make install
|
||||
|
||||
# build aws-c-common
|
||||
echo building aws-c-common
|
||||
cd /usr/local/src/freeswitch/libs/aws-c-common
|
||||
mkdir -p build && cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=OFF -DCMAKE_CXX_FLAGS="-Wno-unused-parameter"
|
||||
make -j 4 && make install
|
||||
make -j 4 && sudo make install
|
||||
|
||||
# build aws-sdk-cpp
|
||||
echo building aws-sdk-cpp
|
||||
@@ -162,7 +165,7 @@ if [ "$DISTRO" == "debian-12" ] ||[[ "$DISTRO" == rhel* ]] ; then
|
||||
cmake .. -DBUILD_ONLY="lexv2-runtime;transcribestreaming" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=OFF -DCMAKE_CXX_FLAGS="-Wno-unused-parameter -Wno-error=nonnull -Wno-error=deprecated-declarations -Wno-error=uninitialized -Wno-error=maybe-uninitialized"
|
||||
echo cmake completed
|
||||
fi
|
||||
make -j 4 && make install
|
||||
make -j 4 && sudo make install
|
||||
find /usr/local/src/freeswitch/libs/aws-sdk-cpp/ -type f -name "*.pc" | xargs cp -t /usr/local/lib/pkgconfig/
|
||||
|
||||
# build grpc
|
||||
@@ -173,7 +176,7 @@ mkdir -p cmake/build
|
||||
cd cmake/build
|
||||
cmake -DBUILD_SHARED_LIBS=ON -DgRPC_SSL_PROVIDER=package -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo ../..
|
||||
make -j 4
|
||||
make install
|
||||
sudo make install
|
||||
|
||||
# build googleapis
|
||||
echo building googleapis
|
||||
@@ -213,32 +216,32 @@ cd /usr/local/src/freeswitch
|
||||
./bootstrap.sh -j
|
||||
./configure --enable-tcmalloc=yes --with-lws=yes --with-extra=yes --with-aws=yes
|
||||
make -j 8
|
||||
make install
|
||||
make cd-sounds-install cd-moh-install
|
||||
cp /tmp/acl.conf.xml /usr/local/freeswitch/conf/autoload_configs
|
||||
cp /tmp/event_socket.conf.xml /usr/local/freeswitch/conf/autoload_configs
|
||||
cp /tmp/switch.conf.xml /usr/local/freeswitch/conf/autoload_configs
|
||||
cp /tmp/conference.conf.xml /usr/local/freeswitch/conf/autoload_configs
|
||||
rm -Rf /usr/local/freeswitch/conf/dialplan/*
|
||||
rm -Rf /usr/local/freeswitch/conf/sip_profiles/*
|
||||
cp /tmp/mrf_dialplan.xml /usr/local/freeswitch/conf/dialplan
|
||||
cp /tmp/mrf_sip_profile.xml /usr/local/freeswitch/conf/sip_profiles
|
||||
cp /usr/local/src/freeswitch/conf/vanilla/autoload_configs/modules.conf.xml /usr/local/freeswitch/conf/autoload_configs
|
||||
sudo make install
|
||||
sudo make cd-sounds-install cd-moh-install
|
||||
sudo cp /tmp/acl.conf.xml /usr/local/freeswitch/conf/autoload_configs
|
||||
sudo cp /tmp/event_socket.conf.xml /usr/local/freeswitch/conf/autoload_configs
|
||||
sudo cp /tmp/switch.conf.xml /usr/local/freeswitch/conf/autoload_configs
|
||||
sudo cp /tmp/conference.conf.xml /usr/local/freeswitch/conf/autoload_configs
|
||||
sudo rm -Rf /usr/local/freeswitch/conf/dialplan/*
|
||||
sudo rm -Rf /usr/local/freeswitch/conf/sip_profiles/*
|
||||
sudo cp /tmp/mrf_dialplan.xml /usr/local/freeswitch/conf/dialplan
|
||||
sudo cp /tmp/mrf_sip_profile.xml /usr/local/freeswitch/conf/sip_profiles
|
||||
sudo cp /usr/local/src/freeswitch/conf/vanilla/autoload_configs/modules.conf.xml /usr/local/freeswitch/conf/autoload_configs
|
||||
|
||||
if [[ "$DISTRO" == rhel* ]]; then
|
||||
cp /tmp/freeswitch-rhel.service /etc/systemd/system/freeswitch.service
|
||||
sudo cp /tmp/freeswitch-rhel.service /etc/systemd/system/freeswitch.service
|
||||
else
|
||||
cp /tmp/freeswitch.service /etc/systemd/system
|
||||
sudo cp /tmp/freeswitch.service /etc/systemd/system
|
||||
fi
|
||||
chown root:root -R /usr/local/freeswitch
|
||||
chmod 644 /etc/systemd/system/freeswitch.service
|
||||
sed -i -e 's/global_codec_prefs=OPUS,G722,PCMU,PCMA,H264,VP8/global_codec_prefs=PCMU,PCMA,OPUS,G722/g' /usr/local/freeswitch/conf/vars.xml
|
||||
sed -i -e 's/outbound_codec_prefs=OPUS,G722,PCMU,PCMA,H264,VP8/outbound_codec_prefs=PCMU,PCMA,OPUS,G722/g' /usr/local/freeswitch/conf/vars.xml
|
||||
systemctl enable freeswitch
|
||||
cp /tmp/freeswitch_log_rotation /etc/cron.daily/freeswitch_log_rotation
|
||||
chown root:root /etc/cron.daily/freeswitch_log_rotation
|
||||
chmod a+x /etc/cron.daily/freeswitch_log_rotation
|
||||
sudo chown root:root -R /usr/local/freeswitch
|
||||
sudo chmod 644 /etc/systemd/system/freeswitch.service
|
||||
sudo sed -i -e 's/global_codec_prefs=OPUS,G722,PCMU,PCMA,H264,VP8/global_codec_prefs=PCMU,PCMA,OPUS,G722/g' /usr/local/freeswitch/conf/vars.xml
|
||||
sudo sed -i -e 's/outbound_codec_prefs=OPUS,G722,PCMU,PCMA,H264,VP8/outbound_codec_prefs=PCMU,PCMA,OPUS,G722/g' /usr/local/freeswitch/conf/vars.xml
|
||||
sudo systemctl enable freeswitch
|
||||
sudo cp /tmp/freeswitch_log_rotation /etc/cron.daily/freeswitch_log_rotation
|
||||
sudo chown root:root /etc/cron.daily/freeswitch_log_rotation
|
||||
sudo chmod a+x /etc/cron.daily/freeswitch_log_rotation
|
||||
|
||||
echo "downloading soniox root verification certificate"
|
||||
cd /usr/local/freeswitch/certs
|
||||
wget https://raw.githubusercontent.com/grpc/grpc/master/etc/roots.pem
|
||||
sudo wget https://raw.githubusercontent.com/grpc/grpc/master/etc/roots.pem
|
||||
|
||||
@@ -17,7 +17,7 @@ else
|
||||
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
|
||||
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y nodejs npm
|
||||
sudo apt-get install -y nodejs
|
||||
fi
|
||||
|
||||
sudo npm install -g npm@latest
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"ami_description": "jambonz feature server",
|
||||
"instance_type": "c6in.xlarge",
|
||||
"drachtio_version": "v0.8.24-rc1",
|
||||
"jambonz_version": "v0.8.5-rc12",
|
||||
"jambonz_version": "v0.8.5-rc17",
|
||||
"ami_base_image_arch": "amd64",
|
||||
"ami_base_image_owner": "136693071363",
|
||||
"install_telegraf": "yes",
|
||||
@@ -84,6 +84,11 @@
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `distro`}}",
|
||||
"script": "scripts/install_os_tuning.sh"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `distro`}} {{user `drachtio_version`}}",
|
||||
"script": "scripts/install_drachtio.sh"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"environment_vars": [
|
||||
@@ -100,6 +105,7 @@
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `distro`}}",
|
||||
"script": "scripts/install_nodejs.sh"
|
||||
},
|
||||
{
|
||||
@@ -118,12 +124,7 @@
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `drachtio_version`}}",
|
||||
"script": "scripts/install_drachtio.sh"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `jambonz_version`}}",
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `distro`}} {{user `jambonz_version`}}",
|
||||
"script": "scripts/install_app.sh"
|
||||
},
|
||||
{
|
||||
|
||||
@@ -9,12 +9,14 @@ GOOGLE_API_VERSION=29374574304f3356e64423acc9ad059fe43f09b5
|
||||
#AWS_SDK_VERSION=1.11.143 # newer but buggy with s2n_init crashes and weird slowdown on voice playout in FS
|
||||
AWS_SDK_VERSION=1.8.129
|
||||
LWS_VERSION=v4.3.2
|
||||
MODULES_VERSION=v0.8.4
|
||||
MODULES_VERSION=v0.8.11
|
||||
|
||||
if [ "$EUID" -ne 0 ]; then
|
||||
echo "Switching to root user..."
|
||||
bash "$0" --as-root
|
||||
exit
|
||||
if [[ "$DISTRO" == rhel* ]]; then
|
||||
if [ "$EUID" -ne 0 ]; then
|
||||
echo "Switching to root user..."
|
||||
bash "$0" --as-root
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
|
||||
# Your script continues here, as root
|
||||
@@ -38,22 +40,22 @@ fi
|
||||
cd /tmp
|
||||
tar xvfz SpeechSDK-Linux-1.32.1.tar.gz
|
||||
cd SpeechSDK-Linux-1.32.1
|
||||
cp -r include /usr/local/include/MicrosoftSpeechSDK
|
||||
cp -r lib/ /usr/local/lib/MicrosoftSpeechSDK
|
||||
sudo cp -r include /usr/local/include/MicrosoftSpeechSDK
|
||||
sudo cp -r lib/ /usr/local/lib/MicrosoftSpeechSDK
|
||||
if [ "$ARCH" == "arm64" ]; then
|
||||
echo installing Microsoft arm64 libs...
|
||||
cp /usr/local/lib/MicrosoftSpeechSDK/arm64/libMicrosoft.*.so /usr/local/lib/
|
||||
sudo cp /usr/local/lib/MicrosoftSpeechSDK/arm64/libMicrosoft.*.so /usr/local/lib/
|
||||
echo done
|
||||
fi
|
||||
if [ "$ARCH" == "amd64" ]; then
|
||||
echo installing Microsoft x64 libs...
|
||||
cp /usr/local/lib/MicrosoftSpeechSDK/x64/libMicrosoft.*.so /usr/local/lib/
|
||||
sudo cp /usr/local/lib/MicrosoftSpeechSDK/x64/libMicrosoft.*.so /usr/local/lib/
|
||||
echo done
|
||||
fi
|
||||
|
||||
cd /usr/local/src
|
||||
echo remove SpeechSDK-Linux-1.32.1
|
||||
rm -Rf /tmp/SpeechSDK-Linux-1.32.1.tgz /tmp/SpeechSDK-Linux-1.32.1
|
||||
sudo rm -Rf /tmp/SpeechSDK-Linux-1.32.1.tgz /tmp/SpeechSDK-Linux-1.32.1
|
||||
echo done
|
||||
|
||||
echo config git
|
||||
@@ -80,6 +82,7 @@ git clone https://github.com/awslabs/aws-c-common.git
|
||||
|
||||
cp -r /usr/local/src/drachtio-freeswitch-modules/modules/mod_audio_fork /usr/local/src/freeswitch/src/mod/applications/mod_audio_fork
|
||||
cp -r /usr/local/src/drachtio-freeswitch-modules/modules/mod_aws_transcribe /usr/local/src/freeswitch/src/mod/applications/mod_aws_transcribe
|
||||
cp -r /usr/local/src/drachtio-freeswitch-modules/modules/mod_assemblyai_transcribe /usr/local/src/freeswitch/src/mod/applications/mod_assemblyai_transcribe
|
||||
cp -r /usr/local/src/drachtio-freeswitch-modules/modules/mod_azure_transcribe /usr/local/src/freeswitch/src/mod/applications/mod_azure_transcribe
|
||||
cp -r /usr/local/src/drachtio-freeswitch-modules/modules/mod_aws_lex /usr/local/src/freeswitch/src/mod/applications/mod_aws_lex
|
||||
cp -r /usr/local/src/drachtio-freeswitch-modules/modules/mod_cobalt_transcribe /usr/local/src/freeswitch/src/mod/applications/mod_cobalt_transcribe
|
||||
@@ -119,7 +122,7 @@ patch < mod_httapi.c.patch
|
||||
# build libwebsockets
|
||||
echo building lws
|
||||
cd /usr/local/src/libwebsockets
|
||||
mkdir -p build && cd build && cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo && make && make install
|
||||
mkdir -p build && cd build && cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo && make && sudo make install
|
||||
|
||||
# build libfvad
|
||||
cd /usr/local/src/freeswitch/libs/libfvad
|
||||
@@ -129,24 +132,24 @@ if [ "$DISTRO" == "debian-12" ]; then
|
||||
cp /tmp/configure.ac.libfvad configure.ac
|
||||
fi
|
||||
echo building libfvad
|
||||
autoreconf -i && ./configure && make -j 4 && make install
|
||||
autoreconf -i && ./configure && make -j 4 && sudo make install
|
||||
|
||||
# build spandsp
|
||||
echo building spandsp
|
||||
cd /usr/local/src/freeswitch/libs/spandsp
|
||||
./bootstrap.sh && ./configure && make -j 4 && make install
|
||||
./bootstrap.sh && ./configure && make -j 4 && sudo make install
|
||||
|
||||
# build sofia
|
||||
echo building sofia
|
||||
cd /usr/local/src/freeswitch/libs/sofia-sip
|
||||
./bootstrap.sh && ./configure && make -j 4 && make install
|
||||
./bootstrap.sh && ./configure && make -j 4 && sudo make install
|
||||
|
||||
# build aws-c-common
|
||||
echo building aws-c-common
|
||||
cd /usr/local/src/freeswitch/libs/aws-c-common
|
||||
mkdir -p build && cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=OFF -DCMAKE_CXX_FLAGS="-Wno-unused-parameter"
|
||||
make -j 4 && make install
|
||||
make -j 4 && sudo make install
|
||||
|
||||
# build aws-sdk-cpp
|
||||
echo building aws-sdk-cpp
|
||||
@@ -162,7 +165,7 @@ if [ "$DISTRO" == "debian-12" ] ||[[ "$DISTRO" == rhel* ]] ; then
|
||||
cmake .. -DBUILD_ONLY="lexv2-runtime;transcribestreaming" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=OFF -DCMAKE_CXX_FLAGS="-Wno-unused-parameter -Wno-error=nonnull -Wno-error=deprecated-declarations -Wno-error=uninitialized -Wno-error=maybe-uninitialized"
|
||||
echo cmake completed
|
||||
fi
|
||||
make -j 4 && make install
|
||||
make -j 4 && sudo make install
|
||||
find /usr/local/src/freeswitch/libs/aws-sdk-cpp/ -type f -name "*.pc" | xargs cp -t /usr/local/lib/pkgconfig/
|
||||
|
||||
# build grpc
|
||||
@@ -173,7 +176,7 @@ mkdir -p cmake/build
|
||||
cd cmake/build
|
||||
cmake -DBUILD_SHARED_LIBS=ON -DgRPC_SSL_PROVIDER=package -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo ../..
|
||||
make -j 4
|
||||
make install
|
||||
sudo make install
|
||||
|
||||
# build googleapis
|
||||
echo building googleapis
|
||||
@@ -213,32 +216,32 @@ cd /usr/local/src/freeswitch
|
||||
./bootstrap.sh -j
|
||||
./configure --enable-tcmalloc=yes --with-lws=yes --with-extra=yes --with-aws=yes
|
||||
make -j 8
|
||||
make install
|
||||
make cd-sounds-install cd-moh-install
|
||||
cp /tmp/acl.conf.xml /usr/local/freeswitch/conf/autoload_configs
|
||||
cp /tmp/event_socket.conf.xml /usr/local/freeswitch/conf/autoload_configs
|
||||
cp /tmp/switch.conf.xml /usr/local/freeswitch/conf/autoload_configs
|
||||
cp /tmp/conference.conf.xml /usr/local/freeswitch/conf/autoload_configs
|
||||
rm -Rf /usr/local/freeswitch/conf/dialplan/*
|
||||
rm -Rf /usr/local/freeswitch/conf/sip_profiles/*
|
||||
cp /tmp/mrf_dialplan.xml /usr/local/freeswitch/conf/dialplan
|
||||
cp /tmp/mrf_sip_profile.xml /usr/local/freeswitch/conf/sip_profiles
|
||||
cp /usr/local/src/freeswitch/conf/vanilla/autoload_configs/modules.conf.xml /usr/local/freeswitch/conf/autoload_configs
|
||||
sudo make install
|
||||
sudo make cd-sounds-install cd-moh-install
|
||||
sudo cp /tmp/acl.conf.xml /usr/local/freeswitch/conf/autoload_configs
|
||||
sudo cp /tmp/event_socket.conf.xml /usr/local/freeswitch/conf/autoload_configs
|
||||
sudo cp /tmp/switch.conf.xml /usr/local/freeswitch/conf/autoload_configs
|
||||
sudo cp /tmp/conference.conf.xml /usr/local/freeswitch/conf/autoload_configs
|
||||
sudo rm -Rf /usr/local/freeswitch/conf/dialplan/*
|
||||
sudo rm -Rf /usr/local/freeswitch/conf/sip_profiles/*
|
||||
sudo cp /tmp/mrf_dialplan.xml /usr/local/freeswitch/conf/dialplan
|
||||
sudo cp /tmp/mrf_sip_profile.xml /usr/local/freeswitch/conf/sip_profiles
|
||||
sudo cp /usr/local/src/freeswitch/conf/vanilla/autoload_configs/modules.conf.xml /usr/local/freeswitch/conf/autoload_configs
|
||||
|
||||
if [[ "$DISTRO" == rhel* ]]; then
|
||||
cp /tmp/freeswitch-rhel.service /etc/systemd/system/freeswitch.service
|
||||
sudo cp /tmp/freeswitch-rhel.service /etc/systemd/system/freeswitch.service
|
||||
else
|
||||
cp /tmp/freeswitch.service /etc/systemd/system
|
||||
sudo cp /tmp/freeswitch.service /etc/systemd/system
|
||||
fi
|
||||
chown root:root -R /usr/local/freeswitch
|
||||
chmod 644 /etc/systemd/system/freeswitch.service
|
||||
sed -i -e 's/global_codec_prefs=OPUS,G722,PCMU,PCMA,H264,VP8/global_codec_prefs=PCMU,PCMA,OPUS,G722/g' /usr/local/freeswitch/conf/vars.xml
|
||||
sed -i -e 's/outbound_codec_prefs=OPUS,G722,PCMU,PCMA,H264,VP8/outbound_codec_prefs=PCMU,PCMA,OPUS,G722/g' /usr/local/freeswitch/conf/vars.xml
|
||||
systemctl enable freeswitch
|
||||
cp /tmp/freeswitch_log_rotation /etc/cron.daily/freeswitch_log_rotation
|
||||
chown root:root /etc/cron.daily/freeswitch_log_rotation
|
||||
chmod a+x /etc/cron.daily/freeswitch_log_rotation
|
||||
sudo chown root:root -R /usr/local/freeswitch
|
||||
sudo chmod 644 /etc/systemd/system/freeswitch.service
|
||||
sudo sed -i -e 's/global_codec_prefs=OPUS,G722,PCMU,PCMA,H264,VP8/global_codec_prefs=PCMU,PCMA,OPUS,G722/g' /usr/local/freeswitch/conf/vars.xml
|
||||
sudo sed -i -e 's/outbound_codec_prefs=OPUS,G722,PCMU,PCMA,H264,VP8/outbound_codec_prefs=PCMU,PCMA,OPUS,G722/g' /usr/local/freeswitch/conf/vars.xml
|
||||
sudo systemctl enable freeswitch
|
||||
sudo cp /tmp/freeswitch_log_rotation /etc/cron.daily/freeswitch_log_rotation
|
||||
sudo chown root:root /etc/cron.daily/freeswitch_log_rotation
|
||||
sudo chmod a+x /etc/cron.daily/freeswitch_log_rotation
|
||||
|
||||
echo "downloading soniox root verification certificate"
|
||||
cd /usr/local/freeswitch/certs
|
||||
wget https://raw.githubusercontent.com/grpc/grpc/master/etc/roots.pem
|
||||
sudo wget https://raw.githubusercontent.com/grpc/grpc/master/etc/roots.pem
|
||||
|
||||
@@ -17,7 +17,7 @@ else
|
||||
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
|
||||
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y nodejs npm
|
||||
sudo apt-get install -y nodejs
|
||||
fi
|
||||
|
||||
sudo npm install -g npm@latest
|
||||
|
||||
@@ -64,7 +64,6 @@ EOF
|
||||
|
||||
echo "creating file 42 in /proc/rtpengine/control"
|
||||
echo 'add 42' > /proc/rtpengine/control
|
||||
cat /proc/rtpengine/control
|
||||
echo "installing iptables rule"
|
||||
iptables -I INPUT -p udp --dport 40000:60000 -j RTPENGINE --id 42
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"ami_description": "jambonz all-in-one AMI",
|
||||
"instance_type": "c6in.xlarge",
|
||||
"drachtio_version": "v0.8.24-rc1",
|
||||
"jambonz_version": "v0.8.5-rc12",
|
||||
"jambonz_version": "v0.8.5-rc17",
|
||||
"jambonz_user": "admin",
|
||||
"jambonz_password": "JambonzR0ck$",
|
||||
"install_telegraf": "yes",
|
||||
@@ -23,7 +23,7 @@
|
||||
"mediaserver_name" : "jambonz",
|
||||
"preferred_codec_list" : "PCMU,PCMA,OPUS,G722",
|
||||
"distro": "debian-11",
|
||||
"leave_source": "no"
|
||||
"leave_source": "yes"
|
||||
},
|
||||
"builders": [{
|
||||
"type": "amazon-ebs",
|
||||
@@ -98,6 +98,11 @@
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `distro`}}",
|
||||
"script": "scripts/install_os_tuning.sh"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `distro`}} {{user `drachtio_version`}}",
|
||||
"script": "scripts/install_drachtio.sh"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"environment_vars": [
|
||||
@@ -110,41 +115,37 @@
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `install_jaeger`}} {{user `distro`}}",
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `distro`}} {{user `install_jaeger`}}",
|
||||
"script": "scripts/install_jaeger.sh"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `install_homer`}} {{user `homer_user`}} {{user `homer_password`}}",
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `distro`}} {{user `install_homer`}} {{user `homer_user`}} {{user `homer_password`}}",
|
||||
"script": "scripts/install_postgresql.sh"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `install_homer`}} {{user `homer_user`}} {{user `homer_password`}}",
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `distro`}} {{user `install_homer`}} {{user `homer_user`}} {{user `homer_password`}}",
|
||||
"script": "scripts/install_homer.sh"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `drachtio_version`}} {{user `distro`}}",
|
||||
"script": "scripts/install_drachtio.sh"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `install_cloudwatch`}}",
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `distro`}} {{user `install_cloudwatch`}}",
|
||||
"script": "scripts/install_cloudwatch.sh"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `rtp_engine_version`}}",
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `distro`}} {{user `rtp_engine_version`}}",
|
||||
"script": "scripts/install_rtpengine.sh"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `distro`}}",
|
||||
"script": "scripts/install_nodejs.sh"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `install_influxdb`}}",
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `distro`}} {{user `install_influxdb`}}",
|
||||
"script": "scripts/install_influxdb.sh"
|
||||
},
|
||||
{
|
||||
@@ -154,20 +155,22 @@
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `distro`}}",
|
||||
"script": "scripts/install_nginx.sh"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `distro`}}",
|
||||
"script": "scripts/install_redis.sh"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `install_homer`}} {{user `influxdb_ip`}}",
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `distro`}} {{user `install_homer`}} {{user `influxdb_ip`}}",
|
||||
"script": "scripts/install_telegraf.sh"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `install_influxdb`}}",
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `distro`}} {{user `install_influxdb`}}",
|
||||
"script": "scripts/install_grafana.sh"
|
||||
},
|
||||
{
|
||||
@@ -176,12 +179,12 @@
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `jambonz_user`}} {{user `jambonz_password`}}",
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `distro`}} {{user `jambonz_user`}} {{user `jambonz_password`}}",
|
||||
"script": "scripts/install_mysql.sh"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `jambonz_version`}} {{user `jambonz_user`}} {{user `jambonz_password`}}",
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `distro`}} {{user `jambonz_version`}} {{user `jambonz_user`}} {{user `jambonz_password`}}",
|
||||
"script": "scripts/install_app.sh"
|
||||
},
|
||||
{
|
||||
|
||||
@@ -1,15 +1,21 @@
|
||||
#!/bin/bash
|
||||
cd $HOME
|
||||
mkdir -p apps
|
||||
cp /tmp/ecosystem.config.js apps
|
||||
|
||||
cd /home/admin/apps
|
||||
cp /tmp/ecosystem.config.js .
|
||||
|
||||
cd /home/admin/apps/sbc-rtpengine-sidecar && npm ci --unsafe-perm
|
||||
cd $HOME/apps/sbc-rtpengine-sidecar && npm ci --unsafe-perm
|
||||
|
||||
sudo npm install -g pino-pretty pm2 pm2-logrotate gulp grunt
|
||||
|
||||
sudo -u admin bash -c "pm2 install pm2-logrotate"
|
||||
sudo -u admin bash -c "pm2 set pm2-logrotate:max_size 1G"
|
||||
sudo -u admin bash -c "pm2 set pm2-logrotate:retain 5"
|
||||
sudo -u admin bash -c "pm2 set pm2-logrotate:compress true"
|
||||
|
||||
sudo chown -R admin:admin /home/admin/apps
|
||||
if [[ "$DISTRO" == rhel* ]]; then
|
||||
sudo pm2 install pm2-logrotate
|
||||
sudo pm2 set pm2-logrotate:max_size 1G
|
||||
sudo pm2 set pm2-logrotate:retain 5
|
||||
sudo pm2 set pm2-logrotate:compress true
|
||||
sudo chown -R ec2-user:ec2-user $HOME/apps
|
||||
else
|
||||
sudo -u admin bash -c "pm2 install pm2-logrotate"
|
||||
sudo -u admin bash -c "pm2 set pm2-logrotate:max_size 1G"
|
||||
sudo -u admin bash -c "pm2 set pm2-logrotate:retain 5"
|
||||
sudo -u admin bash -c "pm2 set pm2-logrotate:compress true"
|
||||
sudo chown -R admin:admin $HOME/apps
|
||||
fi
|
||||
|
||||
@@ -1,18 +1,28 @@
|
||||
#!/bin/bash
|
||||
VERSION=$1
|
||||
DISTRO=$1
|
||||
VERSION=$2
|
||||
|
||||
echo "drachtio version to install is ${VERSION}"
|
||||
echo "drachtio version to install is ${VERSION} on ${DISTRO}"
|
||||
|
||||
chmod 0777 /usr/local/src
|
||||
cd /usr/local/src
|
||||
|
||||
git clone https://github.com/drachtio/drachtio-server.git -b ${VERSION}
|
||||
cd drachtio-server
|
||||
git submodule update --init --recursive
|
||||
./autogen.sh && mkdir -p build && cd $_ && ../configure CPPFLAGS='-DNDEBUG -g -O0' && make -j 4 && sudo make install
|
||||
./autogen.sh && mkdir -p build && cd $_ && ../configure --enable-tcmalloc=yes CPPFLAGS='-DNDEBUG -g -O2' && make -j 8 && sudo make install
|
||||
|
||||
echo "installing drachtio for aws"
|
||||
|
||||
if [[ "$DISTRO" == rhel* ]]; then
|
||||
sudo mv /tmp/drachtio-rhel.service /etc/systemd/system/drachtio.service
|
||||
else
|
||||
sudo mv /tmp/drachtio.service /etc/systemd/system
|
||||
fi
|
||||
|
||||
sudo mv /tmp/drachtio.conf.xml /etc
|
||||
sudo mv /tmp/drachtio.service /etc/systemd/system
|
||||
sudo chmod 644 /etc/drachtio.conf.xml
|
||||
sudo chmod 644 /etc/systemd/system/drachtio.service
|
||||
sudo systemctl enable drachtio
|
||||
sudo systemctl restart drachtio
|
||||
sudo systemctl status drachtio.service
|
||||
|
||||
@@ -1,11 +1,25 @@
|
||||
#!/bin/bash
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y ca-certificates curl gnupg
|
||||
sudo mkdir -p /etc/apt/keyrings
|
||||
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
|
||||
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
|
||||
sudo apt-get update
|
||||
sudo apt-get install nodejs -y
|
||||
DISTRO=$1
|
||||
|
||||
if [[ "$DISTRO" == rhel* ]]; then
|
||||
dnf install -y crypto-policies-scripts
|
||||
sudo update-crypto-policies --set DEFAULT
|
||||
sudo rpm --import https://rpm.nodesource.com/pub/el/NODESOURCE-GPG-SIGNING-KEY-EL
|
||||
sudo dnf install -y https://rpm.nodesource.com/pub_18.x/nodistro/repo/nodesource-release-nodistro-1.noarch.rpm
|
||||
sudo dnf install -y nodejs --setopt=nodesource-nodejs.module_hotfixes=1 --nogpgcheck
|
||||
node -v
|
||||
sudo dnf install -y npm --nogpgcheck
|
||||
npm -v
|
||||
else
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y ca-certificates curl gnupg
|
||||
sudo mkdir -p /etc/apt/keyrings
|
||||
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
|
||||
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y nodejs
|
||||
fi
|
||||
|
||||
sudo npm install -g npm@latest
|
||||
node -v
|
||||
npm -v
|
||||
|
||||
@@ -1,7 +1,27 @@
|
||||
#!/bin/bash
|
||||
VERSION=$1
|
||||
VERSION=$2
|
||||
DISTRO=$1
|
||||
RHEL_RELEASE=""
|
||||
|
||||
echo "rtpengine version to install is ${VERSION}"
|
||||
echo "rtpengine version to install is ${VERSION} on distribution ${DISTRO}"
|
||||
|
||||
if [[ "$DISTRO" == rhel* ]]; then
|
||||
if [ "$EUID" -ne 0 ]; then
|
||||
echo "Switching to root user..."
|
||||
sudo bash "$0" --as-root
|
||||
exit
|
||||
fi
|
||||
|
||||
RHEL_RELEASE="${DISTRO:5}"
|
||||
|
||||
# Your script continues here, as root
|
||||
echo "Now running as root user on RHEL ${RHEL_RELEASE}"
|
||||
setenforce 0
|
||||
export PATH=/usr/local/bin:$PATH
|
||||
export PATH=/usr/local/bin:$PATH
|
||||
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
|
||||
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig:$PKG_CONFIG_PATH
|
||||
fi
|
||||
|
||||
cd /usr/local/src
|
||||
git clone https://github.com/BelledonneCommunications/bcg729.git
|
||||
@@ -9,41 +29,71 @@ cd bcg729
|
||||
cmake . -DCMAKE_INSTALL_PREFIX=/usr && make && sudo make install chdir=/usr/local/src/bcg729
|
||||
cd /usr/local/src
|
||||
|
||||
git clone https://github.com/warmcat/libwebsockets.git -b v3.2.3
|
||||
git clone https://github.com/warmcat/libwebsockets.git -b v4.3.2
|
||||
cd /usr/local/src/libwebsockets
|
||||
sudo mkdir -p build && cd build && sudo cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo && sudo make && sudo make install
|
||||
mkdir -p build && cd build && cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo && make -j 8 && sudo make install
|
||||
|
||||
cd /usr/local/src
|
||||
git clone https://github.com/sipwise/rtpengine.git -b ${VERSION}
|
||||
cd rtpengine
|
||||
make with_transcoding=yes with_iptables_option=yes with-kernel
|
||||
|
||||
# copy iptables extension into place
|
||||
cp ./iptables-extension/libxt_RTPENGINE.so `pkg-config xtables --variable=xtlibdir`
|
||||
if [[ "$DISTRO" == rhel* ]] && [[ "$RHEL_RELEASE" == "9" ]]; then
|
||||
echo with_iptables_option=no with_transcoding=yes make
|
||||
make with_iptables_option=no with_transcoding=yes -j 8
|
||||
cp /usr/local/src/rtpengine/daemon/rtpengine /usr/local/bin
|
||||
mv /tmp/rtpengine-nomodule.service /etc/systemd/system/rtpengine.service
|
||||
chmod 644 /etc/systemd/system/rtpengine.service
|
||||
systemctl enable rtpengine
|
||||
systemctl start rtpengine
|
||||
else
|
||||
echo make with_transcoding=yes with_iptables_option=yes with-kernel
|
||||
make with_transcoding=yes with_iptables_option=yes with-kernel
|
||||
|
||||
# install kernel module
|
||||
mkdir /lib/modules/`uname -r`/updates/
|
||||
cp ./kernel-module/xt_RTPENGINE.ko /lib/modules/`uname -r`/updates
|
||||
depmod -a
|
||||
modprobe xt_RTPENGINE
|
||||
cat << EOF >> /etc/modules
|
||||
# copy iptables extension into place
|
||||
echo "copying iptables extension into ${pkg-config xtables --variable=xtlibdir}"
|
||||
cp ./iptables-extension/libxt_RTPENGINE.so `pkg-config xtables --variable=xtlibdir`
|
||||
echo "creating directory /lib/modules/$(uname -r)/updates/"
|
||||
mkdir -p /lib/modules/`uname -r`/updates/
|
||||
echo "copying kernel module into /lib/modules/$(uname -r)/updates"
|
||||
cp ./kernel-module/xt_RTPENGINE.ko /lib/modules/`uname -r`/updates
|
||||
depmod -a
|
||||
modprobe xt_RTPENGINE
|
||||
cat << EOF >> /etc/modules
|
||||
xt_RTPENGINE
|
||||
EOF
|
||||
|
||||
echo 'add 42' > /proc/rtpengine/control
|
||||
iptables -I INPUT -p udp --dport 40000:60000 -j RTPENGINE --id 42
|
||||
echo "creating file 42 in /proc/rtpengine/control"
|
||||
echo 'add 42' > /proc/rtpengine/control
|
||||
echo "installing iptables rule"
|
||||
iptables -I INPUT -p udp --dport 40000:60000 -j RTPENGINE --id 42
|
||||
|
||||
cp /usr/local/src/rtpengine/daemon/rtpengine /usr/local/bin
|
||||
cp /usr/local/src/rtpengine/recording-daemon/rtpengine-recording /usr/local/bin/
|
||||
sudo mv /tmp/rtpengine.service /etc/systemd/system
|
||||
sudo mv /tmp/rtpengine-recording.service /etc/systemd/system
|
||||
sudo mv /tmp/rtpengine-recording.ini /etc/rtpengine-recording.ini
|
||||
sudo chmod 644 /etc/systemd/system/rtpengine.service
|
||||
sudo chmod 644 /etc/systemd/system/rtpengine-recording.service
|
||||
sudo chmod 644 /etc/rtpengine-recording.ini
|
||||
mkdir -p /var/spool/recording
|
||||
mkdir -p /recording
|
||||
sudo systemctl enable rtpengine
|
||||
sudo systemctl enable rtpengine-recording
|
||||
sudo systemctl start rtpengine
|
||||
sudo systemctl start rtpengine-recording
|
||||
cp /usr/local/src/rtpengine/daemon/rtpengine /usr/local/bin
|
||||
cp /usr/local/src/rtpengine/recording-daemon/rtpengine-recording /usr/local/bin/
|
||||
|
||||
if [[ "$RHEL_RELEASE" == "8" ]]; then
|
||||
sudo mv /tmp/rtpengine-rhel8.service /etc/systemd/system/rtpengine.service
|
||||
else
|
||||
sudo mv /tmp/rtpengine.service /etc/systemd/system
|
||||
fi
|
||||
sudo chmod 644 /etc/systemd/system/rtpengine.service
|
||||
sudo systemctl enable rtpengine
|
||||
sudo systemctl start rtpengine
|
||||
fi
|
||||
|
||||
|
||||
if [[ "$DISTRO" == rhel* ]] && [[ "$RHEL_RELEASE" == "9" ]]; then
|
||||
echo "not installing recording service"
|
||||
else
|
||||
if [[ "$RHEL_RELEASE" == "8" ]]; then
|
||||
sudo mv /tmp/rtpengine-recording-rhel8.service /etc/systemd/system/rtpengine-recording.service
|
||||
else
|
||||
sudo mv /tmp/rtpengine-recording.service /etc/systemd/system
|
||||
fi
|
||||
sudo mv /tmp/rtpengine-recording.ini /etc/rtpengine-recording.ini
|
||||
sudo chmod 644 /etc/systemd/system/rtpengine-recording.service
|
||||
sudo chmod 644 /etc/rtpengine-recording.ini
|
||||
mkdir -p /var/spool/recording
|
||||
mkdir -p /recording
|
||||
sudo systemctl enable rtpengine-recording
|
||||
sudo systemctl start rtpengine-recording
|
||||
fi
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"ssh_username": "admin",
|
||||
"ami_description": "jambonz SBC RTP server",
|
||||
"drachtio_version": "v0.8.24-rc1",
|
||||
"jambonz_version": "v0.8.5-rc12",
|
||||
"jambonz_version": "v0.8.5-rc17",
|
||||
"ami_base_image_arch": "amd64",
|
||||
"ami_base_image_owner": "136693071363",
|
||||
"instance_type": "t3.xlarge",
|
||||
@@ -59,7 +59,7 @@
|
||||
"sudo apt-get purge nftables",
|
||||
"sudo apt-get -y install python lsof gcc g++ make cmake build-essential git autoconf automake default-mysql-client redis-tools \\",
|
||||
"curl telnet libtool libtool-bin libssl-dev libcurl4-openssl-dev libz-dev systemd-coredump liblz4-tool \\",
|
||||
"libxtables-dev libip6tc-dev libip4tc-dev libiptc-dev linux-headers-{{user `ami_base_image_arch`}} libavformat-dev liblua5.1-0-dev libavfilter-dev libavcodec-dev libswresample-dev \\",
|
||||
"libxtables-dev libip6tc-dev libip4tc-dev libiptc-dev linux-headers-$(uname -r) libavformat-dev liblua5.1-0-dev libavfilter-dev libavcodec-dev libswresample-dev \\",
|
||||
"libevent-dev libpcap-dev libxmlrpc-core-c3-dev markdown libjson-glib-dev lsb-release \\",
|
||||
"libhiredis-dev gperf libspandsp-dev default-libmysqlclient-dev htop dnsutils gdb libtcmalloc-minimal4 \\",
|
||||
"gnupg2 wget pkg-config ca-certificates libjpeg-dev libsqlite3-dev libpcre3-dev libldns-dev \\",
|
||||
@@ -105,21 +105,22 @@
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `rtp_engine_version`}}",
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `distro`}} {{user `rtp_engine_version`}}",
|
||||
"script": "scripts/install_rtpengine.sh"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `distro`}}",
|
||||
"script": "scripts/install_nodejs.sh"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `drachtio_version`}}",
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `distro`}} {{user `drachtio_version`}}",
|
||||
"script": "scripts/install_drachtio.sh"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `jambonz_version`}}",
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `distro`}} {{user `jambonz_version`}}",
|
||||
"script": "scripts/install_app.sh"
|
||||
},
|
||||
{
|
||||
|
||||
@@ -17,7 +17,7 @@ else
|
||||
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
|
||||
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y nodejs npm
|
||||
sudo apt-get install -y nodejs
|
||||
fi
|
||||
|
||||
sudo npm install -g npm@latest
|
||||
|
||||
@@ -64,7 +64,6 @@ EOF
|
||||
|
||||
echo "creating file 42 in /proc/rtpengine/control"
|
||||
echo 'add 42' > /proc/rtpengine/control
|
||||
cat /proc/rtpengine/control
|
||||
echo "installing iptables rule"
|
||||
iptables -I INPUT -p udp --dport 40000:60000 -j RTPENGINE --id 42
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"ami_description": "jambonz SBC SIP+RTP",
|
||||
"instance_type": "c6in.2xlarge",
|
||||
"drachtio_version": "v0.8.24-rc1",
|
||||
"jambonz_version": "v0.8.5-rc12",
|
||||
"jambonz_version": "v0.8.5-rc17",
|
||||
"ami_base_image_arch": "amd64",
|
||||
"ami_base_image_owner": "136693071363",
|
||||
"rtp_engine_version": "mr11.5.1.1",
|
||||
@@ -59,7 +59,7 @@
|
||||
"sudo apt-get purge nftables",
|
||||
"sudo apt-get -y install python gcc g++ make cmake build-essential git autoconf automake default-mysql-client redis-tools \\",
|
||||
"jq curl telnet libtool libtool-bin libssl-dev libcurl4-openssl-dev libz-dev systemd-coredump liblz4-tool \\",
|
||||
"libxtables-dev libip6tc-dev libip4tc-dev libiptc-dev linux-headers-{{user `ami_base_image_arch`}} linux-headers-5.10.0-25-cloud-amd64 libavformat-dev liblua5.1-0-dev libavfilter-dev libavcodec-dev libswresample-dev \\",
|
||||
"libxtables-dev libip6tc-dev libip4tc-dev libiptc-dev linux-headers-$(uname -r) libavformat-dev liblua5.1-0-dev libavfilter-dev libavcodec-dev libswresample-dev \\",
|
||||
"libevent-dev libpcap-dev libxmlrpc-core-c3-dev markdown libjson-glib-dev lsb-release \\",
|
||||
"libhiredis-dev gperf libspandsp-dev default-libmysqlclient-dev htop dnsutils gdb libtcmalloc-minimal4 \\",
|
||||
"gnupg2 wget pkg-config ca-certificates libjpeg-dev libsqlite3-dev libpcre3-dev libldns-dev pandoc \\",
|
||||
@@ -96,7 +96,12 @@
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `rtp_engine_version`}}",
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `distro`}}",
|
||||
"script": "scripts/install_nodejs.sh"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `distro`}} {{user `rtp_engine_version`}}",
|
||||
"script": "scripts/install_rtpengine.sh"
|
||||
},
|
||||
{
|
||||
@@ -115,21 +120,17 @@
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `install_telegraf`}}",
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `distro`}} {{user `install_telegraf`}}",
|
||||
"script": "scripts/install_telegraf.sh"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"script": "scripts/install_nodejs.sh"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `drachtio_version`}}",
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `distro`}} {{user `drachtio_version`}}",
|
||||
"script": "scripts/install_drachtio.sh"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `jambonz_version`}}",
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `distro`}} {{user `jambonz_version`}}",
|
||||
"script": "scripts/install_app.sh"
|
||||
},
|
||||
{
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
#!/bin/bash
|
||||
DISTRO=$1
|
||||
|
||||
echo "installing node.js for ${DISTRO}"
|
||||
if [ "$DISTRO" == "rhel-9" ]; then
|
||||
if [[ "$DISTRO" == rhel* ]]; then
|
||||
dnf install -y crypto-policies-scripts
|
||||
sudo update-crypto-policies --set DEFAULT
|
||||
sudo rpm --import https://rpm.nodesource.com/pub/el/NODESOURCE-GPG-SIGNING-KEY-EL
|
||||
@@ -18,7 +17,7 @@ else
|
||||
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
|
||||
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y nodejs npm
|
||||
sudo apt-get install -y nodejs
|
||||
fi
|
||||
|
||||
sudo npm install -g npm@latest
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"ami_description": "jambonz SBC SIP",
|
||||
"instance_type": "t3.xlarge",
|
||||
"drachtio_version": "v0.8.24-rc1",
|
||||
"jambonz_version": "v0.8.5-rc12",
|
||||
"jambonz_version": "v0.8.5-rc17",
|
||||
"ami_base_image_arch": "amd64",
|
||||
"ami_base_image_owner": "136693071363",
|
||||
"install_datadog": "no",
|
||||
@@ -91,6 +91,7 @@
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `distro`}}",
|
||||
"script": "scripts/install_nodejs.sh"
|
||||
},
|
||||
{
|
||||
@@ -114,12 +115,12 @@
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `drachtio_version`}}",
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `distro`}} {{user `drachtio_version`}}",
|
||||
"script": "scripts/install_drachtio.sh"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `jambonz_version`}}",
|
||||
"execute_command": "chmod +x {{ .Path }}; sudo '{{ .Path }}' {{user `distro`}} {{user `jambonz_version`}}",
|
||||
"script": "scripts/install_app.sh"
|
||||
},
|
||||
{
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"ssh_username": "admin",
|
||||
"ami_description": "jambonz web+monitoring server",
|
||||
"instance_type": "t3.xlarge",
|
||||
"jambonz_version": "v0.8.5-rc12",
|
||||
"jambonz_version": "v0.8.5-rc17",
|
||||
"ami_base_image_arch": "amd64",
|
||||
"ami_base_image_owner": "136693071363",
|
||||
"install_datadog": "no",
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"ssh_username": "admin",
|
||||
"ami_description": "jambonz webserver",
|
||||
"instance_type": "t3.xlarge",
|
||||
"drachtio_version": "v0.8.24-rc1",
|
||||
"drachtio_version": "v0.8.24-rc17",
|
||||
"jambonz_version": "v0.8.5-rc12",
|
||||
"ami_base_image_owner": "136693071363",
|
||||
"install_datadog": "no",
|
||||
|
||||
Reference in New Issue
Block a user