Commit Graph

700 Commits

Author SHA1 Message Date
Jean Aunis d9fae4a824 build : Fix cross-compilation errors
Bundled pjproject and jansson must be configured with the host and build
parameters provided to the configure script.
Autotools do not permit to check for the existence of local header files, so
the control of hrirs.h must not be done when cross-compiling.

ASTERISK-28250

Change-Id: If0a76e52a87d4ab82b7d4c72d27d8759ca931880
2019-01-23 15:19:26 +01:00
Sean Bright 6d69fb3cc2 utils: Wrap socket() and pipe() to reduce syscalls
Some platforms provide an implementation of socket() and pipe2() that allow the
caller to specify that the resulting file descriptors should be non-blocking.

Using these allows us to potentially elide 3 calls into 1 by avoiding extraneous
calls to fcntl() to set the O_NONBLOCK flag afterwards.

In passing, change ast_alertpipe_init() to use pipe2() directly instead of the
wrapper if it is available.

Change-Id: I3ebe654fb549587537161506c6c950f4ab298bb0
2018-12-07 09:06:08 -05:00
Chris-Savinovich 58e50e56cb core: Merge malloc_trim patch
We've had multiple opportunities where Richard Mudgett's
malloc_trim patch has been useful. Let's get it
pushed up to gerrit and merged.

Since malloc_trim is only available in libc, an entry is
added to configure.ac to create a definition for
HAVE_MALLOC_TRIM.

Change-Id: Ia38308c550149d9d6eae4ca414a649957de9700c
2018-12-03 14:01:01 -06:00
Nick French 37b2e68628 res_pjsip: Implement additional SIP RFCs for Google Voice trunk compatability
This change implements a few different generic things which were brought
on by Google Voice SIP.

1.  The concept of flow transports have been introduced.  These are
configurable transports in pjsip.conf which can be used to reference a
flow of signaling to a target.  These have runtime configuration that can
be changed by the signaling itself (such as Service-Routes and
P-Preferred-Identity).  When used these guarantee an individual connection
(in the case of TCP or TLS) even if multiple flow transports exist to the
same target.

2.  Service-Routes (RFC 3608) support has been added to the outbound
registration module which when received will be stored on the flow
transport and used for requests referencing it.

3.  P-Associated-URI / P-Preferred-Identity (RFC 3325) support has been
added to the outbound registration module.  If a P-Associated-URI header
is received it will be used on requests as the P-Preferred-Identity.

4.  Configurable outbound extension support has been added to the outbound
registration module.  When set the extension will be placed in the
Supported header.

5.  Header parameters can now be configured on an outbound registration
which will be placed in the Contact header.

6.  Google specific OAuth / Bearer token authentication
(draft-ietf-sipcore-sip-authn-02) has been added to the outbound
registration module.

All functionality changes are controlled by pjsip.conf configuration
options and do not affect non-configured pjsip endpoints otherwise.

ASTERISK-27971 #close

Change-Id: Id214c2d1c550a41fcf564b7df8f3da7be565bd58
2018-10-24 07:51:25 -05:00
Joshua Colp 02bb329bb5 Merge "configure.ac: Check for unbound version >= 1.5" 2018-10-01 07:08:52 -05:00
George Joseph 1ba51b00cc configure.ac: Check for unbound version >= 1.5
In order to do this and provide good feedback, a new macro was
created (AST_EXT_LIB_EXTRA_CHECK) which does the normal check and
path setups for the library then compiles, links and runs a supplied
code fragment to do the final determination.  In this case, the
final code fragment compares UNBOUND_VERSION_MAJOR
and UNBOUND_VERSION_MINOR to determine if they're greater than or
equal to 1.5.

Since we require version 1.5, some code in res_resolver_unbound
was also simplified.

ASTERISK-28045
Reported by: Samuel Galarneau

Change-Id: Iee94ad543cd6f8b118df8c4c7afd9c4e2ca1fa72
2018-09-25 13:30:09 -06:00
Kevin Harwell 31fba4e869
rtp_engine: rtcp_report_to_json can overflow the ssrc integer value
When writing an RTCP report to json the code attempts to pack the "ssrc" and
"source_ssrc" unsigned integer values as a signed int value type. This of course
means if the ssrc's unsigned value is greater than that which can fit into a
signed integer value it gets converted to a negative number. Subsequently, the
negative value goes out in the json report.

This patch now packs the value as a json_int_t, which is the widest integer type
available on a given system. This should make it so the value no longer
overflows.

Note, this was caught by two failing tests hep/rtcp-receiver/ and
hep/rtcp-sender.

Change-Id: I2af275286ee5e795b79f0c3d450d9e4b28e958b0
2018-09-21 18:06:21 -04:00
Joshua Colp ce9a980be6 pjproject: Upgrade to 2.8.
This change brings in PJSIP 2.8, removes all the patches
that were merged upstream, and makes a minor change to
support a breaking change that was done.

ASTERISK-28059

Change-Id: I5097772b11b0f95c3c1f52df6400158666f0a189
2018-09-18 11:32:18 -05:00
Sean Bright 3d9deb35f0 autoconf: Check for srtp_get_version_string() before using it
Change-Id: Id2a916ff9448706090e72ff2c7fb3f5ba24a05df
2018-09-17 10:48:03 -05:00
Corey Farrell a2001c00e6 Create --disable-binary-modules option.
This new option can be passed for ./configure or
./tests/CI/buildAsterisk.sh to prevent download/install of binary
modules.

Normally enabling the categories MENUSELECT_CODECS or MENUSELECT_RES
will result in binary modules being enabled even if the build target is
incompatible with those modules.  This includes CI scripts which enable
categories before disabling specific modules.

If more binary modules are offered in the future this will help avoid
accidentally downloading them if unwanted or incompatible.  Adding a
binary module will only require creating a new menuselect entry similar
to the existing ones, it will not be necessary to modify the CI scripts.

Change-Id: I6b1bd1c75a2e48f05b8b8a45b7a7a2d00a079166
2018-08-27 13:22:31 -04:00
Alexander Traud 0a4d58735f BuildSystem: Enable Jansson in Solaris 11.
In Solaris, the header <jansson.h> is in /usr/include/jansson. To find
Jansson even in such a subdirectory, the tool pkg-config is queried via
AST_PKG_CONFIG_CHECK. For those platforms, which do not list Jansson via
pkg-config, the previous check remains and is executed thereafter.

Because the check for the NetBSD Editline library uses the tool pkg-config
the code of PKG_PROG_PKG_CONFIG must be used. Because that check happens
earlier than Jansson, it must be placed in front of that.

ASTERISK-27991

Change-Id: I69ea0f379f87a50049654b2487c76ee1c04fa53a
2018-07-28 14:39:40 +02:00
Corey Farrell ee154464d7 Enable bundling of jansson, require 2.11.
Change-Id: Ib3111b151d37cbda40768cf2a8a9c6cf6c5c7cbd
2018-07-20 13:42:02 -04:00
Alexander Traud 804d931f27 bridge_softmix_binaural: Enable FFTW3 in Solaris 11.
ASTERISK-27939

Change-Id: Ice5640e08385a64a0a6555deaccd91e86bca154f
2018-07-03 04:37:29 -05:00
George Joseph 880fbff6b7 res_pjsip_session: Add ability to accept multiple sdp answers
pjproject by default currently will follow media forked during an INVITE
on outbound calls if the To tag is different on a subsequent response as
that on an earlier response.  We handle this correctly.  There have
been reported cases where the To tag is the same but we still need to
follow the media.  The pjproject patch in this commit adds the
capability to sip_inv and also adds the capability to control it at
runtime.  The original "different tag" behavior was always controllable
at runtime but we never did anything with it and left it to default to
TRUE.

So, along with the pjproject patch, this commit adds options to both the
system and endpoint objects to control the two behaviors, and a small
logic change to session_inv_on_media_update in res_pjsip_session to
control the behavior at the endpoint level.

The default behavior for "different tags" remains the same at TRUE and
the default for "same tag" is FALSE.

Change-Id: I64d071942b79adb2f0a4e13137389b19404fe3d6
ASTERISK-27936
Reported-by: Ross Beer
2018-06-26 07:05:34 -06:00
Alexander Traud b01fc2ef3d res_rtp_asterisk: Instead of ./configure use OPENSSL_NO_SRTP.
Previously, Asterisk used its script ./configure, to test whether OpenSSL was
built with no-srtp (or was simply too old). However, the header file
<openssl/opensslconf.h> is the preferred way to detect the local configuration
of OpenSSL.

As a positive side-effect the script ./configure does not interleave the
detection of the Open Settlement Protocol Toolkit (OSPTK) with the detection of
individual features of OpenSSL anymore.

Change-Id: I3c77c7b00b2ffa2e935632097fa057b9fdf480c0
2018-06-13 08:00:58 -06:00
Alexander Traud 0743ad6422 res_rtp_asterisk: Allow OpenSSL configured with no-deprecated.
Furthermore, allow OpenSSL configured with no-dh. Additionally, this change
allows auto-negotiation of the elliptic curve/group for servers, not only with
OpenSSL 1.0.2 but also with OpenSSL 1.1.0 and newer. This enables X25519
(since OpenSSL 1.1.0) and X448 (since OpenSSL 1.1.1) as a side-effect.

ASTERISK-27910

Change-Id: I5b0dd47c5194ee17f830f869d629d7ef212cf537
2018-06-08 22:02:38 +02:00
Alexander Traud 2228ae3f27 tcptls: Repair ./configure --with-ssl=PATH.
SSL_OP_NO_TLSv1_1 and SSL_OP_NO_TLSv1_2 got discovered without honoring a PATH.

ASTERISK-27865

Change-Id: I8cd358eed7411726d08fa7b01691bef122fbeb71
2018-05-19 15:23:30 +02:00
Corey Farrell b5914d90ac Fix GCC 8 build issues.
This fixes build warnings found by GCC 8.  In some cases format
truncation is intentional so the warning is just suppressed.

ASTERISK-27824 #close

Change-Id: I724f146cbddba8b86619d4c4a9931ee877995c84
2018-05-11 09:48:58 -04:00
George Joseph 3bad41257b Merge "BuildSystem: Add DragonFly BSD." 2018-04-30 09:07:30 -05:00
Alexander Traud fe072f4405 BuildSystem: Enable IMAP storage on FreeBSD and DragonFly BSD.
ASTERISK-27639

Change-Id: I1347f3f2f3737010d0a80a5c30b5aaf71cf3ccb0
2018-04-20 14:14:59 +02:00
Alexander Traud efe40ff671 BuildSystem: Add DragonFly BSD.
ASTERISK-27820

Change-Id: I310896143e94d65da1c2be3bb448204a8b86d557
2018-04-20 12:50:03 +02:00
Corey Farrell 66f13ed694 Build System: Fixes for configure script.
* Replace all 'else if' statements with 'elif'.
* Use loop to detect versioned lua headers and libraries.

The loop for detecting lua fixes a bug where LUA_INCLUDE would be
appended with the directory of every lua version after the first one is
found.

Change-Id: I3276f9aee955014108345be6092f51c932b43a0f
2018-04-03 15:39:39 -04:00
Jenkins2 c66fde8247 Merge "BuildSystem: With external editline, do not require libs for internal editline." 2018-04-02 08:36:01 -05:00
Jenkins2 849089cba8 Merge "BuildSystem: pjsip_evsub_set_uas_timeout was not used (part 2)." 2018-03-29 15:02:19 -05:00
Alexander Traud 4f33f56a72 BuildSystem: pjsip_evsub_set_uas_timeout was not used (part 2).
The previous change was not complete.

ASTERISK-27435

Change-Id: I11082c14c0ef9c6af8c995084a6851337ea2a90f
2018-03-22 13:27:52 +01:00
Jenkins2 1c4be05f05 Merge "Revert "BuildSystem: In NetBSD, the Python Programming Language is python-X.Y."" 2018-03-22 05:44:30 -05:00
Alexander Traud d6fda173a4 BuildSystem: With external editline, do not require libs for internal editline.
ASTERISK-27761

Change-Id: Ib17a7415297a210cfcdbf149e4df9b6edadbfab6
2018-03-22 11:43:18 +01:00
George Joseph 745b5134cd Revert "BuildSystem: In NetBSD, the Python Programming Language is python-X.Y."
Something is causing a python2/python3 mismatch on Fedora27.

PYTHON='/usr/bin/python2'
PYTHONDEV_CFLAGS='-I/usr/include/python3.6m '
PYTHONDEV_INCLUDE='-I/usr/include/python3.6m '
PYTHONDEV_LIB='-lpython3.6m '
PYTHONDEV_LIBS='-lpython3.6m '

This reverts commit be0e9920b6.

Change-Id: I86dd102eb3ead199fe89178cdbadb36b4e2cfd1b
2018-03-21 18:25:58 -06:00
Alexander Traud bfefde5b07 BuildSystem: For consistency, avoid extra libs to be empty.
AST_EXT_LIB_CHECK has several optional parameters. When an optional parameter
is left empty, [] is used to indicate this. However, this is done in the script
./configure only then, when a further parameter is not empty. For example, when
no extra libraries are needed to test the checked library, parameter 5 is not
mentioned. Except parameter 6 and higher are used, then parameter 5 must be
empty.

However, this general rule was broken
* four times for parameter 5 (extra libs) and
* three times for parameter 4 (header)
as found via the Regular Expression \[\]\). In case of parameter 5, all cases
were changed, because that happened for no reason. In case of parameter 4, an
[] improves readability actually. Therefore for parameter 4, the only case which
did not do it was changed. All this aims to create more consistency: Only do
something different if there is a reason to do so.

Change-Id: I037ef170cf1ad94497151a9ea5071a31c656cafe
2018-03-20 17:53:19 +01:00
George Joseph 05ac34fe85 Merge "BuildSystem: In NetBSD, the Python Programming Language is python-X.Y." 2018-03-20 10:37:57 -05:00
Jenkins2 fcad222d7f Merge "BuildSystem: Instead of $PJPROJECT_LIBS with s, use $PJPROJECT_LIB everywhere." 2018-03-20 10:24:11 -05:00
Jenkins2 beab57a576 Merge "BuildSystem: Enable Advanced Linux Sound Architecture (ALSA) in NetBSD." 2018-03-20 06:45:35 -05:00
Joshua Colp 0bfc83ee4f Merge "BuildSystem: Remove unused dependency on libltdl." 2018-03-20 06:37:09 -05:00
Joshua Colp 297cf20c7d Merge "BuildSystem: Check for header file of OGG." 2018-03-20 06:30:02 -05:00
George Joseph c9dffc4c62 Merge "BuildSystem: Avoid an extra case for OpenBSD." 2018-03-19 11:15:51 -05:00
Jenkins2 e905b232f1 Merge "BuildSystem: When no download utility is available, display the explanation." 2018-03-19 10:19:29 -05:00
Jenkins2 a12976e20a Merge "BuildSystem: Enable dladdr on non-Linux platforms like FreeBSD." 2018-03-19 10:02:14 -05:00
Alexander Traud e61b50b67a BuildSystem: Check for header file of OGG.
Asterisk uses various symbols of the shared library libogg within the module
format_ogg_vorbis. However, the source code of that module did not include the
header file of libogg explicitly but implicitly. Because that header was not
included before Asterisk 14, the script ./configure was told not to check for
it.

Anyway, even Asterisk 13 LTS uses symbols of libogg. Therefore, that header
should be included explicitly. Therefore, ./configure should check for that
header.

Change-Id: I98c50d56311b68880d1084fcc62c35ab2f8692db
2018-03-17 16:49:11 +01:00
Alexander Traud f697025ae5 BuildSystem: When no download utility is available, display the explanation.
./configure --with-pjproject-bundled
did not display an explanation, when no download utility like wget, curl, or
fetch was installed beforehand, although an explanation existed in code. This
happened because the code expected the variable DOWNLOAD_TO_STDOUT to be empty.
However, the script ./configure set that variable always.

Change-Id: I64c99b76a03525c69471e5055bf124b36a51bbd4
2018-03-17 14:14:29 +01:00
Alexander Traud 10a978829e BuildSystem: Remove unused dependency on libltdl.
Asterisk does not need the development package of libltdl, because it does not
use any symbol of -lltdl directly. Instead, it uses the runtime package via the
shared library -lodbc. On the supported platforms, that shared library declares
its dependency on -lltdl correctly, otherwise AST_EXT_LIB_CHECK would have
failed.

ASTERISK-27745

Change-Id: Icd315809b8e7978203431f3afb66240dd3a040ba
2018-03-17 11:00:06 +01:00
Alexander Traud be0e9920b6 BuildSystem: In NetBSD, the Python Programming Language is python-X.Y.
ASTERISK-27717

Change-Id: If90ddf9c396c32e7402a894f42dce215c30049d1
2018-03-16 17:41:01 +01:00
Alexander Traud 02fa145a1b BuildSystem: Avoid an extra case for OpenBSD.
Nine years ago with Mantis 13639 (now ASTERISK-12841) an extra case for OpenBSD
was introduced: Vorbis required Ogg to be specified manually, because the shared
library libvorbis.so did not specify its required dependency on -logg itself.

Today with OpenBSD 6.2, all libvorbis*.so declare their dependencies correctly.
Therefore, an extra case is not required anymore.

Change-Id: Ifd04e0994ce9f1e4ad29c3948a0398b91d1e97bc
2018-03-16 09:11:37 -06:00
Alexander Traud 00789174f6 BuildSystem: Enable Advanced Linux Sound Architecture (ALSA) in NetBSD.
In the script ./configure, AST_EXT_LIB_CHECK checks for external libraries. Some
libraries do not specify all their dependencies and require additional shared
libraries. In AST_EXT_LIB_CHECK, this is the fifth parameter. However, if a
library is specified there, it must exist on the platform, because ./configure
tries to compile/link/execute a small app using those statements. For example,
the library libdl.so is Linux specific and does not exist on BSD-like platforms.

Furthermore, no supported platform/version was found, which still (ever?)
requires those additional libraries. Therefore, they were simply removed.

Finally, this change adds the error code ESTRPIPE to the channel driver
chan_alsa for those platforms which lack it, again for example NetBSD.

ASTERISK-27720

Change-Id: I3b21f2135f6cbfac7590ccdc2df753257f426e0b
2018-03-16 16:04:26 +01:00
Jenkins2 681bdc8dbf Merge "BuildSystem: Enable IMAP storage on openSUSE and Arch Linux." 2018-03-14 06:45:30 -05:00
Joshua Colp baf06002fe Merge "BuildSystem: Add NetBSD." 2018-03-14 06:17:01 -05:00
Jenkins2 4c0361f4f0 Merge "BuildSystem: Re-check for another UUID library only when previous check failed." 2018-03-13 18:17:22 -05:00
Jenkins2 200f7c520c Merge "BuildSystem: Enable PortAudio in NetBSD." 2018-03-13 17:55:22 -05:00
Alexander Traud d9776870e8 BuildSystem: Enable IMAP storage on openSUSE and Arch Linux.
ASTERISK-27734

Change-Id: I8d6e6a1c08c031649764f5277fbbb85e57c3a9d4
2018-03-13 16:26:33 -05:00
Jenkins2 a979e52c0a Merge "BuildSystem: For consistency, avoid double-checking via if clauses." 2018-03-13 10:48:41 -05:00
Alexander Traud 5b525c9781 BuildSystem: Add NetBSD.
Headers, libraries, and rpath.

ASTERISK-27728
ASTERISK-11015
Reported by: Curt Sampson

Change-Id: I50aa5fcd095937df32a2e33307caac7e79a8b5b7
2018-03-09 17:09:20 +01:00
Alexander Traud c5f2332953 BuildSystem: For consistency, avoid double-checking via if clauses.
In the script ./configure, AST_EXT_LIB_CHECK and AST_PKG_CONFIG_CHECK first test
whether parameter 1 was already found. Consequently, an if-test on PBX_ just a
line below is redundant, if exactly the same parameter 1 is used again.

No performance gain is expected by this change. However, because this strategy
is used all over in ./configure except for two places, this change aims to
create more consistency: Only do something different if there is a reason to do
so.

Change-Id: I4a6f48127b7af3a48168c917e888be1f70625027
2018-03-09 10:13:20 +01:00
Alexander Traud 36c8885c66 BuildSystem: Enable dladdr on non-Linux platforms like FreeBSD.
ASTERISK-27641

Change-Id: I587e8ba0123c70fc10cfd8b0ac3299551f61d84b
2018-03-09 09:44:23 +01:00
Alexander Traud 75cebc3e71 BuildSystem: Re-check for another UUID library only when previous check failed.
As a side-effect, this avoids the ambiguous output:
 checking for uuid_generate_random... no
which was printed always previously.

ASTERISK-25586
Reported by: John Nemeth

Change-Id: I6d541dfcf453932a9856c5e251aa22e0e6c233c9
2018-03-08 16:04:29 +01:00
Alexander Traud fc64a0e2b3 BuildSystem: Instead of $PJPROJECT_LIBS with s, use $PJPROJECT_LIB everywhere.
In the script ./configure,
xyz_LIB  is set by AST_PKG_CONFIG_CHECK and
xyz_LIBS is set by PKG_CHECK_MODULES within
AST_PKG_CONFIG_CHECK. Both are the same. In Asterisk normally the former and
only three times the latter was used. Let us use xyz_LIB without s, for
consistency with AST_EXT_LIB_CHECK. That eases understanding because now readers
do not have to know that xyz_LIB equals xyz_LIBS.

Change-Id: I7359860a5d730cdc784c2c48e501a082196434d3
2018-03-08 12:28:37 +01:00
Alexander Traud 16f6e94033 BuildSystem: Enable PortAudio in NetBSD.
In NetBSD, PortAudio 1 is still the default version. PortAudio 2 can be
installed side by side but gets placed in a 'portaudio2' subdirectory. To
find PortAudio 2 even in a subdirectory, the tool pkg-config is queried via
AST_PKG_CONFIG_CHECK. For those platforms, which do not list PowerAudio 2
via pkg-config, the previous check remains and is executed thereafter.

ASTERISK-27721

Change-Id: I4175500126909ad1b181fff8e11bb4a3a6ae4fa9
2018-03-08 11:00:40 +01:00
Alexander Traud ef79e583ec BuildSystem: Enable Lua in NetBSD.
luaL_openlib got removed with Lua 5.2.
luaL_newstate is available in all versions.

ASTERISK-27718

Change-Id: I9c8c8880315ee36ab740d7c40153306c0bfd6f71
2018-03-06 17:58:55 +01:00
Joshua Colp 0072f75650 Merge "BuildSystem: Avoid == for comparison in ./configure." 2018-03-05 12:14:44 -06:00
Alexander Traud 9749524520 BuildSystem: Detect whether uselocale(.) is available.
ASTERISK-27712
Reported by: Joerg Sonnenberger, D'Arcy Cain

Change-Id: Idf1c9d43617a3e13028b95b313415903d80ef807
2018-03-03 13:56:03 +01:00
Alexander Traud a9c02e484a BuildSystem: Avoid == for comparison in ./configure.
ASTERISK-27709
Reported by: John Nemeth

Change-Id: I11b1ae8fd404c04066f1458f5d71f9536359d58d
2018-03-02 12:12:17 +01:00
Joshua Colp 7baaed0d3f Merge "BuildSystem: Fix a typo related to ./configure --prefix=<path> on OpenBSD." 2018-02-20 05:11:14 -06:00
Jenkins2 699403e4a3 Merge "BuildSystem: Enable IMAP storage on OpenBSD." 2018-02-19 18:09:11 -06:00
Jenkins2 bb723711a6 Merge "BuildSystem: Enable system provided libedit on OpenBSD." 2018-02-16 08:02:30 -06:00
Alexander Traud dda73c5018 BuildSystem: Fix a typo related to ./configure --prefix=<path> on OpenBSD.
Reported by: Stuart Henderson

Change-Id: Ieae8624f48b6ae78cf29930b9a45a3c842c7a764
2018-02-16 14:52:36 +01:00
Alexander Traud c674efa996 BuildSystem: Enable IMAP storage on OpenBSD.
ASTERISK-27681
Reported by: Stuart Henderson

Change-Id: Ifb6b614acb251b695b9417d76510e73eb335b679
2018-02-16 13:41:35 +01:00
Alexander Traud 2c814afb86 BuildSystem: Enable system provided libedit on OpenBSD.
ASTERISK-27677

Change-Id: I0854e3616d1361ae9b6907d3d3444a02784ac62b
2018-02-16 11:57:18 +01:00
Alexander Traud 8ac198aff3 BuildSystem: Remove chan_h323 leftovers.
ASTERISK-27670

Change-Id: I07a8ef8bbd6001e25711fa1bff152eb6c9efa729
2018-02-14 09:28:29 +01:00
Corey Farrell 9fddc8b4dc core: Remove embedded editline.
This removes the embedded copy of editline from the Asterisk source
tree, making a system copy of libedit mandatory in Asterisk 16+.

ASTERISK-27634 #close

Change-Id: Iedb64ad92acb78419f3caefedaa2bb7cd2a1a33f
2018-02-12 04:44:26 -05:00
Jenkins2 d592adf623 Merge "BuildSystem: Raise autoconf version requirement to 2.60a." 2018-02-01 10:30:21 -06:00
Alexander Traud 6da970bfb9 BuildSystem: Raise autoconf version requirement to 2.60a.
AC_COMPUTE_INT requires at least autoconf 2.60a.

This affects only those who contribute to Asterisk, only those who had to use
the script ./bootstrap.sh. Furthermore, this change just makes sure nobody is
using a too old autoconf.

ASTERISK-16951

Change-Id: Ibca850e2fe0e77d935207bd959bacf7197d7f637
2018-01-26 14:13:12 +01:00
Corey Farrell 23381d2c5e Build System: Require __sync or __atomic functions.
This change causes the configure script to throw an error if neither
__sync nor __atomic builtin functions are available.

ASTERISK-27619

Change-Id: Ie01a281e0f5c41dfeeb5f250c1ccea8752f56ef9
2018-01-25 10:38:45 -05:00
Corey Farrell 6fbd855228 Build System: Add support for __atomic built-in operators.
Add a check to configure.ac for __atomic_fetch_add support.  If found
use the __atomic built-in operators for ast_atomic_dec_and_test and
ast_atomic_fetchadd_int.

ASTERISK~27619

Change-Id: I65b4feb02bae368904ed0fb03f585c05f50a690e
2018-01-24 20:00:48 -05:00
Alexander Traud d427bb84a2 BuildSystem: Remove AC_CONFIG_AUX_DIR.
ASTERISK-27602

Change-Id: I9f4d3d2bc1481748e39ad1e2b0a364d38e38978b
2018-01-20 19:58:35 +01:00
Jenkins2 1376aa3f29 Merge "BuildSystem: Detect external library Lua in version 5.3." 2018-01-20 01:24:24 -06:00
Alexander Traud 7e7a20642c BuildSystem: In OpenBSD, xmlstarlet is xml.
ASTERISK-27593

Change-Id: I1c7087f7f7582e40b3312c690d912c9a86466805
2018-01-17 13:52:25 +01:00
Alexander Traud 8f31b70246 BuildSystem: Detect external library Lua in version 5.3.
On some platforms, you decide to go for one specific version of Lua, for
example in OpenBSD. On other platforms, you are able to install several versions
side-by-side, for example in Ubuntu and Fedora. Asterisk already works with
Lua 5.3. Asterisk failed to detect Lua 5.3 on those platforms which allow
several versions.

ASTERISK-27592

Change-Id: If7a4b395d844a464e9a1f4f626c5bff4ee67eed8
2018-01-17 09:51:29 +01:00
Alexander Traud 645297614e BuildSystem: Resolve resolv.h not via Generic but Particular Header-Check.
ASTERISK-27585

Change-Id: I27c67563788e6f67eeda5fb51a741823a50a95e2
2018-01-15 17:57:11 +01:00
Alexander Traud 512286e3c8 BuildSystem: Really do not pass unknown-warning options to the compiler.
When an older GCC version is called with a too new warning option, GCC exited
with an error and Asterisk was not built. Therefore, the configure script tests
the installed compiler whether it supports that warning option. If not, Asterisk
does not pass it to the installed compiler. However, some compilers (like clang)
do not exit (error) but give just a warning in such a case. Because the compiler
did not exit, Asterisk passed the unknown-warning option.

ASTERISK-27560

Change-Id: Ia9b7747f649b27ff5e9f75c3db3fee4fe7a29621
2018-01-06 22:40:46 +01:00
Corey Farrell 87a57e8d46 autoconf: Fix call to AC_CONFIG_AUX_DIR.
The `pwd` parameter to AC_CONFIG_AUX_DIR is unnecessary, the default
value is $srcdir.

Additionally remove the AC_REVISION call.  It only added a comment and
is pointless without SVN tag replacements.

Change-Id: I99299a3217f095bddcb2edefb3b9af0ab147bc29
2017-11-28 10:36:41 -05:00
Joshua Colp d8c6852bdc Merge "BuildSystem: pjsip_evsub_set_uas_timeout was not used." 2017-11-21 10:33:28 -06:00
Alexander Traud 7397961b02 BuildSystem: pjsip_evsub_set_uas_timeout was not used.
ASTERISK-27435

Change-Id: Id318a7ae6d7d69b53f911d30bf3eece64852f15c
2017-11-20 16:49:04 +01:00
Corey Farrell b4f7f8250f Build: Fix OSX build issues.
OSX does not support 'readlink -f' or 'sed -r'.  Replace readlink with
the GNU make macro 'realpath'.  Replace sed with grep in one place, cut
in the other.

ASTERISK-27332

Change-Id: I5d34ecca905384decb22ead45c913ae5e8aff748
2017-11-19 14:33:26 -06:00
Joshua Colp 4dac92b99a Merge "Build: Make function constructor/destructor attributes mandatory." 2017-11-17 09:26:33 -06:00
Jenkins2 b5ac9c8a78 Merge "This patch adds a beanstalk CDR backend." 2017-11-16 09:36:41 -06:00
Corey Farrell e9f8b317c3 Build: Make function constructor/destructor attributes mandatory.
This change causes the configure script to fail if the C compiler does
not support both function attributes constructor and destructor.  These
were already required as modules cannot function without these attributes
and Asterisk requires modules.

This also has AST_GCC_ATTRIBUTE set a variable
ax_cv_have_func_attribute_$1.  This is the same variable name used by
autoconf-archive's AX_GCC_FUNC_ATTRIBUTE, used for the same purpose.

Change-Id: Id68e8a1447f2a6d707c54b56350e7bfdb33fb663
2017-11-10 13:32:06 -05:00
Corey Farrell 4013bfa52b configure: Add autoconf check for libopusfile.
This check is being added to make it easier for end-users of third party
open source Opus modules.  This was removed by ASTERISK-26426 but only
the module needed to be removed.

Change-Id: I62b9cd0c4fa8a77596ab0e042948a643a1152677
2017-11-06 04:34:34 -05:00
Corey Farrell 5553adb8ba Build System: Fix --disable-xmldoc option.
The configure option to disable XML documentation does not currently
work.  This patch makes it effective, but also causes an ABI change by
removing the ast_xmldoc_* symbols.  Disabling xmldoc also prevents docs
from being automatically generated, but they can still be manually
generated with 'make doc/core-en_US.xml'.

ASTERISK-26639

Change-Id: Ifac562340c09f80c83e0203de098fcac93bf8c44
2017-10-25 11:26:22 -04:00
Nir Simionovich 4559cd0e28 This patch adds a beanstalk CDR backend.
Beanstalkd is a simple to use job queue. It provides a means to
create multiple job queues called "tubes". Each tube can store
multiple jobs, with varying priorities with the queue. Queue
processing is available via a simple TCP socket or via well defined
libraries, avaialble at
https://github.com/kr/beanstalkd/wiki/client-libraries

This module is based upon the beanstalk-client library, available
for download at: https://github.com/deepfryed/beanstalk-client

Change-Id: I5fe4089a34ab3b39230786d9bbfddafa56715f48
2017-10-20 10:08:05 -04:00
Alexander Traud 95b45d1c46 res_srtp: Add support for libsrtp2 with AES-GCM.
Beside allowing AES-GCM again, this adds AES-192 again.

ASTERISK-27356

Change-Id: Ia97a435faf26300335d9552fa676b5d17e5f7233
2017-10-18 03:34:56 -05:00
Matt Jordan f4798faacc res_corosync: Fix linking issue with Corosync 2.x
At some point in time in the history of Corosync (certainly within the
2.x branch), the corosync_cfg_state_track function was removed.
Unfortunately, the cfg library is only linked if this function is
present. Without the cfg library being linked to res_corosync, loading
of res_corosync will fail.

This patch makes it so that detecting corosync's core libraries,
determined by the COROSYNC external library checks, links both the cpg
and cfg libraries with res_corosync.

Change-Id: I674e9e1c8fea11c3bf81154aaa7c1fd43f945465
2017-10-06 15:47:41 -05:00
George Joseph 305bd0d99f Make --with-pjproject-bundled the default for Asterisk 15
'--with-pjproject-bundled' is now the default when running
./configure. It can be disabled with '--without-pjproject-bundled'.

To make building without an internet connection easier, a new
./configure option '--with-download-cache' was added that sets
the cache for externals (like pjproject, the codecs and the DPMA),
AND the sounds files.  It can also be specified as an environment
variable named "AST_DOWNLOAD_CACHE".  The existing
'--with-sounds-cache' option / SOUNDS_CACHE_DIR env variable and
'--with-externals-cache' option / EXTERNALS_CACHE_DIR env variable
remain and if specified, will override '--with-downloads-cache'.

ASTERISK-27189

Change-Id: Ifa9783fddf44aafadb060c9feba713dfa81d38ce
2017-08-08 16:43:00 -05:00
Jenkins2 e0aed61e96 Merge "Support GMIME 3.0" 2017-08-07 07:33:03 -05:00
Tzafrir Cohen 123c93a77c Support GMIME 3.0
Support building the Asterisk httpd with version 3.0 of gmime as
well as earlier versions of that library.

ASTERISK-27173

Change-Id: I7e13dd05a3083ccb0df2dabf83110223f6a9fa8f
2017-08-03 14:15:26 -04:00
Corey Farrell 4b03eb5c38 Fix compile error for old versions of GCC.
Use -Wno-format-truncation only if supported by compiler.

ASTERISK-27171 #close

Change-Id: Iac0aed7a5bcaa16c21b7d62c4e4678d244c4ccb6
2017-08-02 18:10:57 -04:00
Sean Bright 25c9464325 corosync: Fix corosync library name in configure.ac
Also add new corosync packages to install_prereq.

Reported by Travis Ryan in #asterisk-dev

Change-Id: Ib861c95ba630fed62dc54e56784ad8446ed9d2db
2017-07-20 10:40:28 -05:00
Joshua Colp c33168c147 Merge "CFLAGS for BIND8 support" 2017-06-14 11:07:04 -05:00
David M. Lee fcb1a0d7e8 CFLAGS for BIND8 support
Some systems (like macOS) require BIND_8_COMPAT to be defined so that
the nameser libraries are, well, BIND8 compatible.

Change-Id: If79fc27a64f90de1835b5aa3aadfa9be22bd16b0
2017-06-08 17:09:33 -05:00
Sean Bright e497a76d24 eventfd: Disable during cross compilation
Reported by Lonnie Abelbeck <lonnie@abelbeck.com> via private e-mail.

Change-Id: Icc80f12b8d8d591e14a8e0ed9f1c02cbd193a89b
2017-06-07 14:36:37 -05:00
Sean Bright 1f136fe885 res_srtp: Add support for libsrtp2
ASTERISK-25294 #close
Reported by: Tzafrir Cohen

ASTERISK-26976 #close
Reported by: Alex

Change-Id: I789b1c3d1ed31365bbd9339fa58ef36f48833c40
2017-05-26 12:15:42 -04:00
Sean Bright 59203c51cc core: Use eventfd for alert pipes on Linux when possible
The primary win of switching to eventfd when possible is that it only
uses a single file descriptor while pipe() will use two. This means for
each bridge channel we're reducing the number of required file
descriptors by 1, and - if you're using timerfd - we also now have 1
less file descriptor per Asterisk channel.

The API is not ideal (passing int arrays), but this is the cleanest
approach I could come up with to maintain API/ABI.

I've also removed what I believe to be an erroneous code block that
checked the non-blocking flag on the pipe ends for each read. If the
file descriptor is 'losing' its non-blocking mode, it is because of a
bug somewhere else in our code.

In my testing I haven't seen any measurable difference in performance.

Change-Id: Iff0fb1573e7f7a187d5211ddc60aa8f3da3edb1d
2017-04-24 11:50:09 -05:00
Joshua Colp 0e7d29501d Merge "core: Improve/simplify handling of required headers." 2017-04-07 14:48:36 -05:00