Skip to content

Commit

Permalink
Merge branch 'master' into v1.10
Browse files Browse the repository at this point in the history
  • Loading branch information
andywolk committed Dec 22, 2023
2 parents 4cb05e7 + 6ae8ce6 commit f24064f
Show file tree
Hide file tree
Showing 47 changed files with 5,459 additions and 7,960 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ This is the place to get answers faster and chat with other users in real time.
Slack Community:
* https://signalwire.community/

Mailing list:
Mailing list (ARCHIVED):

* http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
* http://lists.freeswitch.org/pipermail/freeswitch-users/

**Thank you for using FreeSWITCH!**
2 changes: 1 addition & 1 deletion build/next-release.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.10.10-release
1.10.11-release
1,204 changes: 657 additions & 547 deletions conf/curl/autoload_configs/timezones.conf.xml

Large diffs are not rendered by default.

1,204 changes: 657 additions & 547 deletions conf/insideout/autoload_configs/timezones.conf.xml

Large diffs are not rendered by default.

2,493 changes: 652 additions & 1,841 deletions conf/minimal/autoload_configs/timezones.conf.xml

Large diffs are not rendered by default.

1,204 changes: 657 additions & 547 deletions conf/rayo/autoload_configs/timezones.conf.xml

Large diffs are not rendered by default.

1,204 changes: 657 additions & 547 deletions conf/sbc/autoload_configs/timezones.conf.xml

Large diffs are not rendered by default.

2,493 changes: 652 additions & 1,841 deletions conf/testing/autoload_configs/timezones.conf.xml

Large diffs are not rendered by default.

2,459 changes: 652 additions & 1,807 deletions conf/vanilla/autoload_configs/timezones.conf.xml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

# Must change all of the below together
# For a release, set revision for that tagged release as well and uncomment
AC_INIT([freeswitch], [1.10.10-release], [email protected])
AC_INIT([freeswitch], [1.10.11-release], [email protected])
AC_SUBST(SWITCH_VERSION_MAJOR, [1])
AC_SUBST(SWITCH_VERSION_MINOR, [10])
AC_SUBST(SWITCH_VERSION_MICRO, [10-release])
AC_SUBST(SWITCH_VERSION_MICRO, [11-release])
AC_SUBST(SWITCH_VERSION_REVISION, [])
AC_SUBST(SWITCH_VERSION_REVISION_HUMAN, [])

Expand Down Expand Up @@ -716,7 +716,7 @@ PKG_CHECK_MODULES([SPANDSP], [spandsp >= 3.0],[
AC_MSG_ERROR([no usable spandsp; please install spandsp3 devel package or equivalent])
])

PKG_CHECK_MODULES([SOFIA_SIP], [sofia-sip-ua >= 1.13.15],[
PKG_CHECK_MODULES([SOFIA_SIP], [sofia-sip-ua >= 1.13.17],[
AM_CONDITIONAL([HAVE_SOFIA_SIP],[true])],[
AC_MSG_ERROR([no usable sofia-sip; please install sofia-sip-ua devel package or equivalent])
])
Expand Down
4 changes: 2 additions & 2 deletions debian/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ Build-Depends:
uuid-dev, libexpat1-dev, libgdbm-dev, libdb-dev,
# used by many modules
libcurl4-openssl-dev | libcurl4-gnutls-dev | libcurl-dev,
bison, zlib1g-dev, libsofia-sip-ua-dev (>= 1.13.15),
bison, zlib1g-dev, libsofia-sip-ua-dev (>= 1.13.17),
libspandsp3-dev,
# used to format the private freeswitch apt-repo key properly
gnupg,
Expand Down Expand Up @@ -374,7 +374,7 @@ Description: Cross-Platform Scalable Multi-Protocol Soft Switch
Package: libfreeswitch1
Architecture: amd64 armhf
Depends: \${shlibs:Depends}, \${misc:Depends}, libsofia-sip-ua0 (>= 1.13.15)
Depends: \${shlibs:Depends}, \${misc:Depends}, libsofia-sip-ua0 (>= 1.13.17)
Recommends:
Suggests: libfreeswitch1-dbg
Conflicts: freeswitch-all (<= 1.6.7)
Expand Down
18 changes: 10 additions & 8 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
These are the official Docker files for master branch and the current release packages.

## Volumes
These containers are setup so that you can mount your freeswitch configuration form a host or data volume container.
These containers are set up so that you can mount your freeswitch configuration from a host or data volume container.

To mount freeswitch Configuration
```
Expand All @@ -16,17 +16,19 @@ To mount tmp directory for storing recordings, etc

The container also has a healthcheck where it does a fs_cli status check to make sure the freeswitch service is still running.

# Ports
## Ports

The container exposes the following ports:
The container should be run with host networking using `docker run --network host ...`.

- 5060/tcp 5060/udp 5080/tcp 5080/udp as SIP Signaling ports.
- 5066/tcp 7443/tcp as WebSocket Signaling ports.
- 8021/tcp as Event Socket port.
- 64535-65535/udp as media ports.
- 16384-32768/udp
If you prefer to (or for some reason must) publish individual ports via `--publish/-p`, refer to this [issue](https://github.com/moby/moby/issues/11185) and this [potential workaround](https://hub.docker.com/r/bettervoice/freeswitch-container/) regarding using docker with large port ranges.

The following ports will be used, depending upon your specific configuration:

- 5060/tcp, 5060/udp, 5080/tcp, 5080/udp - SIP signaling
- 5061/tcp, 5081/tcp - SIPS signaling
- 5066/tcp, 7443/tcp - WebSocket signaling
- 8021/tcp - the Event Socket
- 16384-32768/udp, 64535-65535/udp - media


If you wish to help improve these please submit a pull request at:
Expand Down
55 changes: 29 additions & 26 deletions docker/master/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,56 +1,61 @@
# vim:set ft=dockerfile:
ARG DEBIAN_VERSION=buster
ARG DEBIAN_VERSION=bookworm
FROM debian:${DEBIAN_VERSION}

# ARGs are cleared after every FROM
# see: https://docs.docker.com/engine/reference/builder/#understand-how-arg-and-from-interact
ARG DEBIAN_VERSION
ARG TOKEN

# By default, install the full set of FreeSWITCH packages. Specify an alternative with:
# --build-arg="FS_META_PACKAGE=freeswitch-meta-vanilla"
# alternatives include:
# freeswitch-meta-bare
# freeswitch-meta-vanilla
# freeswitch-meta-sorbet
# freeswitch-meta-all-dbg
ARG FS_META_PACKAGE=freeswitch-meta-all

# Source Dockerfile:
# https://github.com/docker-library/postgres/blob/master/9.4/Dockerfile

# explicitly set user/group IDs
RUN groupadd -r freeswitch --gid=999 && useradd -r -g freeswitch --uid=999 freeswitch

# grab gosu for easy step-down from root
RUN apt-get update && apt-get install -y --no-install-recommends dirmngr gnupg2 ca-certificates wget \
&& gpg2 --keyserver hkp://keyserver.ubuntu.com --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \
&& gpg2 --keyserver hkp://keyserver.ubuntu.com --recv-keys 655DA1341B5207915210AFE936B4249FA7B0FB03 \
&& gpg2 --output /usr/share/keyrings/signalwire-freeswitch-repo.gpg --export 655DA1341B5207915210AFE936B4249FA7B0FB03 \
&& rm -rf /var/lib/apt/lists/* \
&& wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/1.2/gosu-$(dpkg --print-architecture)" \
&& wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/1.2/gosu-$(dpkg --print-architecture).asc" \
&& gpg --verify /usr/local/bin/gosu.asc \
&& rm /usr/local/bin/gosu.asc \
&& chmod +x /usr/local/bin/gosu \
&& apt-get purge -y --auto-remove ca-certificates wget dirmngr gnupg2

# make the "en_US.UTF-8" locale so freeswitch will be utf-8 enabled by default
RUN apt-get update && apt-get install -y locales && rm -rf /var/lib/apt/lists/* \
RUN apt-get update -qq \
&& apt-get install -y --no-install-recommends ca-certificates gnupg2 gosu locales wget \
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
ENV LANG en_US.utf8

# https://freeswitch.org/confluence/display/FREESWITCH/Debian
# https://developer.signalwire.com/freeswitch/FreeSWITCH-Explained/Installation/Linux/Debian_67240088/

RUN apt-get update && apt-get install ca-certificates lsb-release -y --no-install-recommends \
RUN wget --no-verbose --http-user=signalwire --http-password=${TOKEN} \
-O /usr/share/keyrings/signalwire-freeswitch-repo.gpg \
https://freeswitch.signalwire.com/repo/deb/debian-release/signalwire-freeswitch-repo.gpg \
&& echo "machine freeswitch.signalwire.com login signalwire password ${TOKEN}" > /etc/apt/auth.conf \
&& echo "deb [signed-by=/usr/share/keyrings/signalwire-freeswitch-repo.gpg] https://freeswitch.signalwire.com/repo/deb/debian-release/ `lsb_release -sc` main" > /etc/apt/sources.list.d/freeswitch.list \
&& apt-get update && apt-get install -y freeswitch-all \
&& apt-get purge -y --auto-remove ca-certificates lsb-release \
&& echo "deb [signed-by=/usr/share/keyrings/signalwire-freeswitch-repo.gpg] https://freeswitch.signalwire.com/repo/deb/debian-release/ ${DEBIAN_VERSION} main" > /etc/apt/sources.list.d/freeswitch.list \
&& apt-get -qq update \
&& apt-get install -y ${FS_META_PACKAGE} \
&& apt-get purge -y --auto-remove \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

COPY docker-entrypoint.sh /
# Add anything else here

## Ports
# Open the container up to the world.
### 8021 fs_cli, 5060 5061 5080 5081 sip and sips, 64535-65535 rtp
# Document ports used by this container
### 8021 fs_cli, 5060 5061 5080 5081 sip and sips, 5066 ws, 7443 wss, 8081 8082 verto, 16384-32768, 64535-65535 rtp
EXPOSE 8021/tcp
EXPOSE 5060/tcp 5060/udp 5080/tcp 5080/udp
EXPOSE 5061/tcp 5061/udp 5081/tcp 5081/udp
EXPOSE 5066/tcp
EXPOSE 7443/tcp
EXPOSE 5070/udp 5070/tcp
EXPOSE 8081/tcp 8082/tcp
EXPOSE 64535-65535/udp
EXPOSE 16384-32768/udp


# Volumes
## Freeswitch Configuration
VOLUME ["/etc/freeswitch"]
Expand All @@ -61,11 +66,9 @@ VOLUME ["/tmp"]
COPY build/freeswitch.limits.conf /etc/security/limits.d/

# Healthcheck to make sure the service is running
SHELL ["/bin/bash"]
SHELL ["/bin/bash", "-c"]
HEALTHCHECK --interval=15s --timeout=5s \
CMD fs_cli -x status | grep -q ^UP || exit 1

ENTRYPOINT ["/docker-entrypoint.sh"]


CMD ["freeswitch"]
2 changes: 1 addition & 1 deletion freeswitch.spec
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ BuildRequires: curl-devel >= 7.19
BuildRequires: gcc-c++
BuildRequires: libtool >= 1.5.17
BuildRequires: openssl-devel >= 1.0.1e
BuildRequires: sofia-sip-devel >= 1.13.15
BuildRequires: sofia-sip-devel >= 1.13.17
BuildRequires: spandsp3-devel >= 3.0
BuildRequires: pcre-devel
BuildRequires: speex-devel
Expand Down
5 changes: 5 additions & 0 deletions libs/libvpx/vp8/encoder/onyx_if.c
Original file line number Diff line number Diff line change
Expand Up @@ -1447,6 +1447,11 @@ void vp8_change_config(VP8_COMP *cpi, VP8_CONFIG *oxcf) {
last_h = cpi->oxcf.Height;
prev_number_of_layers = cpi->oxcf.number_of_layers;

if (cpi->initial_width) {
// TODO(https://crbug.com/1486441): Allow changing thread counts; the
// allocation is done once in vp8_create_compressor().
oxcf->multi_threaded = cpi->oxcf.multi_threaded;
}
cpi->oxcf = *oxcf;

switch (cpi->oxcf.Mode) {
Expand Down
12 changes: 6 additions & 6 deletions libs/libvpx/vp9/common/vp9_alloccommon.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,6 @@ int vp9_alloc_context_buffers(VP9_COMMON *cm, int width, int height) {
if (cm->alloc_mi(cm, new_mi_size)) goto fail;
}

if (cm->seg_map_alloc_size < cm->mi_rows * cm->mi_cols) {
// Create the segmentation map structure and set to 0.
free_seg_map(cm);
if (alloc_seg_map(cm, cm->mi_rows * cm->mi_cols)) goto fail;
}

if (cm->above_context_alloc_cols < cm->mi_cols) {
vpx_free(cm->above_context);
cm->above_context = (ENTROPY_CONTEXT *)vpx_calloc(
Expand All @@ -143,6 +137,12 @@ int vp9_alloc_context_buffers(VP9_COMMON *cm, int width, int height) {
cm->above_context_alloc_cols = cm->mi_cols;
}

if (cm->seg_map_alloc_size < cm->mi_rows * cm->mi_cols) {
// Create the segmentation map structure and set to 0.
free_seg_map(cm);
if (alloc_seg_map(cm, cm->mi_rows * cm->mi_cols)) goto fail;
}

if (vp9_alloc_loop_filter(cm)) goto fail;

return 0;
Expand Down
27 changes: 25 additions & 2 deletions libs/libvpx/vp9/encoder/vp9_encoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -1915,6 +1915,17 @@ static void alloc_copy_partition_data(VP9_COMP *cpi) {
}
}

static void free_copy_partition_data(VP9_COMP *cpi) {
vpx_free(cpi->prev_partition);
cpi->prev_partition = NULL;
vpx_free(cpi->prev_segment_id);
cpi->prev_segment_id = NULL;
vpx_free(cpi->prev_variance_low);
cpi->prev_variance_low = NULL;
vpx_free(cpi->copied_frame_cnt);
cpi->copied_frame_cnt = NULL;
}

void vp9_change_config(struct VP9_COMP *cpi, const VP9EncoderConfig *oxcf) {
VP9_COMMON *const cm = &cpi->common;
RATE_CONTROL *const rc = &cpi->rc;
Expand Down Expand Up @@ -1999,6 +2010,8 @@ void vp9_change_config(struct VP9_COMP *cpi, const VP9EncoderConfig *oxcf) {
new_mi_size = cm->mi_stride * calc_mi_size(cm->mi_rows);
if (cm->mi_alloc_size < new_mi_size) {
vp9_free_context_buffers(cm);
vp9_free_pc_tree(&cpi->td);
vpx_free(cpi->mbmi_ext_base);
alloc_compressor_data(cpi);
realloc_segmentation_maps(cpi);
cpi->initial_width = cpi->initial_height = 0;
Expand All @@ -2014,8 +2027,18 @@ void vp9_change_config(struct VP9_COMP *cpi, const VP9EncoderConfig *oxcf) {
update_frame_size(cpi);

if (last_w != cpi->oxcf.width || last_h != cpi->oxcf.height) {
memset(cpi->consec_zero_mv, 0,
cm->mi_rows * cm->mi_cols * sizeof(*cpi->consec_zero_mv));
vpx_free(cpi->consec_zero_mv);
CHECK_MEM_ERROR(
cm, cpi->consec_zero_mv,
vpx_calloc(cm->mi_rows * cm->mi_cols, sizeof(*cpi->consec_zero_mv)));

vpx_free(cpi->skin_map);
CHECK_MEM_ERROR(
cm, cpi->skin_map,
vpx_calloc(cm->mi_rows * cm->mi_cols, sizeof(cpi->skin_map[0])));

free_copy_partition_data(cpi);
alloc_copy_partition_data(cpi);
if (cpi->oxcf.aq_mode == CYCLIC_REFRESH_AQ)
vp9_cyclic_refresh_reset_resize(cpi);
rc->rc_1_frame = 0;
Expand Down
28 changes: 28 additions & 0 deletions scripts/perl/timezones/build-zonedata.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/perl

use strict;
use warnings;

my $remote_version = `wget --quiet https://data.iana.org/time-zones/tzdb/version --output-document -` =~ s/\n//r;
my $local_version;

if ( open my $in, "<data/version" ) {
$local_version = do { local $/; <$in> };
close $in;
}

my $up_to_date = defined($local_version) && $local_version eq $remote_version;

if ( ! $up_to_date ) {
open my $out, ">data/version";
print $out $remote_version;
close $out;
}

$local_version = $remote_version;

`wget --quiet --timestamping --directory-prefix=data https://data.iana.org/time-zones/tzdb-latest.tar.lz`;
`tar --extract --file=data/tzdb-latest.tar.lz --directory=data`;
`make DESTDIR=../ TZDIR=zones-$local_version --directory=data/tzdb-$local_version posix_only`;

print("Yay. Now you can run\n ./timezone-gen.pl --base=data/zones-$local_version --output=timezones-$local_version.conf.xml")
4 changes: 4 additions & 0 deletions scripts/perl/timezones/data/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
tzdb-*
zones-*
version
tzdb-latest.tar.lz
61 changes: 61 additions & 0 deletions scripts/perl/timezones/fix-tzstr.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#!/usr/bin/perl

sub fixTzstr {
# switch_time.c expects POSIX-style TZ rule, but it won't process quoted TZ
# rules that look like this: <-04>4 or <-04>4<-03>
# See https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_03

# Instead it defaults to UTC for these values. Here we process the quoted
# values and convert them into letters. If the zone name has "GMT", we use
# that as the replacement prefix, otherwise a default "STD" is used. Zones
# that have a quoted suffix have their suffix replaced with "DST".

my ($tzstr, $name) = @_;

if ( $tzstr =~ /(<(?<std>[^>]+)>)([^<]+)(?<dst><.+>)?(?<rest>.+)?/ ) {
my ($tzprefix, $tzsuffix, $tzrest, $offset, $offsetprefix) = ("") x 5;

if ( defined($+{std}) ) {
my $std = $+{std};

if ( lc($name) =~ m/gmt/) {
$tzprefix = "GMT";
} else {
$tzprefix = "STD";
}

if ( $std =~ m/\+/ ) {
$offset = sprintf "%d", $std =~ s/\+//r;
$offsetprefix = "-";
} else {
$offset = sprintf "%d", $std =~ s/\-//r;
}

my @chars = split(//, $offset);
if ( @chars > 2 ) {
my $hours = $chars[-3];
if ( defined( $chars[-4] ) ) {
$hours = $chars[-4].$hours;
}

$offset = $hours.":".$chars[-2].$chars[-1];
}

$offset = $offsetprefix.$offset;
}

if ( defined($+{dst}) ) {
$tzsuffix = "DST";
}

if ( defined($+{rest}) ) {
$tzrest = $+{rest};
}

return $tzprefix.$offset.$tzsuffix.$tzrest;
}

return $tzstr;
}

1;
Loading

0 comments on commit f24064f

Please sign in to comment.