diff --git a/asterisk/Dockerfile b/asterisk/Dockerfile index 69ef4a8..d72fe92 100644 --- a/asterisk/Dockerfile +++ b/asterisk/Dockerfile @@ -131,16 +131,17 @@ COPY patches/app_rtsp_sip/*.patch ./ ARG APP_RTSP_SIP_VERSION="d0fb18b4813e4ae8940029a8a62030443d9feaec" ARG TARGETARCH # hadolint ignore=DL3003,SC2164 -RUN if [[ "${TARGETARCH}" == "amd64" || "${TARGETARCH}" == "i386" ]]; then \ - curl -fsSL "https://github.com/tommyjlong/app_rtsp_sip/archive/${APP_RTSP_SIP_VERSION}.tar.gz" | \ +RUN curl -fsSL "https://github.com/tommyjlong/app_rtsp_sip/archive/${APP_RTSP_SIP_VERSION}.tar.gz" | \ tar --strip-components 1 -xz; \ - patch -p1 < disable_auth.patch; \ - patch -p1 < remove_sudo.patch; \ - cp -f app_rtsp_sip.c /usr/src/asterisk/apps; \ - cp -f rtsp_sip_links.sh /usr/src/asterisk; \ - cd /usr/src/asterisk; \ - ./rtsp_sip_links.sh; \ - fi + patch -p1 < disable_auth.patch; \ + patch -p1 < remove_sudo.patch; \ + if [[ "${TARGETARCH}" == arm* ]]; then \ + patch -p1 < fix_arm.patch; \ + fi; \ + cp -f app_rtsp_sip.c /usr/src/asterisk/apps; \ + cp -f rtsp_sip_links.sh /usr/src/asterisk; \ + cd /usr/src/asterisk; \ + ./rtsp_sip_links.sh # Copy patches specific for this addon COPY patches/asterisk/*.patch /usr/src/asterisk-patches/ diff --git a/asterisk/patches/app_rtsp_sip/fix_arm.patch b/asterisk/patches/app_rtsp_sip/fix_arm.patch new file mode 100644 index 0000000..354996e --- /dev/null +++ b/asterisk/patches/app_rtsp_sip/fix_arm.patch @@ -0,0 +1,13 @@ +diff --git a/app_rtsp_sip.c b/app_rtsp_sip.c +index 42933af..e72c2f7 100755 +--- a/app_rtsp_sip.c ++++ b/app_rtsp_sip.c +@@ -64,6 +64,8 @@ + #include + #include "asterisk/app.h" /* PORT 17.3 ADDed for parsing args */ + ++#define PJ_IS_BIG_ENDIAN 0 ++#define PJ_IS_LITTLE_ENDIAN 1 + + #include + #include