Alexander Traud [Sun, 28 Jan 2018 11:20:26 +0000 (12:20 +0100)]
BuildSystem: Remove unused variables.
Because of a copy-and-paste from the script build_tools/download_externals,
the script build_tools/list_valid_installed_externals got its local variables.
However in the latter, three variables were not used actually.
Corey Farrell [Thu, 25 Jan 2018 18:06:12 +0000 (13:06 -0500)]
loader: Use ast_cli_completion_add for 'module load' completion.
This addresses all performance issues with 'module load' completion. In
addition to using ast_cli_completion_add we stop using libedit's
filename_completion_function, instead using ast_file_read_dir. This
ensures all results are produced from a single call to opendir.
Alexander Traud [Sat, 27 Jan 2018 09:25:11 +0000 (10:25 +0100)]
headers: Consistent use of typeof and/or __typeof__.
Because of a copy-and-paste error, the Asterisk project was using __typeof
instead of typeof. It works because typeof, __typeof, and __typeof__ are
supported by GCC, but here the escaped variant was not intended. Therefore,
for consistence, we change this to typeof.
Richard Mudgett [Fri, 19 Jan 2018 02:19:00 +0000 (20:19 -0600)]
pbx_variables.c: Misc fixes in variable substitution.
* Copy more than one character at a time when there is nothing to
substitute.
* Fix off by one error if a '}' or ']' is missing.
* Eliminated the requirement that the "used" parameter had to point to a
variable. The current callers were always declaring a variable to meet
the requirement and discarding the value put into that variable. Now it
can be NULL.
* In ast_str_substitute_variables_full() fixed using the bogus channel to
evaluate a function. We were not using the bogus channel we just created
to help evaluate a subexpression.
Alexander Traud [Fri, 5 Jan 2018 20:46:51 +0000 (21:46 +0100)]
install_prereq: For PJProject, point users to configure script.
The installation script and the new configure option --with-pjproject-bundled
aimed to accomplish the same. However, the installation script was out of
date. Users should go for the maintained configure option, or the Wiki.
Alexander Traud [Fri, 19 Jan 2018 10:46:21 +0000 (11:46 +0100)]
install_prereq: Support package manager DNF and yum option strict=1.
This re-enables the script ./contrib/scripts/install_prereq on Fedora 22 and
newer, and on RHEL/CentOS when the option strict=1 was set for yum install.
ASTERISK-27598
Reported by: Hunter Stevens, Said Masoud
krells [Tue, 9 Jan 2018 17:29:48 +0000 (18:29 +0100)]
pbx: Reduce verbosity while loading extensions
Each time the dial plan is reloaded, a lot of logs like these are generated:
"Added extension 'XXXXX' priority 1 to YYYYYYYYYYY"
This patch changes the log level for those logs.
chan_unistim: Fix hold function ability to lock/crash asterisk
This patch fix chan_unistim hold functions to correctly support
hold function in different states possible in case of multiple lines
established on the phone
Corey Farrell [Wed, 17 Jan 2018 06:28:57 +0000 (01:28 -0500)]
loader: Miscellaneous fixes.
* Remove comment about lazy load.
* Improve message about module already being loaded and running.
* Handle allocation error in add_to_load_order.
* Dead code elimination from modules_shutdown.
Alexander Traud [Wed, 17 Jan 2018 08:51:29 +0000 (09:51 +0100)]
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.
Richard Mudgett [Tue, 16 Jan 2018 14:32:20 +0000 (08:32 -0600)]
taskprocessor.c: Increase the number of tps_singletons container buckets.
Since v12 the number of taskprocessors in the system has increased a lot.
Small systems can easily have over a hundred and larger systems can have
thousands.
Most uses of the tps_singletons container deal with creating and
destroying the taskprocessors. However, the pjsip distributor looks up
taskprocessors/serializers by name frequently. It needs to find the
serializer for incoming SIP responses to distribute them to the
appropriate serializer.
George Joseph [Tue, 16 Jan 2018 14:20:28 +0000 (07:20 -0700)]
pjproject_bundled: Prevent crash on bad outgoing header
We still need to figure out how a bad header is getting into the
outgoing message but this patch to pjproject prevents attempting
to print that header and causing a crash.
For several users, this crash happens when sending 183 progress
messages.
Asterisk's makefile for menuselect has a very simple source file parsing
script that looks for AST_MODULE_INFO lines to extract the quoted string
as a module description. If it does not find a quoted string it uses the
whole line as the description.
Corey Farrell [Sat, 13 Jan 2018 00:37:43 +0000 (19:37 -0500)]
res_stasis_recording: Allow symbolic links in configured recordings dir.
If any component of ast_config_AST_RECORDING_DIR is a symbolic link we
would incorrectly assume the ARI user was trying to escape the recording
path. Create additional check to check the recording directory's
realpath, only deny access if both do not match.
This is needed by the testsuite when run by 'run-local'.
Alexander Traud [Fri, 12 Jan 2018 09:17:04 +0000 (10:17 +0100)]
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.
Richard Mudgett [Sat, 23 Dec 2017 01:50:34 +0000 (19:50 -0600)]
res_pjsip: Split type=identify to IP address and SIP header matching priorities
The type=identify endpoint identification method can match by IP address
and by SIP header. However, the SIP header matching has limited
usefulness because you cannot specify the SIP header matching priority
relative to the IP address matching. All the matching happens at the same
priority and the order of evaluating the identify sections is
indeterminate. e.g., If you had two type=identify sections where one
matches by IP address for endpoint alice and the other matches by SIP
header for endpoint bob then you couldn't predict which endpoint is
matched when a request comes in that matches both.
* Extract the SIP header matching criteria into its own "header" endpoint
identification method so the user can specify the relative priority of the
SIP header and the IP address matching criteria in the global
endpoint_identifier_order option. The "ip" endpoint identification method
now only matches by IP address.
Tzafrir Cohen [Thu, 11 Jan 2018 14:09:04 +0000 (16:09 +0200)]
Ignore quilt .pc directory, used in deb packaging
Debian packaging uses quilt to manage patches. Book-keeping for them is
done using quilt (either directly, or in a compatible format), and
tracked in the directory .pc .