summaryrefslogtreecommitdiff
path: root/configure
AgeCommit message (Collapse)Author
2016-09-27format_ogg_opus: New formatGeorge Joseph
Add Ogg/Opus playback support. This uses libopusfile in order to be able to read .opus files and play them back. Writing/recording support is not present at this time. ASTERISK-26409 Change-Id: I8815d23345108d8ca7c0bd640f6a1ce6b4f56955 (cherry picked from commit daee8bbd5209b4158bc1785eede845a26e6cbeaa)
2016-09-15sd_notify (systemd status notifications) supportTzafrir Cohen
sd_notify() is used to notify systemd of changes to the status of the process. This allows the systemd daemon to know when the process finished loading (and thus only start another program after Asterisk has finished loading). To use this, use a systemd unit with 'Type=notify' for Asterisk. This commit also adds the function ast_sd_notify(), a wrapper around sd_notify that does nothing if not built with systemd support. Also adds support for libsystemd detection in the configure script. Change-Id: Ied6a59dafd5ef331c5c7ae8f3ccd2dfc94be7811
2016-09-07Merge "res_pjsip_session: segfault on already disconnected session"zuul
2016-09-06build: Add download capability for external packagesGeorge Joseph
The DPMA and g729a, silk, siren7 and siren14 codecs hosted at http://downloads.digium.com/pub/telephony/ are now listed in the "External" sections of the "Resource Modules" and "Codec Translators" pages in menuselect. Any that are selected will automatically be downloaded and installed when "make install" is run. Their LICENSE and README (if avaialble) files will be installed to ASTVARLIBDIR/documentation/thirdparty/<product_name>. Example use with codecs: The codecs/codecs.xml file is a menuselect style xml file that lists the codecs to be included. Their support levels are 'external', which triggers the download and install, and defaultenabled is no. Also because codec_g729a is actually in a directory named codec_g729 on the download server, the newly added 'member_data' element is used to override the default of the directory name being the package name. You can use the 'directory_name' attribute to keep default base URL (http://downloads.digium.com/pub/telephony/) but use the new directory, or you use the 'remote_url' attribute to specify a full URL to the download directory. In this case, you must still follow the same subdirectory naming conventions as that used for the packages located at 'http://downloads.digium.com/pub/telephony'. A new configure option '--with-externals-cache' was added and like '--with-sounds-cache' it allows the installer to cache tarballs so they're not downloaded every time. To assist with the download and install process, each external package now has a manifest.xml file that, among other things, contains a package version and checksums for each file in the tarball. The manifest is saved to both the cache directory and ASTMODDIR and together with the manifest.xml on the downloads site, tells the install scripts whether a download and/or update is needed. bash and xmlstarlet are required for downloader operation. If they're not installed, the external items in menuselect will be unavailable. Change-Id: Id3dcf1289ffd3cb0bbd7dfab3cafbb87be60323a
2016-09-06res_pjsip_session: segfault on already disconnected sessionAlexei Gradinari
On heavy loaded system the TCP/TLS incoming calls could be disconnected by pjproject while these calls are being processed by asterisk which could use the session's memory pools. If the session in the disconnected state then the session memory pools were already freed, so we get segfault. This patch adds a lifetime control on an INVITE session to pjproject. The lifetime of the session is manipulated by calling pjsip_inv_add_ref/pjsip_inv_dec_ref. This patch uses these functions to inform pjproject that the session is in use. This patch adds check if the session state is not disconnected and also checks if the memory pool is not NULL. This patch also places tasks 'session_end' and 'session_end_completion' into session's serializer to avoid race condition. ASTERISK-26291 #close Change-Id: I4d28b1fb3b91f0492a911d110049d670fdc3c8d7
2016-09-04Merge "codecs: Add Codec 2 mode 2400."Joshua Colp
2016-08-24codecs: Add Codec 2 mode 2400.Alexander Traud
ASTERISK-26217 #close Change-Id: I1e45d8084683fab5f2b272bf35f4a149cea8b8d6
2016-08-17BuildSystem: Detect ca_list_path capabilities in external PJProject.Alexander Traud
Since Asterisk 13.8, pj_ssl_cert_load_from_files2 got detected only in the bundled PJProject but not in an external PJProject. Therefore, ca_list_path could not be used in pjsip.conf. With this change, pj_ssl_cert_load_from_files2 is detected again to enable ca_list_path again. ASTERISK-26303 #close Change-Id: I4a4a0cdc5cdff33730911fb4cfc0498c069043d0
2016-08-10res_resolver_unbound: Allow compilation with libunbound version < 1.5George Joseph
libunbound at version 1.4.20 (which CentOS still uses) declared all of their string function parameters as as 'char *'. 1.4.21 changed them all to 'const char *'. Thankfully 1.4.21 also introduced the UNBOUND_VERSION_MAJOR define so configure now checks for that and sets HAVE_UNBOUND_CONST_PARAMS. res_resolver_unbound then checks that and casts away the 'const' if it's not set. Tested compile and testsuite on CentOS6 (1.4.20), Ubuntu14 (1.4.22) and Fedora24 (1.5.4). There are a few failing tests to be addressed though. ASTERISK-26283 #close Change-Id: Ib708b19b706c5d0ba7b7d5473e6df339d9ae4148
2016-07-21Merge "res_srtp: Enable AES-256 and AES-GCM."zuul
2016-07-21res_srtp: Enable AES-256 and AES-GCM.Alexander Traud
ASTERISK-26190 #close Change-Id: I11326d80edd656524a51a19450e586c583aa0a0b
2016-07-19Add conditional support for noreturn functions.Corey Farrell
This adds support for tagging functions with the noreturn attribute. If DO_CRASH is enabled then ast_do_crash never returns. If AST_DEVMODE and DO_CRASH are enabled then failed assertions never return. This can resolve a large number of false positives with static analyzers. ASTERISK-26220 #close Change-Id: Icfb61e5fe54574eced4c3e88b317244f467ec753
2016-07-14Merge "BuildSystem: Avoid obsolete warning with pthread.m4 on autoconf."zuul
2016-07-13res_rtp_asterisk: Enable Forward Secrecy (PFS) for DTLS.Alexander Traud
Since July 2014, TLS based protocols (SIP over TLS, Secure WebSockets, HTTPS) support PFS thanks to ASTERISK-23905. In July 2015, the same feature was added for DTLS. The source code from main/tcptls.c should have been re-used to ease security audits. Therefore, this change rolls back the change from July 2015 and re-uses the code from July 2014. This has the additional benefits to work under CentOS 7 and enabling not just ECDHE but DHE based cipher suites as well. ASTERISK-25659 #close Reported by: StefanEng86, urbaniak, pay123 Tested by: sarumjanuch, traud patches: res_rtp_asterisk.patch submitted by sarumjanuch dtls_centos_step_1.patch submitted by traud dtls_centos_step_2.patch submitted by traud Change-Id: I537cadf4421f092a613146b230f2c0ee1be28d5c
2016-07-13BuildSystem: Avoid obsolete warning with pthread.m4 on autoconf.Alexander Traud
Updated the macro-set autoconf/ax_pthread.m4 to its latest upstream version. ASTERISK-26046 #close Change-Id: I11abc11d17acd2b6a8a5a5be8ae8e0949dab9cc7
2016-07-13Merge "BuildSystem: Allow own CFLAGS on ./configure."Joshua Colp
2016-07-12BuildSystem: Allow own CFLAGS on ./configure.Alexander Traud
Before this change, make failed with the error Unknown value '' found in build_tools/menuselect-deps for NATIVE_ARCH when CFLAGS were supplied to the configure script. This was introduced with <https://reviewboard.asterisk.org/r/1852/> which disabled BUILD_NATIVE when CFLAGS were supplied. Those who need different -march= values, please, go for ./configure make menuselect.makeopts or make menuselect ./menuselect/menuselect --disable BUILD_NATIVE ASTERISK-25289 #close Change-Id: Ic6365d5a97bb9b3556858f06432a8d1cfa83eebc
2016-07-04BuildSystem: Avoid obsolete warning with libcurl.m4 on autoconf.Alexander Traud
Updated the macro-set autoconf/libcurl.m4 to its latest upstream version. This avoids a warning about an obsolete macro on AC_HELP_STRING, because Asterisk is using AS_HELP_STRING everywhere else already. ASTERISK-26046 Change-Id: I8299faf504ceaeee3e39930c59293809e116c631
2016-06-30configure: Fix HAVE_PJSIP_EVSUB_GRP_LOCK not set with external pjprojectGeorge Joseph
There was a typo in configure.ac preventing HAVE_PJSIP_EVSUB_GRP_LOCK from getting set when using an external pjproject. ASTERISK-26099 #close Reported-by: Ross Beer Change-Id: I709af70428e125fb5ccd44b171d25dd29141f0ae
2016-06-29Merge "BuildSystem: Avoid obsolete warning with AC_TYPE_SIGNAL on autoconf."zuul
2016-06-23BuildSystem: Avoid obsolete warning with AC_TYPE_SIGNAL on autoconf.Alexander Traud
Removed the obsolete macro AC_TYPE_SIGNAL because Asterisk does not use K&R C but requires ANSI C anyway. ASTERISK-26046 Change-Id: I914c014385e1862102d90fe7650621def78db02e
2016-06-22Merge "BuildSystem: Avoid obsolete warning with AC_FUNC_SETVBUF_REVERSED on ↵zuul
autoconf."
2016-06-22BuildSystem: Avoid obsolete warning with AC_FUNC_SETVBUF_REVERSED on autoconf.Alexander Traud
Removed the obsolete macro AC_FUNC_SETVBUF_REVERSED because Asterisk does not support the platform SVR2 from the year 1987 anymore. ASTERISK-26046 Change-Id: I28161b037feb2d29ab46ed20e785928460226c22
2016-06-21res_pjsip_pubsub: Address SEGV when attempting to terminate a subscriptionGeorge Joseph
Occasionally under load we'll attempt to send a final NOTIFY on a subscription that's already been terminated and a SEGV will occur down in pjproject's evsub_destroy function. This is a result of a race condition between all the paths that can generate a notify and/or destroy the underlying pjproject evsub object: * The client can send a SUBSCRIBE with Expires: 0. * The client can send a SUBSCRIBE/refresh. * The subscription timer can expire. * An extension state can change. * An MWI event can be generated. * The pjproject transaction timer (timer_b) can expire. Normally when our pubsub_on_evsub_state is called with a terminate, we push a task to the serializer and return at which point the dialog is unlocked. This is usually not a problem because the task runs immediately and locks the dialog again. When the system is heavily loaded though, there may be a delay between the unlock and relock during which another event may occur such as the subscription timer or timer_b expiring, an extension state change, etc. These may also cause a terminate to be processed and if so, we could cause pjproject to try to destroy the evsub structure twice. There's no way for us to tell that the evsub was already destroyed and the evsub's group lock can't tolerate this and SEGVs. The remedy is twofold. * A patch has been submitted to Teluu and added to the bundled pjproject which adds add/decrement operations on evsub's group lock. * In res_pjsip_pubsub: * configure.ac and pjproject-bundled's configure.m4 were updated to check for the new evsub group lock APIs. * We now add a reference to the evsub group lock when we create the subscription and remove the reference when we clean up the subscription. This prevents evsub from being destroyed before we're done with it. * A state has been added to the subscription tree structure so termination progress can be tracked through the asyncronous tasks. * The pubsub_on_evsub_state callback has been split so it's not doing double duty. It now only handles the final cleanup of the subscription tree. pubsub_on_rx_refresh now handles both client refreshes and client terminates. It was always being called for both anyway. * The serialized_on_server_timeout task was removed since serialized_pubsub_on_rx_refresh was almost identical. * Missing state checks and ao2_cleanups were added. * Some debug levels were adjusted to make seeing only off-nominal things at level 1 and nominal or progress things at level 2+. ASTERISK-26099 #close Reported-by: Ross Beer. Change-Id: I779d11802cf672a51392e62a74a1216596075ba1
2016-06-21BuildSystem: Avoid obsolete warning with HELP_STRING on autoconf.Alexander Traud
Some configure scripts used both AC_HELP_STRING and its replacement AS_HELP_STRING. For consistency and to avoid obsolete warnings, those were changed to AS_HELP_STRING. ASTERISK-26046 Change-Id: I8aad4fd2bdee40aa2a31ce3339a1eb33ff4f5b0f
2016-06-08Detect and use proper libraries for musl toolchainsTimo Teräs
Change-Id: I8d9b212f70813404b82918a3f99439e500d4bfcb
2016-05-11configure: Fix errors with AST_UNDEFINED_SANITIZER/AST_LEAK_SANITIZERMatt Jordan
When running on a system that does not support or use AST_UNDEFINED_SANITIZER or AST_LEAK_SANITIZER, the configure script would incorrectly set those constants to a blank value, e.g., 'AST_UNDEFINED_SANITIZER='. This would cause menuselect to error out, complaining that a blank value is not a valid option. This patch corrects the issue by setting the value to 0 if the options that those constants enable/disable is not found. Change-Id: Ib39814aaf940f308d500c1e026edb3d70de47fba
2016-05-08pjproject_bundled: Check for python-dev and TEST_FRAMEWORKGeorge Joseph
The pjsua and pjsystest apps are now built only if TEST_FRAMEWORK is set. The python bindings are now built only if TEST_FRAMEWORK is set and a python development package is installed. libresample was also disabled. ASTERISK-25993 #close Reported-by: Joshua Colp Change-Id: If4e91c503a02f113d5b71bc8b972081fa3ff6f03
2016-05-03pjproject_bundled: Various fixes discovered during testing of OSesGeorge Joseph
For all OSes: * Disabled third-party codecs in pjproject and added '--disable-speex-codec --disable-speex-aec --disable-gsm-codec' to the configure options since we don't use the pjsip codec capability. FreeBSD: * Added FreeBSD support to install_prereq. * Changed pjproject/configure.m4 to use $GNU_MAKE instead of hardcoding "make". * Added __progname and environ to asterisk.exports.in. * Reverted the use of ldconfig to create shared library symlinks to ln. * Only enable epoll in pjproject if `uname -s` is Linux. * Added a patch to pjproject to take the name of the 'make' command from an environment variable if supplied. This is needed for the python bindings. (merged by Teluu into pjproject trunk 5/3/2016) FreeBSD support isn't complete. Still some general issues regarding make/gmake having nothing to do with pjproject. With some handholding it DOES build successfully. CentOS: Added 'patch' and 'bzip2' to install_prereq PACKAGES_RH. CentOS 6/7 32/64 build and run the pjsip testsuite successfully. Ubuntu: No changes required. Ubuntu 15/16 32/64 build and run the pjsip testsuite successfully. Debian: No changes required. Debian 6/7/8 32/64 build and run the pjsip testsuite successfully. There will utimately be a follow-up patch to create an install_prereq for the testsuite as I've discovered a few missing requirements. ASTERISK-25968 #close Change-Id: I5756a07facfc63798115a5e73a8709382fe9259c
2016-03-23pjproject-bundled: Cleanups for reported issuesGeorge Joseph
PortAudio should no longer be required PJSIP_MAX_PKT_LEN is now 6000 Older autoconf issue fixed. (CentOS 6) Change-Id: I463fa9586cbe7c6b3b603289f535bd8e361611dd
2016-03-14build: Add configure check for proto field of PJSIP TLS transport setting.Joshua Colp
Older versions of PJSIP do not have the proto field on the TLS transport setting structure. This change adds a configure check so even if it is not present we will still be able to build. Change-Id: Ibf3f47befb91ed1b8194bf63888baa6fee05aba9
2016-03-01build-system: Allow building with static pjprojectGeorge Joseph
Background here: http://lists.digium.com/pipermail/asterisk-dev/2016-January/075266.html From CHANGES: * To help insure that Asterisk is compiled and run with the same known version of pjproject, a new option (--with-pjproject-bundled) has been added to ./configure. When specified, the version of pjproject specified in third-party/versions.mak will be downloaded and configured. When you make Asterisk, the build process will also automatically build pjproject and Asterisk will be statically linked to it. Once a particular version of pjproject is configured and built, it won't be configured or built again unless you run a 'make distclean'. To facilitate testing, when 'make install' is run, the pjsua and pjsystest utilities and the pjproject python bindings will be installed in ASTDATADIR/third-party/pjproject. The default behavior remains building with the shared pjproject installation, if any. Building: All you have to do is include the --with-pjproject-bundled option on the ./configure command line (and remove any existing --with-pjproject option if specified). Everything else is automatic. Behind the scenes: The top-level Makefile was modified to include 'third-party' in the list of MOD_SUBDIRS. The third-party directory was created to contain any third party packages that may be needed in the future. Its Makefile automatically iterates over any subdirectories passing on targets. The third-party/pjproject directory was created to house the pjproject source distribution. Its Makefile contains targets to download, patch configure, generate dependencies, compile libs, apps and python bindings, sanitized build.mak and generate a symbols list. When bootstrap.sh is run, it automatically includes the configure.m4 file in third-party/pjproject. This file has a macro to download and conifgure pjproject and get and set PJPROJECT_INCLUDE, PJPROJECT_DIR and PJPROJECT_BUNDLED. It also tests for the capabilities like PJ_TRANSACTION_GRP_LOCK by parsing preprocessor output as opposed to trying to compile. Of course, bootstrap.sh is only run once and the configure file is incldued in the patch. When configure is run with the new options, the macro in configure.m4 triggers the download, patch, conifgure and tests. No compilation is performed at this time. The downloaded tarball is cached in /tmp so it doesn't get downloaded again on a distclean. When make is run in the top-level Asterisk source directory, it will automatically descend all the subdirectories in third_party just as it does for addons, apps, etc. The top-level Makefile makes sure that the 'third-party' is built before 'main' so that dependencies from the other directories are built first. When main does build, a new shared library (libasteriskpj) is created that links statically to the pjproject .a files and exports all their symbols. The asterisk binary links to that, just as it does with libasteriskssl. When Asterisk is installed, the pjsua and pjsystest apps, and the pjproject python bindings are installed in ASTDATADIR/third-party/pjproject. This will facilitate testing, including running the testsuite which will be updated to check that directory for the pjsua module ahead of the system python library. Modules should continue to depend on pjproject if they use pjproject APIs directly. They should not care about the implementation. No changes to any res_pjsip modules were made. Change-Id: Ia7a60c28c2e9ba9537c5570f933c1ebcb20a3103
2016-02-10res_pjsip: Handle pjsip_dlg_create_uas deprecationGeorge Joseph
Pjproject has deprecated pjsip_dlg_create_uas in 2.5 and replaced it with pjsip_dlg_create_uas_and_inc_lock which, as the name implies, automatically increments the lock on the returned dialog. To account for this, configure.ac now detects the presence of pjsip_dlg_create_uas_and_inc_lock and res_pjsip.c has an #ifdef HAVE_PJSIP_DLG_CREATE_UAS_AND_INC_LOCK to decide whether to use the original call or the new one. If the new one was used, the ref count is decremented before returning. ASTERISK-25751 #close Reported-by Josh Colp Change-Id: I1be776b94761df03bd0693bc7795a75682615ca8
2016-02-10Build: Added testing compiler to support the system sanitizesBadalyan Vyacheslav
In older versions of the compiler was not sanitizes. Compilers other than GCC can not support the Usan and TSAN or have other options for *FLAGS. ASTERISK-25767 #close Reported by: Badalyan Vyacheslav Tested by: Badalyan Vyacheslav Change-Id: Iefce6608221fa87884b82ae3cb5649b7b1804916
2016-02-04Check for OpenSSL defines before trying to use them.Mark Michelson
The SSL_OP_NO_TLSv1_1 and SSL_OP_NO_TLSv1_2 defines did not exist prior to OpenSSL version 1.0.1. A recent commit attempts to, by default, set these options, which can cause problems on systems with older OpenSSL installations. This commit adds a configure script check for those defines and will not attempt to make use of those if they do not exist. We will print a warning urging the user to upgrade their OpenSSL installation if those defines are not present. Change-Id: I6a2eb9a43fd0738b404d8f6f2cf4b5c22d9d752d
2016-01-21Build System: Add support for checking alembic branches.Corey Farrell
* Add 'check-alembic' target to root Makefile. * Create build_tools/make_check_alembic to do the actual checks. ASTERISK-25685 Change-Id: Ibb3cae7d1202ac23dc70b0f3b5801571ad46b004
2015-11-30Build System: Support include-what-you-use.Alexander Traud
ASTERISK-25591 #close Change-Id: I8d3efa0826142ece9cbed2fd0d46f3b607fee6ae
2015-10-08configure: Fix check for libunbound to require v1.5.0 as minimum.Richard Mudgett
Versions of libunbound before v1.4.21 do not compile with Asterisk. However, since v1.4.21 has a configure script bug that fails to detect the ldns library (which is fixed in v1.4.22) and v1.4.22 is not an easily detectable version we will require v1.5.0 as a minimum version of the library to work with Asterisk. ASTERISK-25108 #close Reported by: Richard Mudgett Change-Id: Ieb228bfb01467573fc121c7356a9dde27128894d
2015-08-10Merge "Replaces clock_gettime() with ast_tsnow()"Joshua Colp
2015-08-07Replaces clock_gettime() with ast_tsnow()David M. Lee
clock_gettime() is, unfortunately, not portable. But I did like that over our usual `ts.tv_nsec = tv.tv_usec * 1000` copy/paste code we usually do when we want a timespec and all we have is ast_tvnow(). This patch adds ast_tsnow(), which mimics ast_tvnow(), but returns a timespec. If clock_gettime() is available, it will use that. Otherwise ast_tsnow() falls back to using ast_tvnow(). Change-Id: Ibb1ee67ccf4826b9b76d5a5eb62e90b29b6c456e
2015-07-29res/res_rtp_asterisk: Add ECDH supportMark Duncan
This will add ECDH support to Asterisk. It will detect auto ECDH support in OpenSSL (1.0.2b and above) during ./configure. If this is available, it will use it, otherwise it will fall back to prime256v1 (this behavior is consistent with other projects such as Apache and nginx). This fixes WebRTC being broken in Firefox 38+ due to Firefox now only supporting ciphers with perfect forward secrecy. ASTERISK-25265 #close Change-Id: I8c13b33a2a79c0bde2e69e4ba6afa5ab9351465b
2015-06-10weakref attribute detection broken with gcc 4.6 and higheribercom
GCC 4.7 Manual: http://gcc.gnu.org/onlinedocs/gcc-4.7.4/gcc/Function-Attributes.html weakref ("target") A weak reference is an alias that does not by itself require a definition to be given for the target symbol. ASTERISK-22559 #close Reported by: Ibercom Change-Id: I36a136cae947b65187a697533416f9ff9a0b8cdf
2015-05-03Update configure.ac/Makefile for clangDiederik de Groot
Created autoconf/ast_check_raii.m4: contains AST_CHECK_RAII which checks compiler requirements for RAII: gcc: -fnested-functions support clang: -fblocks (and if required -lBlocksRuntime) The original check was implemented in configure.ac and now has it's own file. This function also sets C_COMPILER_FAMILY to either gcc or clang for use by makefile Created autoconf/ast_check_strsep_array_bounds.m4 (contains AST_CHECK_STRSEP_ARRAY_BOUNDS): which checks if clang is able to handle the optimized strsep & strcmp functions (linux). If not, the standard libc implementation should be used instead. Clang + the optimized macro's work with: strsep(char *, char []), but not with strsepo(char *, char *). Instead of replacing all the occurences throughout the source code, not using the optimized macro version seemed easier See 'define __strcmp_gc(s1, s2, l2) in bits/string2.h': llvm-comment: Normally, this array-bounds warning are suppressed for macros, so that unused paths like the one that accesses __s1[3] are not warned about. But if you preprocess manually, and feed the result to another instance of clang, it will warn about all the possible forks of this particular if statement. Instead of switching of this optimization, another solution would be to run the preproces- sing step with -frewrite-includes, which should preserve enough information so that clang should still be able to suppress the diag- nostic at the compile step later on. See also "https://llvm.org/bugs/show_bug.cgi?id=20144" See also "https://llvm.org/bugs/show_bug.cgi?id=11536" Makefile.rules: If C_COMPILER_FAMILY=clang then add two warning suppressions: -Wno-unused-value -Wno-parentheses-equality In an earlier review (reviewboard: 4550 and 4554), they were deemed a nuisace and less than benefitial. configure.ac: Added AST_CHECK_RAII() see earlier Added AST_CHECK_STRSEP_ARRAY_BOUNDS() see earlier Removed moved content ASTERISK-24917 Change-Id: I12ea29d3bda2254ad3908e279b7effbbac6a97cb
2015-04-15res_pjsip: Add external PJSIP resolver implementation using core DNS API.Joshua Colp
This change adds the following: 1. A query set implementation. This is an API that allows queries to be executed in parallel and once all have completed a callback is invoked. 2. Unit tests for the query set implementation. 3. An external PJSIP resolver which uses the DNS core API to do NAPTR, SRV, AAAA, and A lookups. For the resolver it will do NAPTR, SRV, and AAAA/A lookups in parallel. If NAPTR or SRV are available it will then do more queries. And so on. Preference is NAPTR > SRV > AAAA/A, with IPv6 preferred over IPv4. For transport it will prefer TLS > TCP > UDP if no explicit transport has been provided. Configured transports on the system are taken into account to eliminate resolved addresses which have no hope of completing. ASTERISK-24947 #close Reported by: Joshua Colp Change-Id: I56cb03ce4f9d3d600776f36928e0b3e379b5d71e
2015-03-25dns: Add core DNS API + unit tests and res_resolver_unbound module + unit tests.Joshua Colp
This change adds an abstracted core DNS API which resembles the API described here[1]. The API provides a pluggable mechanism for resolvers and also a consistent view for records. Both synchronous and asynchronous queries are supported. This change also adds a res_resolver_unbound module which uses the libunbound library to provide resolution. Unit tests have also been written for all of the above to confirm the API and functionality. ASTERISK-24834 #close Reported by: Matt Jordan ASTERISK-24836 #close Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/4474/ Review: https://reviewboard.asterisk.org/r/4512/ [1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+DNS+API git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@433370 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-03-12Add support for the clang compiler; update RAII_VAR to use BlocksRuntimeMatthew Jordan
RAII_VAR, which is used extensively in Asterisk to manage reference counted resources, uses a GCC extension to automatically invoke a cleanup function when a variable loses scope. While this functionality is incredibly useful and has prevented a large number of memory leaks, it also prevents Asterisk from being compiled with clang. This patch updates the RAII_VAR macro such that it can be compiled with clang. It makes use of the BlocksRuntime, which allows for a closure to be created that performs the actual cleanup. Note that this does not attempt to address the numerous warnings that the clang compiler catches in Asterisk. Much thanks for this patch goes to: * The folks on StackOverflow who asked this question and Leushenko for providing the answer that formed the basis of this code: http://stackoverflow.com/questions/24959440/rewrite-gcc-cleanup-macro-with-nested-function-for-clang * Diederik de Groot, who has been extremely patient in working on getting this patch into Asterisk. Review: https://reviewboard.asterisk.org/r/4370/ ASTERISK-24133 ASTERISK-23666 ASTERISK-20399 ASTERISK-20850 #close Reported by: Diederik de Groot patches: RAII_CLANG.patch uploaded by Diederik de Groot (License 6600) ........ Merged revisions 432807 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 432808 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@432809 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-02-25configure: Promote SQLite3 "not installed" warning to errorMatthew Jordan
Since Asterisk won't build without the library, not having it is definitely an error. Thanks to Kyle Kurz for pointing this out. ........ Merged revisions 432280 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 432281 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@432282 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-01-26Various fixes for OS XDavid M. Lee
This patch addresses compilation errors on OS X. It's been a while, so there's quite a few things. * Fixed __attribute__ decls in route.h to be portable. * Fixed htonll and ntohll to work when they are defined as macros. * Replaced sem_t usage with our ast_sem wrapper. * Added ast_sem_timedwait to our ast_sem wrapper. * Fixed some GCC 4.9 warnings using sig*set() functions. * Fixed some format strings for portability. * Fixed compilation issues with res_timing_kqueue (although tests still fail on OS X). * Fixed menuconfig /sbin/launchd detection, which disables res_timing_kqueue on OS X). ASTERISK-24539 #close Reported by: George Joseph ASTERISK-24544 #close Reported by: George Joseph Review: https://reviewboard.asterisk.org/r/4327/ ........ Merged revisions 431092 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@431093 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-01-16Add support for the ca_list_path option for PJSIP transports.Mark Michelson
This allows for a path to be specified that has a collection of CA certificates in it. ASTERISK-24575 #close Reported by cloos Patches: pj-ca-path-trunk.diff uploaded by cloos (License #5956) Review: https://reviewboard.asterisk.org/r/4344 ........ Merged revisions 430709 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@430713 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-01-15configure: If cross-compiling, assume we have working semaphoresMatthew Jordan
The Asterisk 13 configure.ac checks for HAS_WORKING_SEMAPHORE but does not have an option for cross-compiling so it fails with an exit. Since we're cross- compiling, we can't exactly go looking for the header. The semaphore.h header is relatively common: * It's part of the POSIX standard * It's part of GNU C Library As such, we assume that it will be present when cross-compiling. As such, this patch defaults "HAS_WORKING_SEMAPHORE" to "1" if cross-compiling is detected. If you're cross-compiling to a platform that doesn't support this, then make sure you re-define this to 0. ASTERISK-24663 #close Reported by: abelbeck patches: asterisk-13-anonymous-semaphores.patch uploaded by abelbeck (License 5903) ........ Merged revisions 430646 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@430647 65c4cc65-6c06-0410-ace0-fbb531ad65f3