Merge branch 'signalwire:master' into bugfix/fix-ivr-zombie

This commit is contained in:
Alexis Lina 2024-06-18 09:15:40 +02:00 committed by GitHub
commit d973d81960
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
28 changed files with 1326 additions and 64 deletions

View File

@ -97,13 +97,14 @@ name: scan-build
steps:
- name: bootstrap
image: signalwire/freeswitch-public-base:bullseye
image: signalwire/freeswitch-public-base:bookworm
pull: always
commands:
- apt-get update && apt-get -yq install autoconf
- ./bootstrap.sh -j
- name: configure
image: signalwire/freeswitch-public-base:bullseye
image: signalwire/freeswitch-public-base:bookworm
pull: always
environment:
REPOTOKEN:
@ -140,7 +141,7 @@ steps:
- ./configure
- name: scan-build
image: signalwire/freeswitch-public-base:bullseye
image: signalwire/freeswitch-public-base:bookworm
pull: always
environment:
REPOTOKEN:
@ -152,7 +153,7 @@ steps:
- export REPOTOKEN=''
- rm -rf /etc/apt/auth.conf
- mkdir -p scan-build
- echo '#!/bin/bash\nscan-build-11 -o ./scan-build/ make -j`nproc --all` |& tee ./scan-build-result.txt\nexitstatus=$${PIPESTATUS[0]}\necho $$exitstatus > ./scan-build-status.txt\n' > scan.sh
- echo '#!/bin/bash\nscan-build-14 --force-analyze-debug-code -o ./scan-build/ make -j`nproc --all` |& tee ./scan-build-result.txt\nexitstatus=$${PIPESTATUS[0]}\necho $$exitstatus > ./scan-build-status.txt\n' > scan.sh
- chmod +x scan.sh
- ./scan.sh
- exitstatus=`cat ./scan-build-status.txt`
@ -178,6 +179,6 @@ trigger:
---
kind: signature
hmac: 780e4aaee61e3683ea4a8d6fe5131f7c9e62ebad727546013f18df0fca80d705
hmac: 7e5f6cafc88da0be59243daf47a2a5607ff00b45f441ce4c1041d4b690e8a853
...

View File

@ -0,0 +1,97 @@
ARG BUILDER_IMAGE=debian:bookworm-20240513
FROM ${BUILDER_IMAGE} AS builder
ARG MAINTAINER_NAME="Andrey Volk"
ARG MAINTAINER_EMAIL="andrey@signalwire.com"
# Credentials
ARG REPO_DOMAIN=freeswitch.signalwire.com
ARG REPO_USERNAME=user
ARG REPO_PASSWORD=password
ARG BUILD_NUMBER=42
ARG GIT_SHA=0000000000
ARG DATA_DIR=/data
ARG CODENAME=bookworm
ARG GPG_KEY="/usr/share/keyrings/signalwire-freeswitch-repo.gpg"
MAINTAINER "${MAINTAINER_NAME} <${MAINTAINER_EMAIL}>"
SHELL ["/bin/bash", "-c"]
RUN apt-get -q update && \
DEBIAN_FRONTEND=noninteractive apt-get -yq install \
apt-transport-https \
build-essential \
ca-certificates \
cmake \
curl \
debhelper \
devscripts \
dh-autoreconf \
dos2unix \
doxygen \
git \
graphviz \
libglib2.0-dev \
libssl-dev \
lsb-release \
pkg-config \
wget
RUN update-ca-certificates --fresh
RUN echo "export CODENAME=${CODENAME}" | tee ~/.env && \
chmod +x ~/.env
RUN . ~/.env && cat <<EOF > /etc/apt/sources.list.d/freeswitch.list
deb [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/debian-unstable ${CODENAME} main
deb-src [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/debian-unstable ${CODENAME} main
EOF
RUN --mount=type=secret,id=REPO_PASSWORD \
printf "machine ${REPO_DOMAIN} " > ~/.netrc && \
printf "login ${REPO_USERNAME} " >> ~/.netrc && \
printf "password " >> ~/.netrc && \
cat /run/secrets/REPO_PASSWORD >> ~/.netrc && \
cp -f ~/.netrc /etc/apt/auth.conf
RUN git config --global --add safe.directory '*' \
&& git config --global user.name "${MAINTAINER_NAME}" \
&& git config --global user.email "${MAINTAINER_EMAIL}"
RUN curl --netrc -o ${GPG_KEY} https://${REPO_DOMAIN}/repo/deb/debian-unstable/signalwire-freeswitch-repo.gpg
# Bootstrap and Build
COPY . ${DATA_DIR}
WORKDIR ${DATA_DIR}
RUN echo "export VERSION=$(cat ./build/next-release.txt | tr -d '\n')" | tee -a ~/.env
RUN . ~/.env && ./debian/util.sh prep-create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
RUN . ~/.env && ./debian/util.sh prep-create-dsc ${CODENAME}
RUN apt-get -q update && \
mk-build-deps --install --remove debian/control --tool "apt-get -y --no-install-recommends" && \
apt-get -y -f install
ENV DEB_BUILD_OPTIONS="parallel=1"
RUN . ~/.env && dch -b -M -v "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
--force-distribution -D "${CODENAME}" "Nightly build, ${GIT_SHA}"
RUN . ~/.env && ./debian/util.sh create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
RUN dpkg-source \
--diff-ignore=.* \
--compression=xz \
--compression-level=9 \
--build \
. \
&& debuild -b -us -uc \
&& mkdir OUT \
&& mv -v ../*.{deb,dsc,changes,tar.*} OUT/.
# Artifacts image (mandatory part, the resulting image must have a single filesystem layer)
FROM scratch
COPY --from=builder /data/OUT/ /

View File

@ -0,0 +1,96 @@
ARG BUILDER_IMAGE=arm32v7/debian:bookworm-20240513
FROM --platform=linux/arm32 ${BUILDER_IMAGE} AS builder
ARG MAINTAINER_NAME="Andrey Volk"
ARG MAINTAINER_EMAIL="andrey@signalwire.com"
# Credentials
ARG REPO_DOMAIN=freeswitch.signalwire.com
ARG REPO_USERNAME=user
ARG REPO_PASSWORD=password
ARG BUILD_NUMBER=42
ARG GIT_SHA=0000000000
ARG DATA_DIR=/data
ARG CODENAME=bookworm
ARG GPG_KEY="/usr/share/keyrings/signalwire-freeswitch-repo.gpg"
MAINTAINER "${MAINTAINER_NAME} <${MAINTAINER_EMAIL}>"
SHELL ["/bin/bash", "-c"]
RUN apt-get -q update && \
DEBIAN_FRONTEND=noninteractive apt-get -yq install \
apt-transport-https \
build-essential \
ca-certificates \
cmake \
curl \
debhelper \
devscripts \
dh-autoreconf \
dos2unix \
doxygen \
git \
graphviz \
libglib2.0-dev \
libssl-dev \
lsb-release \
pkg-config \
wget
RUN update-ca-certificates --fresh
RUN echo "export CODENAME=${CODENAME}" | tee ~/.env && \
chmod +x ~/.env
RUN . ~/.env && cat <<EOF > /etc/apt/sources.list.d/freeswitch.list
deb [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/rpi/debian-dev ${CODENAME} main
deb-src [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/rpi/debian-dev ${CODENAME} main
EOF
RUN --mount=type=secret,id=REPO_PASSWORD \
printf "machine ${REPO_DOMAIN} " > ~/.netrc && \
printf "login ${REPO_USERNAME} " >> ~/.netrc && \
printf "password " >> ~/.netrc && \
cat /run/secrets/REPO_PASSWORD >> ~/.netrc && \
cp -f ~/.netrc /etc/apt/auth.conf
RUN git config --global --add safe.directory '*' \
&& git config --global user.name "${MAINTAINER_NAME}" \
&& git config --global user.email "${MAINTAINER_EMAIL}"
RUN curl --netrc -o ${GPG_KEY} https://${REPO_DOMAIN}/repo/deb/rpi/debian-dev/signalwire-freeswitch-repo.gpg
# Bootstrap and Build
COPY . ${DATA_DIR}
WORKDIR ${DATA_DIR}
RUN echo "export VERSION=$(cat ./build/next-release.txt | tr -d '\n')" | tee -a ~/.env
RUN . ~/.env && ./debian/util.sh prep-create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
RUN . ~/.env && ./debian/util.sh prep-create-dsc -a armhf ${CODENAME}
RUN apt-get -q update && \
mk-build-deps --install --remove debian/control --tool "apt-get -y --no-install-recommends" && \
apt-get -y -f install
ENV DEB_BUILD_OPTIONS="parallel=1"
RUN . ~/.env && dch -b -M -v "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
--force-distribution -D "${CODENAME}" "Nightly build, ${GIT_SHA}"
RUN . ~/.env && ./debian/util.sh create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
RUN dpkg-source \
--diff-ignore=.* \
--compression=xz \
--compression-level=9 \
--build \
. \
&& debuild -b -us -uc \
&& mkdir OUT \
&& mv -v ../*.{deb,dsc,changes,tar.*} OUT/.
# Artifacts image (mandatory part, the resulting image must have a single filesystem layer)
FROM scratch
COPY --from=builder /data/OUT/ /

View File

@ -0,0 +1,96 @@
ARG BUILDER_IMAGE=arm64v8/debian:bookworm-20240513
FROM --platform=linux/arm64 ${BUILDER_IMAGE} AS builder
ARG MAINTAINER_NAME="Andrey Volk"
ARG MAINTAINER_EMAIL="andrey@signalwire.com"
# Credentials
ARG REPO_DOMAIN=freeswitch.signalwire.com
ARG REPO_USERNAME=user
ARG REPO_PASSWORD=password
ARG BUILD_NUMBER=42
ARG GIT_SHA=0000000000
ARG DATA_DIR=/data
ARG CODENAME=bookworm
ARG GPG_KEY="/usr/share/keyrings/signalwire-freeswitch-repo.gpg"
MAINTAINER "${MAINTAINER_NAME} <${MAINTAINER_EMAIL}>"
SHELL ["/bin/bash", "-c"]
RUN apt-get -q update && \
DEBIAN_FRONTEND=noninteractive apt-get -yq install \
apt-transport-https \
build-essential \
ca-certificates \
cmake \
curl \
debhelper \
devscripts \
dh-autoreconf \
dos2unix \
doxygen \
git \
graphviz \
libglib2.0-dev \
libssl-dev \
lsb-release \
pkg-config \
wget
RUN update-ca-certificates --fresh
RUN echo "export CODENAME=${CODENAME}" | tee ~/.env && \
chmod +x ~/.env
RUN . ~/.env && cat <<EOF > /etc/apt/sources.list.d/freeswitch.list
deb [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/debian-unstable ${CODENAME} main
deb-src [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/debian-unstable ${CODENAME} main
EOF
RUN --mount=type=secret,id=REPO_PASSWORD \
printf "machine ${REPO_DOMAIN} " > ~/.netrc && \
printf "login ${REPO_USERNAME} " >> ~/.netrc && \
printf "password " >> ~/.netrc && \
cat /run/secrets/REPO_PASSWORD >> ~/.netrc && \
cp -f ~/.netrc /etc/apt/auth.conf
RUN git config --global --add safe.directory '*' \
&& git config --global user.name "${MAINTAINER_NAME}" \
&& git config --global user.email "${MAINTAINER_EMAIL}"
RUN curl --netrc -o ${GPG_KEY} https://${REPO_DOMAIN}/repo/deb/debian-unstable/signalwire-freeswitch-repo.gpg
# Bootstrap and Build
COPY . ${DATA_DIR}
WORKDIR ${DATA_DIR}
RUN echo "export VERSION=$(cat ./build/next-release.txt | tr -d '\n')" | tee -a ~/.env
RUN . ~/.env && ./debian/util.sh prep-create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
RUN . ~/.env && ./debian/util.sh prep-create-dsc -a arm64 ${CODENAME}
RUN apt-get -q update && \
mk-build-deps --install --remove debian/control --tool "apt-get -y --no-install-recommends" && \
apt-get -y -f install
ENV DEB_BUILD_OPTIONS="parallel=1"
RUN . ~/.env && dch -b -M -v "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
--force-distribution -D "${CODENAME}" "Nightly build, ${GIT_SHA}"
RUN . ~/.env && ./debian/util.sh create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
RUN dpkg-source \
--diff-ignore=.* \
--compression=xz \
--compression-level=9 \
--build \
. \
&& debuild -b -us -uc \
&& mkdir OUT \
&& mv -v ../*.{deb,dsc,changes,tar.*} OUT/.
# Artifacts image (mandatory part, the resulting image must have a single filesystem layer)
FROM scratch
COPY --from=builder /data/OUT/ /

View File

@ -0,0 +1,96 @@
ARG BUILDER_IMAGE=debian:bullseye-20240513
FROM ${BUILDER_IMAGE} AS builder
ARG MAINTAINER_NAME="Andrey Volk"
ARG MAINTAINER_EMAIL="andrey@signalwire.com"
# Credentials
ARG REPO_DOMAIN=freeswitch.signalwire.com
ARG REPO_USERNAME=user
ARG REPO_PASSWORD=password
ARG BUILD_NUMBER=42
ARG GIT_SHA=0000000000
ARG DATA_DIR=/data
ARG CODENAME=bullseye
ARG GPG_KEY="/usr/share/keyrings/signalwire-freeswitch-repo.gpg"
MAINTAINER "${MAINTAINER_NAME} <${MAINTAINER_EMAIL}>"
SHELL ["/bin/bash", "-c"]
RUN apt-get -q update && \
DEBIAN_FRONTEND=noninteractive apt-get -yq install \
apt-transport-https \
build-essential \
ca-certificates \
cmake \
curl \
debhelper \
devscripts \
dh-autoreconf \
dos2unix \
doxygen \
git \
graphviz \
libglib2.0-dev \
libssl-dev \
lsb-release \
pkg-config \
wget
RUN update-ca-certificates --fresh
RUN echo "export CODENAME=${CODENAME}" | tee ~/.env && \
chmod +x ~/.env
RUN . ~/.env && cat <<EOF > /etc/apt/sources.list.d/freeswitch.list
deb [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/debian-unstable ${CODENAME} main
deb-src [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/debian-unstable ${CODENAME} main
EOF
RUN --mount=type=secret,id=REPO_PASSWORD \
printf "machine ${REPO_DOMAIN} " > ~/.netrc && \
printf "login ${REPO_USERNAME} " >> ~/.netrc && \
printf "password " >> ~/.netrc && \
cat /run/secrets/REPO_PASSWORD >> ~/.netrc && \
cp -f ~/.netrc /etc/apt/auth.conf
RUN git config --global --add safe.directory '*' \
&& git config --global user.name "${MAINTAINER_NAME}" \
&& git config --global user.email "${MAINTAINER_EMAIL}"
RUN curl --netrc -o ${GPG_KEY} https://${REPO_DOMAIN}/repo/deb/debian-unstable/signalwire-freeswitch-repo.gpg
# Bootstrap and Build
COPY . ${DATA_DIR}
WORKDIR ${DATA_DIR}
RUN echo "export VERSION=$(cat ./build/next-release.txt | tr -d '\n')" | tee -a ~/.env
RUN . ~/.env && ./debian/util.sh prep-create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
RUN . ~/.env && ./debian/util.sh prep-create-dsc ${CODENAME}
RUN apt-get -q update && \
mk-build-deps --install --remove debian/control --tool "apt-get -y --no-install-recommends" && \
apt-get -y -f install
ENV DEB_BUILD_OPTIONS="parallel=1"
RUN . ~/.env && dch -b -M -v "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
--force-distribution -D "${CODENAME}" "Nightly build, ${GIT_SHA}"
RUN . ~/.env && ./debian/util.sh create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
RUN dpkg-source \
--diff-ignore=.* \
--compression=xz \
--compression-level=9 \
--build \
. \
&& debuild -b -us -uc \
&& mkdir OUT \
&& mv -v ../*.{deb,dsc,changes,tar.*} OUT/.
# Artifacts image (mandatory part, the resulting image must have a single filesystem layer)
FROM scratch
COPY --from=builder /data/OUT/ /

View File

@ -0,0 +1,96 @@
ARG BUILDER_IMAGE=arm32v7/debian:bullseye-20240513
FROM --platform=linux/arm32 ${BUILDER_IMAGE} AS builder
ARG MAINTAINER_NAME="Andrey Volk"
ARG MAINTAINER_EMAIL="andrey@signalwire.com"
# Credentials
ARG REPO_DOMAIN=freeswitch.signalwire.com
ARG REPO_USERNAME=user
ARG REPO_PASSWORD=password
ARG BUILD_NUMBER=42
ARG GIT_SHA=0000000000
ARG DATA_DIR=/data
ARG CODENAME=bullseye
ARG GPG_KEY="/usr/share/keyrings/signalwire-freeswitch-repo.gpg"
MAINTAINER "${MAINTAINER_NAME} <${MAINTAINER_EMAIL}>"
SHELL ["/bin/bash", "-c"]
RUN apt-get -q update && \
DEBIAN_FRONTEND=noninteractive apt-get -yq install \
apt-transport-https \
build-essential \
ca-certificates \
cmake \
curl \
debhelper \
devscripts \
dh-autoreconf \
dos2unix \
doxygen \
git \
graphviz \
libglib2.0-dev \
libssl-dev \
lsb-release \
pkg-config \
wget
RUN update-ca-certificates --fresh
RUN echo "export CODENAME=${CODENAME}" | tee ~/.env && \
chmod +x ~/.env
RUN . ~/.env && cat <<EOF > /etc/apt/sources.list.d/freeswitch.list
deb [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/rpi/debian-dev ${CODENAME} main
deb-src [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/rpi/debian-dev ${CODENAME} main
EOF
RUN --mount=type=secret,id=REPO_PASSWORD \
printf "machine ${REPO_DOMAIN} " > ~/.netrc && \
printf "login ${REPO_USERNAME} " >> ~/.netrc && \
printf "password " >> ~/.netrc && \
cat /run/secrets/REPO_PASSWORD >> ~/.netrc && \
cp -f ~/.netrc /etc/apt/auth.conf
RUN git config --global --add safe.directory '*' \
&& git config --global user.name "${MAINTAINER_NAME}" \
&& git config --global user.email "${MAINTAINER_EMAIL}"
RUN curl --netrc -o ${GPG_KEY} https://${REPO_DOMAIN}/repo/deb/rpi/debian-dev/signalwire-freeswitch-repo.gpg
# Bootstrap and Build
COPY . ${DATA_DIR}
WORKDIR ${DATA_DIR}
RUN echo "export VERSION=$(cat ./build/next-release.txt | tr -d '\n')" | tee -a ~/.env
RUN . ~/.env && ./debian/util.sh prep-create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
RUN . ~/.env && ./debian/util.sh prep-create-dsc -a armhf ${CODENAME}
RUN apt-get -q update && \
mk-build-deps --install --remove debian/control --tool "apt-get -y --no-install-recommends" && \
apt-get -y -f install
ENV DEB_BUILD_OPTIONS="parallel=1"
RUN . ~/.env && dch -b -M -v "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
--force-distribution -D "${CODENAME}" "Nightly build, ${GIT_SHA}"
RUN . ~/.env && ./debian/util.sh create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
RUN dpkg-source \
--diff-ignore=.* \
--compression=xz \
--compression-level=9 \
--build \
. \
&& debuild -b -us -uc \
&& mkdir OUT \
&& mv -v ../*.{deb,dsc,changes,tar.*} OUT/.
# Artifacts image (mandatory part, the resulting image must have a single filesystem layer)
FROM scratch
COPY --from=builder /data/OUT/ /

View File

@ -0,0 +1,96 @@
ARG BUILDER_IMAGE=arm64v8/debian:bullseye-20240513
FROM --platform=linux/arm64 ${BUILDER_IMAGE} AS builder
ARG MAINTAINER_NAME="Andrey Volk"
ARG MAINTAINER_EMAIL="andrey@signalwire.com"
# Credentials
ARG REPO_DOMAIN=freeswitch.signalwire.com
ARG REPO_USERNAME=user
ARG REPO_PASSWORD=password
ARG BUILD_NUMBER=42
ARG GIT_SHA=0000000000
ARG DATA_DIR=/data
ARG CODENAME=bullseye
ARG GPG_KEY="/usr/share/keyrings/signalwire-freeswitch-repo.gpg"
MAINTAINER "${MAINTAINER_NAME} <${MAINTAINER_EMAIL}>"
SHELL ["/bin/bash", "-c"]
RUN apt-get -q update && \
DEBIAN_FRONTEND=noninteractive apt-get -yq install \
apt-transport-https \
build-essential \
ca-certificates \
cmake \
curl \
debhelper \
devscripts \
dh-autoreconf \
dos2unix \
doxygen \
git \
graphviz \
libglib2.0-dev \
libssl-dev \
lsb-release \
pkg-config \
wget
RUN update-ca-certificates --fresh
RUN echo "export CODENAME=${CODENAME}" | tee ~/.env && \
chmod +x ~/.env
RUN . ~/.env && cat <<EOF > /etc/apt/sources.list.d/freeswitch.list
deb [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/debian-unstable ${CODENAME} main
deb-src [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/debian-unstable ${CODENAME} main
EOF
RUN --mount=type=secret,id=REPO_PASSWORD \
printf "machine ${REPO_DOMAIN} " > ~/.netrc && \
printf "login ${REPO_USERNAME} " >> ~/.netrc && \
printf "password " >> ~/.netrc && \
cat /run/secrets/REPO_PASSWORD >> ~/.netrc && \
cp -f ~/.netrc /etc/apt/auth.conf
RUN git config --global --add safe.directory '*' \
&& git config --global user.name "${MAINTAINER_NAME}" \
&& git config --global user.email "${MAINTAINER_EMAIL}"
RUN curl --netrc -o ${GPG_KEY} https://${REPO_DOMAIN}/repo/deb/debian-unstable/signalwire-freeswitch-repo.gpg
# Bootstrap and Build
COPY . ${DATA_DIR}
WORKDIR ${DATA_DIR}
RUN echo "export VERSION=$(cat ./build/next-release.txt | tr -d '\n')" | tee -a ~/.env
RUN . ~/.env && ./debian/util.sh prep-create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
RUN . ~/.env && ./debian/util.sh prep-create-dsc -a arm64 ${CODENAME}
RUN apt-get -q update && \
mk-build-deps --install --remove debian/control --tool "apt-get -y --no-install-recommends" && \
apt-get -y -f install
ENV DEB_BUILD_OPTIONS="parallel=1"
RUN . ~/.env && dch -b -M -v "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
--force-distribution -D "${CODENAME}" "Nightly build, ${GIT_SHA}"
RUN . ~/.env && ./debian/util.sh create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
RUN dpkg-source \
--diff-ignore=.* \
--compression=xz \
--compression-level=9 \
--build \
. \
&& debuild -b -us -uc \
&& mkdir OUT \
&& mv -v ../*.{deb,dsc,changes,tar.*} OUT/.
# Artifacts image (mandatory part, the resulting image must have a single filesystem layer)
FROM scratch
COPY --from=builder /data/OUT/ /

View File

@ -0,0 +1,97 @@
ARG BUILDER_IMAGE=debian:buster-20240513
FROM ${BUILDER_IMAGE} AS builder
ARG MAINTAINER_NAME="Andrey Volk"
ARG MAINTAINER_EMAIL="andrey@signalwire.com"
# Credentials
ARG REPO_DOMAIN=freeswitch.signalwire.com
ARG REPO_USERNAME=user
ARG REPO_PASSWORD=password
ARG BUILD_NUMBER=42
ARG GIT_SHA=0000000000
ARG DATA_DIR=/data
ARG CODENAME=buster
ARG GPG_KEY="/usr/share/keyrings/signalwire-freeswitch-repo.gpg"
MAINTAINER "${MAINTAINER_NAME} <${MAINTAINER_EMAIL}>"
SHELL ["/bin/bash", "-c"]
RUN apt-get -q update && \
DEBIAN_FRONTEND=noninteractive apt-get -yq install \
apt-transport-https \
build-essential \
ca-certificates \
cmake \
curl \
debhelper \
devscripts \
dh-autoreconf \
dos2unix \
doxygen \
git \
graphviz \
libglib2.0-dev \
libssl-dev \
lsb-release \
pkg-config \
wget
RUN update-ca-certificates --fresh
RUN echo "export CODENAME=${CODENAME}" | tee ~/.env && \
chmod +x ~/.env
RUN . ~/.env && cat <<EOF > /etc/apt/sources.list.d/freeswitch.list
deb [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/debian-unstable ${CODENAME} main
deb-src [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/debian-unstable ${CODENAME} main
EOF
RUN --mount=type=secret,id=REPO_PASSWORD \
printf "machine ${REPO_DOMAIN} " > ~/.netrc && \
printf "login ${REPO_USERNAME} " >> ~/.netrc && \
printf "password " >> ~/.netrc && \
cat /run/secrets/REPO_PASSWORD >> ~/.netrc && \
cp -f ~/.netrc /etc/apt/auth.conf
RUN git config --global --add safe.directory '*' \
&& git config --global user.name "${MAINTAINER_NAME}" \
&& git config --global user.email "${MAINTAINER_EMAIL}"
RUN curl --netrc -o ${GPG_KEY} https://${REPO_DOMAIN}/repo/deb/debian-unstable/signalwire-freeswitch-repo.gpg
# Bootstrap and Build
COPY . ${DATA_DIR}
WORKDIR ${DATA_DIR}
RUN echo "export VERSION=$(cat ./build/next-release.txt | tr -d '\n')" | tee -a ~/.env
RUN . ~/.env && ./debian/util.sh prep-create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
RUN . ~/.env && ./debian/util.sh prep-create-dsc ${CODENAME}
RUN apt-get -q update && \
mk-build-deps --install --remove debian/control --tool "apt-get -y --no-install-recommends" && \
apt-get -y -f install
ENV DEB_BUILD_OPTIONS="parallel=1"
RUN . ~/.env && dch -b -M -v "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
--force-distribution -D "${CODENAME}" "Nightly build, ${GIT_SHA}"
RUN . ~/.env && ./debian/util.sh create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
RUN dpkg-source \
--diff-ignore=.* \
--compression=xz \
--compression-level=9 \
--build \
. \
&& debuild -b -us -uc \
&& mkdir OUT \
&& mv -v ../*.{deb,dsc,changes,tar.*} OUT/.
# Artifacts image (mandatory part, the resulting image must have a single filesystem layer)
FROM scratch
COPY --from=builder /data/OUT/ /

View File

@ -0,0 +1,96 @@
ARG BUILDER_IMAGE=arm32v7/debian:buster-20240513
FROM --platform=linux/arm32 ${BUILDER_IMAGE} AS builder
ARG MAINTAINER_NAME="Andrey Volk"
ARG MAINTAINER_EMAIL="andrey@signalwire.com"
# Credentials
ARG REPO_DOMAIN=freeswitch.signalwire.com
ARG REPO_USERNAME=user
ARG REPO_PASSWORD=password
ARG BUILD_NUMBER=42
ARG GIT_SHA=0000000000
ARG DATA_DIR=/data
ARG CODENAME=buster
ARG GPG_KEY="/usr/share/keyrings/signalwire-freeswitch-repo.gpg"
MAINTAINER "${MAINTAINER_NAME} <${MAINTAINER_EMAIL}>"
SHELL ["/bin/bash", "-c"]
RUN apt-get -q update && \
DEBIAN_FRONTEND=noninteractive apt-get -yq install \
apt-transport-https \
build-essential \
ca-certificates \
cmake \
curl \
debhelper \
devscripts \
dh-autoreconf \
dos2unix \
doxygen \
git \
graphviz \
libglib2.0-dev \
libssl-dev \
lsb-release \
pkg-config \
wget
RUN update-ca-certificates --fresh
RUN echo "export CODENAME=${CODENAME}" | tee ~/.env && \
chmod +x ~/.env
RUN . ~/.env && cat <<EOF > /etc/apt/sources.list.d/freeswitch.list
deb [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/rpi/debian-dev ${CODENAME} main
deb-src [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/rpi/debian-dev ${CODENAME} main
EOF
RUN --mount=type=secret,id=REPO_PASSWORD \
printf "machine ${REPO_DOMAIN} " > ~/.netrc && \
printf "login ${REPO_USERNAME} " >> ~/.netrc && \
printf "password " >> ~/.netrc && \
cat /run/secrets/REPO_PASSWORD >> ~/.netrc && \
cp -f ~/.netrc /etc/apt/auth.conf
RUN git config --global --add safe.directory '*' \
&& git config --global user.name "${MAINTAINER_NAME}" \
&& git config --global user.email "${MAINTAINER_EMAIL}"
RUN curl --netrc -o ${GPG_KEY} https://${REPO_DOMAIN}/repo/deb/rpi/debian-dev/signalwire-freeswitch-repo.gpg
# Bootstrap and Build
COPY . ${DATA_DIR}
WORKDIR ${DATA_DIR}
RUN echo "export VERSION=$(cat ./build/next-release.txt | tr -d '\n')" | tee -a ~/.env
RUN . ~/.env && ./debian/util.sh prep-create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
RUN . ~/.env && ./debian/util.sh prep-create-dsc -a armhf ${CODENAME}
RUN apt-get -q update && \
mk-build-deps --install --remove debian/control --tool "apt-get -y --no-install-recommends" && \
apt-get -y -f install
ENV DEB_BUILD_OPTIONS="parallel=1"
RUN . ~/.env && dch -b -M -v "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
--force-distribution -D "${CODENAME}" "Nightly build, ${GIT_SHA}"
RUN . ~/.env && ./debian/util.sh create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
RUN dpkg-source \
--diff-ignore=.* \
--compression=xz \
--compression-level=9 \
--build \
. \
&& debuild -b -us -uc \
&& mkdir OUT \
&& mv -v ../*.{deb,dsc,changes,tar.*} OUT/.
# Artifacts image (mandatory part, the resulting image must have a single filesystem layer)
FROM scratch
COPY --from=builder /data/OUT/ /

View File

@ -0,0 +1,96 @@
ARG BUILDER_IMAGE=arm64v8/debian:buster-20240513
FROM --platform=linux/arm64 ${BUILDER_IMAGE} AS builder
ARG MAINTAINER_NAME="Andrey Volk"
ARG MAINTAINER_EMAIL="andrey@signalwire.com"
# Credentials
ARG REPO_DOMAIN=freeswitch.signalwire.com
ARG REPO_USERNAME=user
ARG REPO_PASSWORD=password
ARG BUILD_NUMBER=42
ARG GIT_SHA=0000000000
ARG DATA_DIR=/data
ARG CODENAME=buster
ARG GPG_KEY="/usr/share/keyrings/signalwire-freeswitch-repo.gpg"
MAINTAINER "${MAINTAINER_NAME} <${MAINTAINER_EMAIL}>"
SHELL ["/bin/bash", "-c"]
RUN apt-get -q update && \
DEBIAN_FRONTEND=noninteractive apt-get -yq install \
apt-transport-https \
build-essential \
ca-certificates \
cmake \
curl \
debhelper \
devscripts \
dh-autoreconf \
dos2unix \
doxygen \
git \
graphviz \
libglib2.0-dev \
libssl-dev \
lsb-release \
pkg-config \
wget
RUN update-ca-certificates --fresh
RUN echo "export CODENAME=${CODENAME}" | tee ~/.env && \
chmod +x ~/.env
RUN . ~/.env && cat <<EOF > /etc/apt/sources.list.d/freeswitch.list
deb [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/debian-unstable ${CODENAME} main
deb-src [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/debian-unstable ${CODENAME} main
EOF
RUN --mount=type=secret,id=REPO_PASSWORD \
printf "machine ${REPO_DOMAIN} " > ~/.netrc && \
printf "login ${REPO_USERNAME} " >> ~/.netrc && \
printf "password " >> ~/.netrc && \
cat /run/secrets/REPO_PASSWORD >> ~/.netrc && \
cp -f ~/.netrc /etc/apt/auth.conf
RUN git config --global --add safe.directory '*' \
&& git config --global user.name "${MAINTAINER_NAME}" \
&& git config --global user.email "${MAINTAINER_EMAIL}"
RUN curl --netrc -o ${GPG_KEY} https://${REPO_DOMAIN}/repo/deb/debian-unstable/signalwire-freeswitch-repo.gpg
# Bootstrap and Build
COPY . ${DATA_DIR}
WORKDIR ${DATA_DIR}
RUN echo "export VERSION=$(cat ./build/next-release.txt | tr -d '\n')" | tee -a ~/.env
RUN . ~/.env && ./debian/util.sh prep-create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
RUN . ~/.env && ./debian/util.sh prep-create-dsc -a arm64 ${CODENAME}
RUN apt-get -q update && \
mk-build-deps --install --remove debian/control --tool "apt-get -y --no-install-recommends" && \
apt-get -y -f install
ENV DEB_BUILD_OPTIONS="parallel=1"
RUN . ~/.env && dch -b -M -v "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
--force-distribution -D "${CODENAME}" "Nightly build, ${GIT_SHA}"
RUN . ~/.env && ./debian/util.sh create-orig -n -V${VERSION}-${BUILD_NUMBER}-${GIT_SHA} -x
RUN dpkg-source \
--diff-ignore=.* \
--compression=xz \
--compression-level=9 \
--build \
. \
&& debuild -b -us -uc \
&& mkdir OUT \
&& mv -v ../*.{deb,dsc,changes,tar.*} OUT/.
# Artifacts image (mandatory part, the resulting image must have a single filesystem layer)
FROM scratch
COPY --from=builder /data/OUT/ /

107
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,107 @@
name: Build and Distribute
on:
pull_request:
push:
branches:
- master
paths:
- "**"
workflow_dispatch:
concurrency:
group: ${{ github.head_ref || github.ref }}
jobs:
excludes:
runs-on: ubuntu-latest
outputs:
deb: ${{ steps.deb.outputs.excludes }}
steps:
- id: deb
name: Generate Matrix excludes for DEB
run: |
JSON="[]"
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
JSON=$(jq -n '[
{
"version": "bookworm",
"platform": {
"name": "amd64"
}
},
{
"version": "bookworm",
"platform": {
"name": "arm64v8"
}
},
{
"version": "bullseye"
}
]')
fi
echo "excludes=$(echo $JSON | jq -c .)" | tee -a $GITHUB_OUTPUT
deb:
name: 'DEB'
permissions:
id-token: write
contents: read
needs:
- excludes
uses: signalwire/actions-template/.github/workflows/cicd-docker-build-and-distribute.yml@main
strategy:
# max-parallel: 1
fail-fast: false
matrix:
os:
- debian
version:
- bookworm
- bullseye
- buster
platform:
- name: amd64
runner: ubuntu-latest
- name: arm32v7
runner: linux-arm64-4-core-public
- name: arm64v8
runner: linux-arm64-4-core-public
exclude: ${{ fromJson(needs.excludes.outputs.deb) }}
with:
RUNNER: ${{ matrix.platform.runner }}
ARTIFACTS_PATTERN: '.*\.(deb|dsc|changes|tar.bz2|tar.gz|tar.lzma|tar.xz)$'
DOCKERFILE: .github/docker/${{ matrix.os }}/${{ matrix.version }}/${{ matrix.platform.name }}/Dockerfile
MAINTAINER: 'Andrey Volk <andrey@signalwire.com>'
META_FILE_PATH_PREFIX: /var/www/freeswitch/${{ github.ref_name }}/${{ github.run_id }}-${{ github.run_number }}
PLATFORM: ${{ matrix.platform.name }}
REPO_DOMAIN: freeswitch.signalwire.com
TARGET_ARTIFACT_NAME: ${{ matrix.os }}-${{ matrix.version }}-${{ matrix.platform.name }}-artifact
UPLOAD_BUILD_ARTIFACTS: ${{ github.event_name != 'pull_request' || contains(github.event.pull_request.title, ':upload-artifacts') }}
secrets:
GH_BOT_DEPLOY_TOKEN: ${{ secrets.PAT }}
HOSTNAME: ${{ secrets.HOSTNAME }}
PROXY_URL: ${{ secrets.PROXY_URL }}
USERNAME: ${{ secrets.USERNAME }}
TELEPORT_TOKEN: ${{ secrets.TELEPORT_TOKEN }}
REPO_USERNAME: 'signalwire'
REPO_PASSWORD: ${{ secrets.REPOTOKEN }}
meta:
name: 'Publish build data to meta-repo'
if: ${{ github.event_name != 'pull_request' || contains(github.event.pull_request.title, ':upload-artifacts') }}
needs:
- deb
permissions:
id-token: write
contents: read
uses: signalwire/actions-template/.github/workflows/meta-repo-content.yml@main
with:
META_CONTENT: '/var/www/freeswitch/${{ github.ref_name }}/${{ github.run_id }}-${{ github.run_number }}'
META_REPO: signalwire/bamboo_gha_trigger
META_REPO_BRANCH: trigger/freeswitch/${{ github.ref_name }}
secrets:
GH_BOT_DEPLOY_TOKEN: ${{ secrets.PAT }}

2
.gitignore vendored
View File

@ -187,7 +187,7 @@ ipch/
/w32/Setup/obj
*dSYM*
/UpgradeLog.*
/UpgradeLog*.*
/_UpgradeReport_Files/
*.aps
/w32/Library/switch_version.inc

63
debian/bootstrap.sh vendored
View File

@ -65,6 +65,9 @@ avoid_mods=(
avoid_mods_armhf=(
languages/mod_v8
)
avoid_mods_arm64=(
languages/mod_v8
)
avoid_mods_sid=(
directories/mod_ldap
)
@ -352,7 +355,7 @@ EOF
print_core_control () {
cat <<EOF
Package: freeswitch-all
Architecture: amd64 armhf
Architecture: amd64 armhf arm64
Depends: freeswitch-meta-all (= \${binary:Version}), freeswitch-meta-all-dbg (= \${binary:Version})
Conflicts: freeswitch-all (<= 1.6.7)
Description: Cross-Platform Scalable Multi-Protocol Soft Switch
@ -361,7 +364,7 @@ Description: Cross-Platform Scalable Multi-Protocol Soft Switch
This is a package which depends on all packaged FreeSWITCH modules.
Package: freeswitch
Architecture: amd64 armhf
Architecture: amd64 armhf arm64
Depends: \${shlibs:Depends}, \${perl:Depends}, \${misc:Depends},
libfreeswitch1 (= \${binary:Version})
Recommends:
@ -373,7 +376,7 @@ Description: Cross-Platform Scalable Multi-Protocol Soft Switch
This package contains the FreeSWITCH core.
Package: libfreeswitch1
Architecture: amd64 armhf
Architecture: amd64 armhf arm64
Depends: \${shlibs:Depends}, \${misc:Depends}, libsofia-sip-ua0 (>= 1.13.17)
Recommends:
Suggests: libfreeswitch1-dbg
@ -385,7 +388,7 @@ Description: Cross-Platform Scalable Multi-Protocol Soft Switch
Package: python-esl
Section: python
Architecture: amd64 armhf
Architecture: amd64 armhf arm64
Depends: \${shlibs:Depends}, \${misc:Depends}, \${python:Depends}
Description: Cross-Platform Scalable Multi-Protocol Soft Switch
$(debian_wrap "${fs_description}")
@ -394,7 +397,7 @@ Description: Cross-Platform Scalable Multi-Protocol Soft Switch
Package: libesl-perl
Section: perl
Architecture: amd64 armhf
Architecture: amd64 armhf arm64
Depends: \${shlibs:Depends}, \${misc:Depends}, \${perl:Depends}
Description: Cross-Platform Scalable Multi-Protocol Soft Switch
$(debian_wrap "${fs_description}")
@ -402,7 +405,7 @@ Description: Cross-Platform Scalable Multi-Protocol Soft Switch
This package contains the Perl binding for FreeSWITCH Event Socket Library (ESL).
Package: freeswitch-meta-bare
Architecture: amd64 armhf
Architecture: amd64 armhf arm64
Depends: \${misc:Depends}, freeswitch (= \${binary:Version})
Recommends:
freeswitch-doc (= \${binary:Version}),
@ -420,7 +423,7 @@ Description: Cross-Platform Scalable Multi-Protocol Soft Switch
bare FreeSWITCH install.
Package: freeswitch-meta-default
Architecture: amd64 armhf
Architecture: amd64 armhf arm64
Depends: \${misc:Depends}, freeswitch (= \${binary:Version}),
freeswitch-mod-commands (= \${binary:Version}),
freeswitch-mod-conference (= \${binary:Version}),
@ -462,7 +465,7 @@ Description: Cross-Platform Scalable Multi-Protocol Soft Switch
reasonably basic FreeSWITCH install.
Package: freeswitch-meta-vanilla
Architecture: amd64 armhf
Architecture: amd64 armhf arm64
Depends: \${misc:Depends}, freeswitch (= \${binary:Version}),
freeswitch-init,
freeswitch-mod-console (= \${binary:Version}),
@ -511,7 +514,7 @@ Description: Cross-Platform Scalable Multi-Protocol Soft Switch
running the FreeSWITCH vanilla example configuration.
Package: freeswitch-meta-sorbet
Architecture: amd64 armhf
Architecture: amd64 armhf arm64
Depends: \${misc:Depends}, freeswitch (= \${binary:Version}),
Recommends:
freeswitch-init,
@ -594,7 +597,7 @@ Description: Cross-Platform Scalable Multi-Protocol Soft Switch
modules except a few which aren't recommended.
Package: freeswitch-meta-all
Architecture: amd64 armhf
Architecture: amd64 armhf arm64
Depends: \${misc:Depends}, freeswitch (= \${binary:Version}),
freeswitch-init,
freeswitch-lang (= \${binary:Version}),
@ -705,7 +708,7 @@ Description: Cross-Platform Scalable Multi-Protocol Soft Switch
FreeSWITCH modules.
Package: freeswitch-meta-codecs
Architecture: amd64 armhf
Architecture: amd64 armhf arm64
Depends: \${misc:Depends}, freeswitch (= \${binary:Version}),
freeswitch-mod-amr (= \${binary:Version}),
freeswitch-mod-amrwb (= \${binary:Version}),
@ -732,7 +735,7 @@ Description: Cross-Platform Scalable Multi-Protocol Soft Switch
most FreeSWITCH codecs.
Package: freeswitch-meta-codecs-dbg
Architecture: amd64 armhf
Architecture: amd64 armhf arm64
Depends: \${misc:Depends}, freeswitch (= \${binary:Version}),
freeswitch-mod-amr-dbg (= \${binary:Version}),
freeswitch-mod-amrwb-dbg (= \${binary:Version}),
@ -759,7 +762,7 @@ Description: Cross-Platform Scalable Multi-Protocol Soft Switch
most FreeSWITCH codecs.
Package: freeswitch-meta-conf
Architecture: amd64 armhf
Architecture: amd64 armhf arm64
Depends: \${misc:Depends},
freeswitch-conf-curl (= \${binary:Version}),
freeswitch-conf-insideout (= \${binary:Version}),
@ -773,7 +776,7 @@ Description: Cross-Platform Scalable Multi-Protocol Soft Switch
examples for FreeSWITCH.
Package: freeswitch-meta-lang
Architecture: amd64 armhf
Architecture: amd64 armhf arm64
Depends: \${misc:Depends},
freeswitch-lang-de (= \${binary:Version}),
freeswitch-lang-en (= \${binary:Version}),
@ -789,7 +792,7 @@ Description: Cross-Platform Scalable Multi-Protocol Soft Switch
FreeSWITCH.
Package: freeswitch-meta-mod-say
Architecture: amd64 armhf
Architecture: amd64 armhf arm64
Depends: \${misc:Depends},
freeswitch-mod-say-de (= \${binary:Version}),
freeswitch-mod-say-en (= \${binary:Version}),
@ -814,7 +817,7 @@ Description: Cross-Platform Scalable Multi-Protocol Soft Switch
FreeSWITCH.
Package: freeswitch-meta-mod-say-dbg
Architecture: amd64 armhf
Architecture: amd64 armhf arm64
Depends: \${misc:Depends},
freeswitch-mod-say-de-dbg (= \${binary:Version}),
freeswitch-mod-say-en-dbg (= \${binary:Version}),
@ -839,7 +842,7 @@ Description: Cross-Platform Scalable Multi-Protocol Soft Switch
FreeSWITCH.
Package: freeswitch-meta-all-dbg
Architecture: amd64 armhf
Architecture: amd64 armhf arm64
Depends: \${misc:Depends}, freeswitch (= \${binary:Version}),
freeswitch-meta-codecs-dbg (= \${binary:Version}),
freeswitch-meta-mod-say (= \${binary:Version}),
@ -943,7 +946,7 @@ Description: Cross-Platform Scalable Multi-Protocol Soft Switch
Package: freeswitch-all-dbg
Section: debug
Priority: optional
Architecture: amd64 armhf
Architecture: amd64 armhf arm64
Depends: \${misc:Depends}, freeswitch-meta-all (= \${binary:Version}), freeswitch-meta-all-dbg (= \${binary:Version})
Description: debugging symbols for FreeSWITCH
$(debian_wrap "${fs_description}")
@ -953,7 +956,7 @@ Description: debugging symbols for FreeSWITCH
Package: freeswitch-dbg
Section: debug
Priority: optional
Architecture: amd64 armhf
Architecture: amd64 armhf arm64
Depends: \${misc:Depends}, freeswitch (= \${binary:Version})
Description: debugging symbols for FreeSWITCH
$(debian_wrap "${fs_description}")
@ -963,7 +966,7 @@ Description: debugging symbols for FreeSWITCH
Package: libfreeswitch1-dbg
Section: debug
Priority: optional
Architecture: amd64 armhf
Architecture: amd64 armhf arm64
Depends: \${misc:Depends}, libfreeswitch1 (= \${binary:Version})
Description: debugging symbols for FreeSWITCH
$(debian_wrap "${fs_description}")
@ -972,7 +975,7 @@ Description: debugging symbols for FreeSWITCH
Package: libfreeswitch-dev
Section: libdevel
Architecture: amd64 armhf
Architecture: amd64 armhf arm64
Depends: \${misc:Depends}, freeswitch
Description: development libraries and header files for FreeSWITCH
$(debian_wrap "${fs_description}")
@ -981,7 +984,7 @@ Description: development libraries and header files for FreeSWITCH
Package: freeswitch-doc
Section: doc
Architecture: amd64 armhf
Architecture: amd64 armhf arm64
Depends: \${misc:Depends}
Description: documentation for FreeSWITCH
$(debian_wrap "${fs_description}")
@ -994,7 +997,7 @@ Description: documentation for FreeSWITCH
## languages
Package: freeswitch-lang
Architecture: amd64 armhf
Architecture: amd64 armhf arm64
Depends: \${misc:Depends},
freeswitch-lang-en (= \${binary:Version})
Description: Language files for FreeSWITCH
@ -1006,7 +1009,7 @@ Description: Language files for FreeSWITCH
## timezones
Package: freeswitch-timezones
Architecture: amd64 armhf
Architecture: amd64 armhf arm64
Depends: \${misc:Depends}
Description: Timezone files for FreeSWITCH
$(debian_wrap "${fs_description}")
@ -1020,7 +1023,7 @@ EOF
if [ ${use_sysvinit} = "true" ]; then
cat <<EOF
Package: freeswitch-sysvinit
Architecture: amd64 armhf
Architecture: amd64 armhf arm64
Depends: \${misc:Depends}, lsb-base (>= 3.0-6), sysvinit | sysvinit-utils
Conflicts: freeswitch-init
Provides: freeswitch-init
@ -1033,7 +1036,7 @@ EOF
else
cat <<EOF
Package: freeswitch-systemd
Architecture: amd64 armhf
Architecture: amd64 armhf arm64
Depends: \${misc:Depends}, systemd
Conflicts: freeswitch-init, freeswitch-all (<= 1.6.7)
Provides: freeswitch-init
@ -1051,7 +1054,7 @@ print_mod_control () {
cat <<EOF
Package: freeswitch-${module_name//_/-}
Section: ${m_section}
Architecture: amd64 armhf
Architecture: amd64 armhf arm64
$(debian_wrap "Depends: \${shlibs:Depends}, \${misc:Depends}, libfreeswitch1 (= \${binary:Version}), ${depends}")
$(debian_wrap "Recommends: ${recommends}")
$(debian_wrap "Suggests: freeswitch-${module_name//_/-}-dbg, ${suggests}")
@ -1066,7 +1069,7 @@ Description: ${description} for FreeSWITCH
Package: freeswitch-${module_name//_/-}-dbg
Section: debug
Priority: optional
Architecture: amd64 armhf
Architecture: amd64 armhf arm64
Depends: \${misc:Depends},
freeswitch-${module_name//_/-} (= \${binary:Version})
Description: ${description} for FreeSWITCH (debug)
@ -1131,7 +1134,7 @@ print_conf_overrides () {
print_conf_control () {
cat <<EOF
Package: freeswitch-conf-${conf//_/-}
Architecture: amd64 armhf
Architecture: amd64 armhf arm64
Depends: \${misc:Depends}
Conflicts: freeswitch-all (<= 1.6.7)
Description: FreeSWITCH ${conf} configuration
@ -1165,7 +1168,7 @@ print_lang_control () {
esac
cat <<EOF
Package: freeswitch-lang-${lang//_/-}
Architecture: amd64 armhf
Architecture: amd64 armhf arm64
Depends: \${misc:Depends}
Recommends: freeswitch-sounds-${lang}
Conflicts: freeswitch-all (<= 1.6.7)

40
debian/util.sh vendored
View File

@ -140,14 +140,16 @@ prep_create_orig () {
set -e
local OPTIND OPTARG
local uver="" hrev="" bundle_deps=true
local uver="" hrev="" bundle_deps=true soft_reset=false
while getopts 'bm:nv:z:' o "$@"; do
while getopts 'bm:nv:V:xz:' o "$@"; do
case "$o" in
b) ;;
m) ;;
n) uver="nightly";;
v) uver="$OPTARG";;
V) uver="$OPTARG";;
x) soft_reset=true;;
z) ;;
esac
done
@ -161,8 +163,12 @@ prep_create_orig () {
local treeish="$1"
[ -n "$treeish" ] || treeish="HEAD"
if $soft_reset; then
git reset --soft "$treeish"
else
check_repo_clean
git reset --hard "$treeish"
fi
if $bundle_deps; then
(cd libs && getlibs)
@ -180,23 +186,29 @@ create_orig () {
set -e
local OPTIND OPTARG
local bundle_deps=true modules_list="" zl=9e
local bundle_deps=true modules_list="" soft_reset=false auto_orig=false zl=9e
local uver="$(prep_create_orig "$@")"
while getopts 'bm:nv:z:' o "$@"; do
while getopts 'bm:nv:V:xz:' o "$@"; do
case "$o" in
b) ;;
m) modules_list="$OPTARG";;
n) ;;
v) ;;
V) auto_orig=true;;
x) soft_reset=true;;
z) zl="$OPTARG";;
esac
done
shift $(($OPTIND-1))
local dver="$(mk_dver "$uver")"
local orig="../freeswitch_$dver~$(lsb_release -sc).orig.tar.xz"
local orig
if $auto_orig; then
orig="../freeswitch_$(debian/version-omit_revision.pl).orig.tar.xz"
else
orig="../freeswitch_$(mk_dver "$uver")~$(lsb_release -sc).orig.tar.xz"
fi
mv .gitattributes .gitattributes.orig
@ -223,7 +235,11 @@ create_orig () {
mv .gitattributes.orig .gitattributes
if $soft_reset; then
git reset --soft HEAD^
else
git reset --hard HEAD^ && git clean -fdx
fi
} 1>&2
echo $orig
}
@ -292,9 +308,9 @@ create_dsc () {
prep_create_dsc "$@"
local OPTIND OPTARG suite_postfix="" suite_postfix_p=false zl=9
local OPTIND OPTARG suite_postfix="" suite_postfix_p=false soft_reset=false zl=9
while getopts 'a:f:m:p:s:u:z:' o "$@"; do
while getopts 'a:f:m:p:s:u:xz:' o "$@"; do
case "$o" in
a) ;;
f) ;;
@ -302,6 +318,7 @@ create_dsc () {
p) ;;
s) ;;
u) suite_postfix="$OPTARG"; suite_postfix_p=true;;
x) soft_reset=true;;
z) zl="$OPTARG";;
esac
done
@ -328,7 +345,11 @@ create_dsc () {
local dsc="../$(dsc_base).dsc"
if $soft_reset; then
git reset --soft HEAD^
else
git reset --hard HEAD^ && git clean -fdx
fi
} 1>&2
echo $dsc
}
@ -686,6 +707,7 @@ commands:
Set FS bootstrap/build -j flags
-u <suite-postfix>
Specify a custom suite postfix
-x Use git soft reset instead of hard reset
-z Set compression level
create-orig <treeish> (same for 'prep_create_orig')
@ -694,6 +716,8 @@ commands:
Choose custom list of modules to build
-n Nightly build
-v Set version
-V Set version (without replacing every '-' to '~')
-x Use git soft reset instead of hard reset
-z Set compression level
EOF

22
debian/version-omit_revision.pl vendored Executable file
View File

@ -0,0 +1,22 @@
#!/usr/bin/perl
use strict;
use warnings;
use Dpkg::Version;
my $version;
open(my $fh, '-|', 'dpkg-parsechangelog -S version') or die "Failed to execute dpkg-parsechangelog: $!";
{
local $/;
$version = <$fh>;
}
close $fh;
$version =~ s/\s+$//;
die "No version found or empty output from dpkg-parsechangelog" unless defined $version and $version ne '';
my $v = Dpkg::Version->new($version);
my $vs = $v->as_string(omit_epoch => 1, omit_revision => 1);
print "$vs\n";

View File

@ -64,6 +64,9 @@ static int remap_prob(int v, int m) {
228, 229, 17, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241,
18, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 19,
};
assert(m > 0);
v--;
m--;
if ((m << 1) <= MAX_PROB)

View File

@ -167,6 +167,8 @@ static void scale1d_c(const unsigned char *source, int source_step,
(void)source_length;
assert(dest_scale);
/* These asserts are needed if there are boundary issues... */
/*assert ( dest_scale > source_scale );*/
/*assert ( (source_length-1) * dest_scale >= (dest_length-1) * source_scale

View File

@ -11,6 +11,8 @@
#ifndef VPX_VPX_SCALE_VPX_SCALE_H_
#define VPX_VPX_SCALE_VPX_SCALE_H_
#include <assert.h>
#include "vpx_scale/yv12config.h"
extern void vpx_scale_frame(YV12_BUFFER_CONFIG *src, YV12_BUFFER_CONFIG *dst,

View File

@ -1514,6 +1514,11 @@ SWITCH_DECLARE(switch_status_t) switch_digest_string(const char *digest_name, ch
SWITCH_DECLARE(char *) switch_must_strdup(const char *_s);
SWITCH_DECLARE(const char *) switch_memory_usage_stream(switch_stream_handle_t *stream);
/**
/ Compliant random number generator. Returns the value between 0 and 0x7fff (RAND_MAX).
**/
SWITCH_DECLARE(int) switch_rand(void);
SWITCH_END_EXTERN_C
#endif
/* For Emacs:

View File

@ -906,7 +906,7 @@ static void fs_rtp_parse_h263_rfc2190(h264_codec_context_t *context, AVPacket *p
#if (LIBAVCODEC_VERSION_MAJOR < LIBAVCODEC_V)
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Should Not Happen!!! mb_info_pos=%d mb_info_count=%d mb_info_size=%d\n", mb_info_pos, mb_info_count, mb_info_size);
#else
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Should Not Happen!!! mb_info_pos=%d mb_info_count=%d mb_info_size=%ld\n", mb_info_pos, mb_info_count, mb_info_size);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Should Not Happen!!! mb_info_pos=%d mb_info_count=%d mb_info_size=%"SWITCH_SIZE_T_FMT"\n", mb_info_pos, mb_info_count, mb_info_size);
#endif
}
}

View File

@ -40,6 +40,11 @@ SWITCH_MODULE_DEFINITION(mod_fsv, mod_fsv_load, NULL, NULL);
#define VID_BIT (1 << 31)
#define VERSION 4202
typedef struct fsv_video_data_s {
uint32_t size;
uint8_t data[];
} fsv_video_data_t;
struct file_header {
int32_t version;
char video_codec_name[32];
@ -983,15 +988,16 @@ again:
}
if (size & VID_BIT) { /* video */
uint8_t *video_data = malloc(sizeof(size) + size);
fsv_video_data_t *video_data;
switch_size_t read_size;
switch_assert(video_data);
size &= ~VID_BIT;
video_data = malloc(sizeof(fsv_video_data_t) + size);
switch_assert(video_data);
read_size = size;
*(uint32_t *)video_data = size;
video_data->size = size;
status = switch_file_read(context->fd, video_data + sizeof(size), &read_size);
status = switch_file_read(context->fd, video_data->data, &read_size);
if (status != SWITCH_STATUS_SUCCESS || read_size != size) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR,
@ -1033,7 +1039,7 @@ static switch_status_t fsv_file_read_video(switch_file_handle_t *handle, switch_
fsv_file_context *context = handle->private_info;
switch_image_t *dup = NULL;
switch_status_t status = SWITCH_STATUS_SUCCESS;
void *video_packet = NULL;
fsv_video_data_t *video_packet = NULL;
switch_time_t start = switch_time_now();
switch_status_t decode_status = SWITCH_STATUS_MORE_DATA;
int new_img = 0;
@ -1047,8 +1053,9 @@ static switch_status_t fsv_file_read_video(switch_file_handle_t *handle, switch_
switch_rtp_hdr_t *rtp;
while (1) {
video_packet = NULL;
switch_mutex_lock(context->mutex);
status = switch_queue_trypop(context->video_queue, &video_packet);
status = switch_queue_trypop(context->video_queue, (void**)&video_packet);
switch_mutex_unlock(context->mutex);
if (status != SWITCH_STATUS_SUCCESS || !video_packet) {
@ -1065,13 +1072,13 @@ static switch_status_t fsv_file_read_video(switch_file_handle_t *handle, switch_
break;
}
size = *(uint32_t *)video_packet;
size = video_packet->size;
if (size > sizeof(context->video_packet_buffer)) {
free(video_packet);
return SWITCH_STATUS_BREAK;
}
memcpy(context->video_packet_buffer, (uint8_t *)video_packet + sizeof(uint32_t), size);
memcpy(context->video_packet_buffer, video_packet->data, size);
free(video_packet);
video_packet = NULL;
@ -1093,14 +1100,15 @@ static switch_status_t fsv_file_read_video(switch_file_handle_t *handle, switch_
uint32_t size;
switch_rtp_hdr_t *rtp;
video_packet = NULL;
switch_mutex_lock(context->mutex);
status = switch_queue_trypop(context->video_queue, &video_packet);
status = switch_queue_trypop(context->video_queue, (void**)&video_packet);
switch_mutex_unlock(context->mutex);
if (status != SWITCH_STATUS_SUCCESS || !video_packet) break;
size = *(uint32_t *)video_packet;
rtp = (switch_rtp_hdr_t *)((uint8_t *)video_packet + sizeof(uint32_t));
size = video_packet->size;
rtp = (switch_rtp_hdr_t *)(video_packet->data);
rtp_frame.packet = rtp;
rtp_frame.packetlen = size;

View File

@ -2129,6 +2129,46 @@ SWIGEXPORT int SWIGSTDCALL CSharp_FreeSWITCHfNative_LOST_BURST_CAPTURE_get___()
}
SWIGEXPORT void SWIGSTDCALL CSharp_FreeSWITCHfNative_switch_uint31_t_value_set___(void * jarg1, unsigned int jarg2) {
switch_uint31_t *arg1 = (switch_uint31_t *) 0 ;
unsigned int arg2 ;
arg1 = (switch_uint31_t *)jarg1;
arg2 = (unsigned int)jarg2;
if (arg1) (arg1)->value = arg2;
}
SWIGEXPORT unsigned int SWIGSTDCALL CSharp_FreeSWITCHfNative_switch_uint31_t_value_get___(void * jarg1) {
unsigned int jresult ;
switch_uint31_t *arg1 = (switch_uint31_t *) 0 ;
unsigned int result;
arg1 = (switch_uint31_t *)jarg1;
result = (unsigned int) ((arg1)->value);
jresult = result;
return jresult;
}
SWIGEXPORT void * SWIGSTDCALL CSharp_FreeSWITCHfNative_new_switch_uint31_t___() {
void * jresult ;
switch_uint31_t *result = 0 ;
result = (switch_uint31_t *)new switch_uint31_t();
jresult = (void *)result;
return jresult;
}
SWIGEXPORT void SWIGSTDCALL CSharp_FreeSWITCHfNative_delete_switch_uint31_t___(void * jarg1) {
switch_uint31_t *arg1 = (switch_uint31_t *) 0 ;
arg1 = (switch_uint31_t *)jarg1;
delete arg1;
}
SWIGEXPORT void SWIGSTDCALL CSharp_FreeSWITCHfNative_switch_dtmf_t_digit_set___(void * jarg1, char jarg2) {
switch_dtmf_t *arg1 = (switch_dtmf_t *) 0 ;
char arg2 ;
@ -23521,6 +23561,16 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_FreeSWITCHfNative_switch_memory_usage_strea
}
SWIGEXPORT int SWIGSTDCALL CSharp_FreeSWITCHfNative_switch_rand___() {
int jresult ;
int result;
result = (int)switch_rand();
jresult = result;
return jresult;
}
SWIGEXPORT void SWIGSTDCALL CSharp_FreeSWITCHfNative_profile_node_t_var_set___(void * jarg1, char * jarg2) {
profile_node_s *arg1 = (profile_node_s *) 0 ;
char *arg2 = (char *) 0 ;

View File

@ -11585,6 +11585,11 @@ else
return ret;
}
public static int switch_rand() {
int ret = freeswitchPINVOKE.switch_rand();
return ret;
}
public static switch_caller_extension switch_caller_extension_new(SWIGTYPE_p_switch_core_session session, string extension_name, string extension_number) {
global::System.IntPtr cPtr = freeswitchPINVOKE.switch_caller_extension_new(SWIGTYPE_p_switch_core_session.getCPtr(session), extension_name, extension_number);
switch_caller_extension ret = (cPtr == global::System.IntPtr.Zero) ? null : new switch_caller_extension(cPtr, false);
@ -15975,6 +15980,18 @@ class freeswitchPINVOKE {
[global::System.Runtime.InteropServices.DllImport("mod_managed", EntryPoint="CSharp_FreeSWITCHfNative_LOST_BURST_CAPTURE_get___")]
public static extern int LOST_BURST_CAPTURE_get();
[global::System.Runtime.InteropServices.DllImport("mod_managed", EntryPoint="CSharp_FreeSWITCHfNative_switch_uint31_t_value_set___")]
public static extern void switch_uint31_t_value_set(global::System.Runtime.InteropServices.HandleRef jarg1, uint jarg2);
[global::System.Runtime.InteropServices.DllImport("mod_managed", EntryPoint="CSharp_FreeSWITCHfNative_switch_uint31_t_value_get___")]
public static extern uint switch_uint31_t_value_get(global::System.Runtime.InteropServices.HandleRef jarg1);
[global::System.Runtime.InteropServices.DllImport("mod_managed", EntryPoint="CSharp_FreeSWITCHfNative_new_switch_uint31_t___")]
public static extern global::System.IntPtr new_switch_uint31_t();
[global::System.Runtime.InteropServices.DllImport("mod_managed", EntryPoint="CSharp_FreeSWITCHfNative_delete_switch_uint31_t___")]
public static extern void delete_switch_uint31_t(global::System.Runtime.InteropServices.HandleRef jarg1);
[global::System.Runtime.InteropServices.DllImport("mod_managed", EntryPoint="CSharp_FreeSWITCHfNative_switch_dtmf_t_digit_set___")]
public static extern void switch_dtmf_t_digit_set(global::System.Runtime.InteropServices.HandleRef jarg1, char jarg2);
@ -21099,6 +21116,9 @@ class freeswitchPINVOKE {
[global::System.Runtime.InteropServices.DllImport("mod_managed", EntryPoint="CSharp_FreeSWITCHfNative_switch_memory_usage_stream___")]
public static extern string switch_memory_usage_stream(global::System.Runtime.InteropServices.HandleRef jarg1);
[global::System.Runtime.InteropServices.DllImport("mod_managed", EntryPoint="CSharp_FreeSWITCHfNative_switch_rand___")]
public static extern int switch_rand();
[global::System.Runtime.InteropServices.DllImport("mod_managed", EntryPoint="CSharp_FreeSWITCHfNative_profile_node_t_var_set___")]
public static extern void profile_node_t_var_set(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2);
@ -47333,6 +47353,64 @@ public class switch_timer_interface : global::System.IDisposable {
namespace FreeSWITCH.Native {
public class switch_uint31_t : global::System.IDisposable {
private global::System.Runtime.InteropServices.HandleRef swigCPtr;
protected bool swigCMemOwn;
internal switch_uint31_t(global::System.IntPtr cPtr, bool cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
}
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(switch_uint31_t obj) {
return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
}
~switch_uint31_t() {
Dispose();
}
public virtual void Dispose() {
lock(this) {
if (swigCPtr.Handle != global::System.IntPtr.Zero) {
if (swigCMemOwn) {
swigCMemOwn = false;
freeswitchPINVOKE.delete_switch_uint31_t(swigCPtr);
}
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
}
global::System.GC.SuppressFinalize(this);
}
}
public uint value {
set {
freeswitchPINVOKE.switch_uint31_t_value_set(swigCPtr, value);
}
get {
uint ret = freeswitchPINVOKE.switch_uint31_t_value_get(swigCPtr);
return ret;
}
}
public switch_uint31_t() : this(freeswitchPINVOKE.new_switch_uint31_t(), true) {
}
}
}
//------------------------------------------------------------------------------
// <auto-generated />
//
// This file was automatically generated by SWIG (http://www.swig.org).
// Version 3.0.12
//
// Do not make changes to this file unless you know what you are doing--modify
// the SWIG interface file instead.
//------------------------------------------------------------------------------
namespace FreeSWITCH.Native {
public class switch_unicast_conninfo : global::System.IDisposable {
private global::System.Runtime.InteropServices.HandleRef swigCPtr;
protected bool swigCMemOwn;

View File

@ -150,7 +150,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_port_allocator_request_port(switch_c
switch_mutex_lock(alloc->mutex);
srand((unsigned) ((unsigned) (intptr_t) port_ptr + (unsigned) (intptr_t) switch_thread_self() + switch_micro_time_now()));
while (alloc->track_used < alloc->track_len) {
while (alloc->track_len && alloc->track_used < alloc->track_len) {
uint32_t index;
uint32_t tries = 0;

View File

@ -4811,6 +4811,67 @@ done:
return status;
}
SWITCH_DECLARE(int) switch_rand(void)
{
uint32_t random_number = 0;
#ifdef WIN32
BCRYPT_ALG_HANDLE hAlgorithm = NULL;
NTSTATUS status = BCryptOpenAlgorithmProvider(&hAlgorithm, BCRYPT_RNG_ALGORITHM, NULL, 0);
if (!BCRYPT_SUCCESS(status)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "BCryptOpenAlgorithmProvider failed with status %d\n", status);
return 1;
}
status = BCryptGenRandom(hAlgorithm, (PUCHAR)&random_number, sizeof(random_number), 0);
if (!BCRYPT_SUCCESS(status)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "BCryptGenRandom failed with status %d\n", status);
BCryptCloseAlgorithmProvider(hAlgorithm, 0);
return 1;
}
BCryptCloseAlgorithmProvider(hAlgorithm, 0);
/* Make sure we return from 0 to RAND_MAX */
return (random_number & 0x7FFF);
#elif defined(__unix__) || defined(__APPLE__)
int random_fd = open("/dev/urandom", O_RDONLY);
ssize_t result;
char error_msg[100];
if (random_fd == -1) {
strncpy(error_msg, strerror(errno), sizeof(error_msg) - 1);
error_msg[sizeof(error_msg) - 1] = '\0';
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "open failed: %s\n", error_msg);
return 1;
}
result = read(random_fd, &random_number, sizeof(random_number));
if (result < 0) {
strncpy(error_msg, strerror(errno), sizeof(error_msg) - 1);
error_msg[sizeof(error_msg) - 1] = '\0';
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "read failed: %s\n", error_msg);
close(random_fd);
return 1;
}
close(random_fd);
/* Make sure we return from 0 to RAND_MAX */
return (random_number & 0x7FFF);
#else
return rand();
#endif
}
/* For Emacs:
* Local Variables:
* mode:c

View File

@ -206,7 +206,9 @@ SWITCH_DECLARE(switch_vad_state_t) switch_vad_process(switch_vad_t *vad, int16_t
j += vad->channels;
}
if (samples && vad->divisor && samples >= vad->divisor) {
score = (uint32_t)(energy / (samples / vad->divisor));
}
#ifdef SWITCH_HAVE_FVAD
}
#endif

View File

@ -53,6 +53,27 @@ FST_CORE_BEGIN("./conf")
}
FST_TEARDOWN_END()
FST_TEST_BEGIN(test_switch_rand)
{
int i, c = 0;
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "\nLet's generate a few random numbers.\n");
for (i = 0; i < 10; i++) {
uint32_t rnd = switch_rand();
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Random number %d\n", rnd);
if (rnd == 1) {
c++;
}
}
/* We do not expect all random numbers to be 1 all 10 times. That would mean we have an error OR we are lucky to have 10 random ones! */
fst_check(c < 10);
}
FST_TEST_END()
FST_TEST_BEGIN(test_switch_uint31_t_overflow)
{
switch_uint31_t x;

View File

@ -13,7 +13,7 @@
<SchemaVersion>2.0</SchemaVersion>
<OutputName>FreeSWITCH</OutputName>
<OutputType>Package</OutputType>
<CertificateThumbprint>bf386393c880967b00adbc438aee534de6211774</CertificateThumbprint>
<CertificateThumbprint>076ce3c57198fc39443bd87f4aab86dac0aab62d</CertificateThumbprint>
<TimestampUrl>http://timestamp.comodoca.com</TimestampUrl>
<SignToolPath Condition=" Exists('$(WindowsSDK80Path)bin\x86\signtool.exe') and '$(SignToolPath)'=='' and '$(PROCESSOR_ARCHITECTURE)'=='x86' ">$(WindowsSDK80Path)bin\x86\signtool.exe</SignToolPath>
<SignToolPath Condition=" Exists('$(WindowsSDK80Path)bin\x64\signtool.exe') and '$(SignToolPath)'=='' and '$(PROCESSOR_ARCHITECTURE)'=='AMD64' ">$(WindowsSDK80Path)bin\x64\signtool.exe</SignToolPath>
@ -1032,6 +1032,7 @@
SuppressRegistry="true"
SuppressCom="true"
SuppressFragments="true"
RunAsSeparateProcess="true"
PreprocessorVariable="var.FreeSWITCHConfFilesDir">
</HeatDirectory>
<HeatDirectory
@ -1045,6 +1046,7 @@
SuppressRegistry="true"
SuppressCom="true"
SuppressFragments="true"
RunAsSeparateProcess="true"
PreprocessorVariable="var.FreeSWITCHSoundFilesDir">
</HeatDirectory>
<HeatDirectory
@ -1058,6 +1060,7 @@
SuppressRegistry="true"
SuppressCom="true"
SuppressFragments="true"
RunAsSeparateProcess="true"
PreprocessorVariable="var.FreeSWITCHhtdocsFilesDir">
</HeatDirectory>
<HeatDirectory
@ -1071,6 +1074,7 @@
SuppressRegistry="true"
SuppressCom="true"
SuppressFragments="true"
RunAsSeparateProcess="true"
PreprocessorVariable="var.FreeSWITCHimagesFilesDir">
</HeatDirectory>
<HeatDirectory
@ -1084,6 +1088,7 @@
SuppressRegistry="true"
SuppressCom="true"
SuppressFragments="true"
RunAsSeparateProcess="true"
PreprocessorVariable="var.FreeSWITCHfontsFilesDir">
</HeatDirectory>
<HeatDirectory
@ -1097,6 +1102,7 @@
SuppressRegistry="true"
SuppressCom="true"
SuppressFragments="true"
RunAsSeparateProcess="true"
PreprocessorVariable="var.FreeSWITCHgrammarFilesDir">
</HeatDirectory>
<HeatDirectory
@ -1111,6 +1117,7 @@
SuppressRegistry="true"
SuppressCom="true"
SuppressFragments="true"
RunAsSeparateProcess="true"
PreprocessorVariable="var.FreeSWITCHBaseDir">
</HeatDirectory>
</Target>