Commit Graph

632 Commits

Author SHA1 Message Date
Alexander Traud
6cf1aefff8 pjproject_bundled: Repair ./configure --with-ssl=PATH.
Previously, Asterisk did not tell its bundled PJProject about this configure
parameter. Therefore, PJProject used the platform provided OpenSSL always.

ASTERISK-27880

Change-Id: Iea545aec854dd0e2c061c69bb118a76ce56c5dc6
2018-07-18 13:55:55 -05:00
Corey Farrell
871715f77c Fix declaration of PBX_CURL for ./configure --without-libcurl
When `--without-libcurl` is used PBX_CURL is never set.  Set default
value 0 so the proper value is passed to menuselect.

Change-Id: I03e2842a00899cbca2dbde52bb1f6636d54bae1e
2018-07-14 11:23:39 -05:00
George Joseph
06966e91fe 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 06:57:18 -06:00
Alexander Traud
d3fe2aceab BuildSystem: Enable ./configure in Solaris 11.
ASTERISK-27931

Change-Id: If298ce7f03be227a3687b9c20d382c9c55a72404
2018-06-21 04:15:23 -06:00
Alexander Traud
e3de4bc46e 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:35 -06:00
Alexander Traud
ef2386fcd7 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:09:00 +02:00
Alexander Traud
b6234f9577 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 07:26:03 -06:00
Corey Farrell
d893e57c90 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:58:19 -04:00
George Joseph
42abc9c430 Merge "BuildSystem: Add DragonFly BSD." into 13 2018-04-30 09:06:45 -05:00
Alexander Traud
94c8b20f5f BuildSystem: Enable IMAP storage on FreeBSD and DragonFly BSD.
ASTERISK-27639

Change-Id: I1347f3f2f3737010d0a80a5c30b5aaf71cf3ccb0
2018-04-20 06:15:48 -06:00
Alexander Traud
7b219311eb BuildSystem: Add DragonFly BSD.
ASTERISK-27820

Change-Id: I310896143e94d65da1c2be3bb448204a8b86d557
2018-04-20 12:54:57 +02:00
Jenkins2
6aee468ba1 Merge "Build System: Strip '-std=c99' from CFLAGS provided by libraries." into 13 2018-04-12 09:43:14 -05:00
Jenkins2
36f94cbcde Merge "Build System: Fixes for configure script." into 13 2018-04-09 10:15:23 -05:00
Jenkins2
dcac292ae3 Merge "BuildSystem: Add support for building RADIUS with radcli." into 13 2018-04-06 08:46:11 -05:00
Corey Farrell
07e408e588 Build System: Strip '-std=c99' from CFLAGS provided by libraries.
Asterisk requires GNU C extensions.  On some systems certain libraries
may incorrectly push -std=c99 into CFLAGS, thus breaking the build.
This change causes that flag to be stripped so the Asterisk build is not
broken by those libraries.  This change is made for both pkgconfig and
tool based libraries.

ASTERISK-27629 #close

Change-Id: I13389613b194abbac77becf90cd950dc168704db
2018-04-04 09:41:56 -06:00
Corey Farrell
01b3c435d8 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 14:41:40 -06:00
Joshua Colp
945f7c6082 Merge "BuildSystem: With external editline, do not require libs for internal editline." into 13 2018-04-02 08:42:03 -05:00
Alexander Traud
83353997f4 BuildSystem: Add support for building RADIUS with radcli.
Radcli is yet another RADIUS client library, generally compatible with
freeradius and radiusclient-ng.

This commit adds autoconf option for detecting it as well and changes
cdr_radius and cel_radius to use its header file in that case.

ASTERISK-26540
Reported by: Tzafrir Cohen

Change-Id: Icc056d476b7acf481309219e9abdca416866c6ec
2018-04-02 08:12:55 -05:00
Kevin Harwell
f17d53fd32 Merge "BuildSystem: pjsip_evsub_set_uas_timeout was not used (part 2)." into 13 2018-03-29 15:20:07 -05:00
Joshua Colp
c399e8528b Merge "Revert "BuildSystem: In NetBSD, the Python Programming Language is python-X.Y."" into 13 2018-03-22 07:38:15 -05:00
Alexander Traud
de4e2c1de8 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 06:28:34 -06:00
Alexander Traud
79bb956b69 BuildSystem: With external editline, do not require libs for internal editline.
ASTERISK-27761

Change-Id: Ib17a7415297a210cfcdbf149e4df9b6edadbfab6
2018-03-22 11:52:45 +01:00
George Joseph
3a4a441817 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 c0c537c1d3.

Change-Id: I670a82aa7c872fa5facea1e3bc718e2d3124cc28
2018-03-21 18:25:19 -06:00
Jenkins2
8b1665bc55 Merge "BuildSystem: In NetBSD, the Python Programming Language is python-X.Y." into 13 2018-03-20 10:37:50 -05:00
Joshua Colp
6bda2d7baf Merge "BuildSystem: Instead of $PJPROJECT_LIBS with s, use $PJPROJECT_LIB everywhere." into 13 2018-03-20 10:09:08 -05:00
Joshua Colp
aacea4263a Merge "BuildSystem: Enable Advanced Linux Sound Architecture (ALSA) in NetBSD." into 13 2018-03-20 06:51:34 -05:00
Joshua Colp
d3a0d545a3 Merge "BuildSystem: Check for header file of OGG." into 13 2018-03-20 06:23:33 -05:00
Joshua Colp
599f326b41 Merge "BuildSystem: Remove unused dependency on libltdl." into 13 2018-03-20 06:22:52 -05:00
George Joseph
a8daaa171e Merge "BuildSystem: Enable dladdr on non-Linux platforms like FreeBSD." into 13 2018-03-19 11:13:21 -05:00
Jenkins2
09e61213b7 Merge "BuildSystem: When no download utility is available, display the explanation." into 13 2018-03-19 10:19:13 -05:00
Alexander Traud
7b40605d8e 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:54:09 +01:00
Alexander Traud
06ba605988 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 07:16:48 -06:00
Alexander Traud
0f634c1446 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 04:02:17 -06:00
Alexander Traud
c0c537c1d3 BuildSystem: In NetBSD, the Python Programming Language is python-X.Y.
ASTERISK-27717

Change-Id: If90ddf9c396c32e7402a894f42dce215c30049d1
2018-03-16 10:42:15 -06:00
Alexander Traud
afcd1dd8e5 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:59 -06:00
Alexander Traud
5b80e97fff 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:09:31 +01:00
Joshua Colp
ed7d24d0c1 Merge "BuildSystem: Enable IMAP storage on openSUSE and Arch Linux." into 13 2018-03-14 06:34:33 -05:00
Joshua Colp
d13ef8c974 Merge "BuildSystem: Add NetBSD." into 13 2018-03-14 06:07:47 -05:00
Jenkins2
fb4c995ad5 Merge "BuildSystem: Re-check for another UUID library only when previous check failed." into 13 2018-03-13 17:54:12 -05:00
Jenkins2
c42508aeb6 Merge "BuildSystem: Enable PortAudio in NetBSD." into 13 2018-03-13 17:47:34 -05:00
Alexander Traud
7533d25e8d BuildSystem: Enable IMAP storage on openSUSE and Arch Linux.
ASTERISK-27734

Change-Id: I8d6e6a1c08c031649764f5277fbbb85e57c3a9d4
2018-03-13 16:26:18 -05:00
Joshua Colp
e3c76be75b Merge "BuildSystem: For consistency, avoid double-checking via if clauses." into 13 2018-03-13 10:43:16 -05:00
Alexander Traud
bd6e0b1a72 BuildSystem: Add NetBSD.
Headers, libraries, and rpath.

ASTERISK-27728
ASTERISK-11015
Reported by: Curt Sampson

Change-Id: I50aa5fcd095937df32a2e33307caac7e79a8b5b7
2018-03-09 10:10:16 -06:00
Alexander Traud
ba88af8a25 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:23:53 +01:00
Alexander Traud
c227462370 BuildSystem: Enable dladdr on non-Linux platforms like FreeBSD.
ASTERISK-27641

Change-Id: I587e8ba0123c70fc10cfd8b0ac3299551f61d84b
2018-03-09 02:45:47 -06:00
Alexander Traud
0d70a9a006 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 09:07:08 -06:00
Alexander Traud
7b6b6b0a7e 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:41:53 +01:00
Alexander Traud
54874eb44d 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 04:01:25 -06:00
Alexander Traud
93df498f4e 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 11:01:59 -06:00
Jenkins2
83c2d6a89f Merge "BuildSystem: Avoid == for comparison in ./configure." into 13 2018-03-05 12:36:15 -06:00