sdk 到这里下载:
https://github.com/aws/aws-sdk-cpp
sdk 下载和编译要花很长时间,步骤为:
# FreeSWITCH 源码在 /usr/src/freeswitch 目录
# 静态编译,参考链接为:
# https://github.com/drachtio/ansible-role-fsmrf/blob/main/tasks/main.yml
# 编译需要很长时间,要有准备
cd /usr/src/freeswitch/libs
git clone --recurse-submodules --depth=1 https://github.com/aws/aws-sdk-cpp
cd aws-sdk-cpp
mkdir -p build && cd build
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=OFF -DCMAKE_CXX_FLAGS="-Wno-unused-parameter -Wno-error"
# 可以试试 make -j 4, 但需要比较多的内存
make -j 2 && make install
下一步,编译模块,可以先参考这里:
编辑 configure.ac,增加下面的内容:
AC_ARG_WITH(aws,
[AS_HELP_STRING([--with-aws],
[enable support for aws-cpp-sdk])],
[with_aws="$withval"],
[with_aws="no"])
if test "$with_aws" = "yes"; then
PKG_CHECK_MODULES([AWS_SDK], [aws-cpp-sdk-core aws-cpp-sdk-transcribestreaming aws-cpp-sdk-lexv2-runtime], [
AM_CONDITIONAL([HAVE_AWS_SDK],[true])], [
AC_MSG_RESULT([no]); AM_CONDITIONAL([HAVE_AWS_SDK],[false])])
# AC_SUBST([AM_MOD_AWS_CXXFLAGS], [-DFREESWITCH_AWS_GLOBAL_INITIALIZATION=1])
else
AM_CONDITIONAL([HAVE_AWS_SDK],[false])
fi
还要增加一行:
src/mod/applications/mod_aws_transcribe/Makefile
编辑 modules.conf.in, 增加下面一行:
applications/mod_aws_transcribe
把 src/mod/applications 设置为当前目录,把 mod_aws_transcribe 复制过来
运行 ./bootstrap.sh
运行 ./configure --with-aws=yes
现在应该可以编译 mod_aws_transcribe
参考链接: