Commit Graph

30319 Commits

Author SHA1 Message Date
Joshua Colp
dca83e2aa2 Merge "utils: Avoid an unused variable in Solaris 11." into 13 2018-06-22 07:21:56 -05:00
Joshua Colp
400f683fc1 Merge "func_env: Compile in Solaris 11." into 13 2018-06-22 07:18:28 -05:00
Jenkins2
533ab01414 Merge "codecs/ilbc: Compile in Solaris 11." into 13 2018-06-22 06:38:39 -05:00
Richard Mudgett
cb9475eb3d VECTOR: Passing parameters with side effects to macros is dangerous.
* Fix several instances where we were bumping a ref in the parameter and
then unrefing the object if it failed.  The way the AST_VECTOR_APPEND()
and AST_VECTOR_REPLACE() macros are implemented means if it fails the new
value was never evaluated.

Change-Id: I2847872a455b11ea7e5b7ce697c0a455a1d0ac9a
2018-06-21 16:57:47 -05:00
Alexander Traud
6d201a5df4 smsq: Remove an left-over special case for Solaris.
Actually, this case was never needed because the check below does the same.

Change-Id: Ia2fca4ba6c58c644a8b7cb2d9db8539728c14ffb
2018-06-21 10:45:57 -06:00
Alexander Traud
c8966b8c29 res_http_post: Enable GMime in Solaris 11.
Change-Id: Ie434541f18f894c751d2e44bcb3efb3cac626019
2018-06-21 10:18:55 -06:00
George Joseph
498e775a4a Merge changes from topic 'ASTERISK-27625' into 13
* changes:
  channel.c: Make CHECK_BLOCKING() save thread LWP id for messages.
  channel.c: Fix usage of CHECK_BLOCKING()
  autoservice: Don't start channel autoservice if the thread is a user interface.
2018-06-21 10:26:42 -05:00
George Joseph
aedbf5ba58 Merge "ARI POST DTMF: Make not compete with channel's media thread." into 13 2018-06-21 10:26:08 -05:00
George Joseph
4228dc7b4f Merge "AMI PlayDTMF Action: Make not compete with channel's media thread." into 13 2018-06-21 10:22:45 -05:00
Alexander Traud
81f39649ea codecs/ilbc: Compile in Solaris 11.
The symbol FS is the sampling frequency. That symbol is not used in Asterisk at
all and was a copy-and-paste of the iLBC reference code from the IETF RFC.
However, in Solaris, that symbol is defined by another header already. To
compile in Solaris, that symbol has to go.

Change-Id: I91ddbe5be7c00069c3a25abd5f58d7b2f04c51b1
2018-06-21 04:18:35 -06:00
Alexander Traud
78855e13e8 chan_oss: Compile in Solaris 11.
M_READ existed already and was conflicting in name.

Change-Id: I02108e07ae7d2dc314fe1e6c706c17731095a3e4
2018-06-21 04:17:51 -06:00
Alexander Traud
0b3c090ada func_env: Compile in Solaris 11.
Change-Id: Idc9b36720f3d29c90a35a6a1ae79a7f9e1aaf50e
2018-06-21 04:17:03 -06:00
Alexander Traud
a0445c7a3e utils: Avoid an unused variable in Solaris 11.
With ./configure --enable-dev-mode[=noisy], the build fails because every
warning gets an error. Therefore, Asterisk has to be free of warnings and this
variable must go.

Change-Id: I63dd2bc4833b9bdb04602f83422d16caf289d46a
2018-06-21 04:16:23 -06:00
Alexander Traud
d3fe2aceab BuildSystem: Enable ./configure in Solaris 11.
ASTERISK-27931

Change-Id: If298ce7f03be227a3687b9c20d382c9c55a72404
2018-06-21 04:15:23 -06:00
Kevin Harwell
e7ffbbd40e Merge "Fix some doxygen and curly placement." into 13 2018-06-20 17:15:35 -05:00
Jenkins2
8cc080a95c Merge "Dialplan functions: Fix some channel autoservice misuse." into 13 2018-06-20 16:36:58 -05:00
Alexander Traud
7686e674bf BuildSystem: Enable autotools in Solaris 11.
Because this was the last operating system which required a special case, a
version appended to the autotools, the whole version stuff is removed by this
change. This simplifies the script ./bootstrap.sh. Hopefully, this gives even
broader platform compatibility.

ASTERISK-27929
ASTERISK-27926

Change-Id: Id4cf433a1a7fa861d0210e1a2e16ca592b49fd5a
2018-06-20 13:24:55 -06:00
Jenkins2
8c3edf3a69 Merge "menuselect/menuselect_curses: Resolves sprintf usage error" into 13 2018-06-20 10:33:47 -05:00
Richard Mudgett
f878de44af channel.c: Make CHECK_BLOCKING() save thread LWP id for messages.
* Removed an unnecessary call to ast_channel_blocker_set() in
__ast_read().

ASTERISK-27625

Change-Id: I342168b999984666fb869cd519fe779583a73834
2018-06-19 14:13:07 -05:00
Richard Mudgett
99f439dc01 ARI POST DTMF: Make not compete with channel's media thread.
There can be one and only one thread handling a channel's media at a time.
Otherwise, we don't know which thread is going to handle the media frames.

ASTERISK-27625

Change-Id: I4d6a2fe7386ea447ee199003bf8ad681cb30454e
2018-06-19 14:13:07 -05:00
Richard Mudgett
6a1626c265 AMI PlayDTMF Action: Make not compete with channel's media thread.
There can be one and only one thread handling a channel's media at a time.
Otherwise, we don't know which thread is going to handle the media frames.

ASTERISK-27625

Change-Id: Ia341f1a6f4d54f2022261abec9021fe5b2eb4905
2018-06-19 14:13:07 -05:00
Richard Mudgett
1abcc41fff channel.c: Fix usage of CHECK_BLOCKING()
The CHECK_BLOCKING() macro is used to indicate if a channel's handling
thread is about to do a blocking operation (poll, read, or write) of
media.  A few operations such as ast_queue_frame(), soft hangup, and
masquerades use the indication to wake up the blocked thread to reevaluate
what is going on.

ASTERISK-27625

Change-Id: I4dfc33e01e60627d962efa29d0a4244cf151a84d
2018-06-19 14:13:07 -05:00
Richard Mudgett
5d34ca5b33 autoservice: Don't start channel autoservice if the thread is a user interface.
Executing dialplan functions from either AMI or ARI by getting a variable
could place the channel into autoservice.  However, these user interface
threads do not handle the channel's media so we wind up with two threads
attempting to handle the media.

There can be one and only one thread handling a channel's media at a time.
Otherwise, we don't know which thread is going to handle the media frames.

ASTERISK-27625

Change-Id: If2dc94ce15ddabf923ed1e2a65ea0ef56e013e49
2018-06-19 14:13:07 -05:00
Richard Mudgett
a6edbc9be1 Dialplan functions: Fix some channel autoservice misuse.
* Fix off nominal paths leaving the channel in autoservice.
* Remove unnecessary start/stop channel autoservice.
* Fix channel locking around a channel datastore search.

Change-Id: I7ff2e42388064fe3149034ecae57604040b8b540
2018-06-19 11:49:24 -05:00
Richard Mudgett
7b30158147 Fix some doxygen and curly placement.
Change-Id: I9a784a7c804120a8fa826c2a4cb9957e4b0b2fc8
2018-06-19 11:46:45 -05:00
Matthew Fredrickson
3570a62b32 menuselect/menuselect_curses: Resolves sprintf usage error
Acccording to the man page for sprintf, using the same buffer for
output as one used as an input yields undefined behavior.
This patch should work around this problem.

ASTERISK-27903
Reported-by: Alexander Traud

Change-Id: I2213dcb454aff26457e2e4cc9c6821276463ae3a
2018-06-19 08:43:31 -06:00
Richard Mudgett
f94a310ca0 channel: Fix some more unprotected channel flag setting.
Change-Id: I34c3b1201b1de539945bcfdcb264fff30332d48c
2018-06-18 10:54:03 -05:00
Sam Wierema
bb0ce22b2b app_mp3: remove 10 seconds of silence after mp3 playback
This patch changes the way asterisk polls output from mpg123, instead
of waiting for 10 seconds(when playing an http url) it now uses a
timeout of one second and iterates 10 times using this same timeout.

The main difference is that for every timeout asterisk receives it now
checks if mpg123 is still running before poll again.

ASTERISK-27752

Change-Id: Ib7df8462e3e380cb328011890ad9270d9e9b4620
2018-06-15 07:24:15 -06:00
Jenkins2
c72aef9657 Merge "tests/test_utils: Repair ./configure --with-ssl=PATH." into 13 2018-06-14 11:41:46 -05:00
Joshua Colp
4f5b8f77b9 Merge "res_rtp_asterisk: Instead of ./configure use OPENSSL_NO_SRTP." into 13 2018-06-14 11:27:16 -05:00
Alexander Traud
b004b44a46 tests/test_utils: Repair ./configure --with-ssl=PATH.
ASTERISK-27914

Change-Id: Ibcab8f556ee77776f203cff8b06d776a673b7bc4
2018-06-14 00:38:19 -06:00
ktyerman
c6116a3234 chan_iax2: better handling for timeout and EINTR
The iax2 module is not handling timeout and EINTR case properly. Mainly when
there is an interupt to the kernel thread. In case of ast_io_wait recieves a
signal, or timeout it can be an error or return 0 which eventually escapes the
thread loop, so that it cant recieve any data. This then causes the modules
receive queue to build up on the kernel and stop any communications via iax in
asterisk.

The proposed patch is for the iax module, so that timeout and EINTR does not
exit the thread.

ASTERISK-27705
Reported-by: Kirsty Tyerman

Change-Id: Ib4c32562f69335869adc1783608e940c3535fbfb
2018-06-13 16:46:40 -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
Jenkins2
49c4c8af98 Merge "res_rtp_asterisk: Allow OpenSSL configured with no-deprecated." into 13 2018-06-12 10:06:44 -05:00
Joshua Colp
7609249a22 Merge "crypto.h: Repair ./configure --with-ssl=PATH." into 13 2018-06-12 09:40:01 -05:00
Joshua Colp
2b25fdb80c Merge "res_crypto: Allow OpenSSL configured with no-deprecated." into 13 2018-06-12 08:28:16 -05:00
Jenkins2
e46ab4743b Merge "res_srtp: Repair ./configure --with-ssl=PATH." into 13 2018-06-12 07:45:19 -05:00
Jenkins2
6fa33215ef Merge "func_odbc: NODATA if SQLNumResultCols returned 0 columns on readsql" into 13 2018-06-12 07:36:15 -05:00
Jenkins2
867a23e267 Merge "chan_pjsip: Register for "BEFORE_MEDIA" responses" into 13 2018-06-11 18:05:10 -05:00
Richard Mudgett
034a04af2a AST-2018-008: Fix enumeration of endpoints from ACL rejected addresses.
When endpoint specific ACL rules block a SIP request they respond with a
403 forbidden.  However, if an endpoint is not identified then a 401
unauthorized response is sent.  This vulnerability just discloses which
requests hit a defined endpoint.  The ACL rules cannot be bypassed to gain
access to the disclosed endpoints.

* Made endpoint specific ACL rules now respond with a 401 unauthorized
which is the same as if an endpoint were not identified.  The fix is
accomplished by replacing the found endpoint with the artificial endpoint
which always fails authentication.

ASTERISK-27818

Change-Id: Icb275a54ff8e2df6c671a6d9bda37b5d732b3b32
2018-06-11 10:26:37 -05: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
2c3ad1e40d crypto.h: Repair ./configure --with-ssl=PATH.
ASTERISK-27908

Change-Id: Iac49d9f82faeb8a4611c6805906bd6d650b1b1d8
2018-06-08 05:02:51 -06:00
Alexander Traud
7763aa824e res_crypto: Allow OpenSSL configured with no-deprecated.
The header <openssl/rsa.h> had to be included explicitly.

ASTERISK-27906

Change-Id: I41743801eed998c039d73db7a0762d104a4f75b2
2018-06-08 11:06:44 +02:00
Alexander Traud
e62e069705 res_srtp: Repair ./configure --with-ssl=PATH.
ASTERISK-27905

Change-Id: Ibb7dc148a0048f4f9c3b12937ba4240dff0d15e2
2018-06-08 01:43:33 -06:00
Alexei Gradinari
d9d50396cf func_odbc: NODATA if SQLNumResultCols returned 0 columns on readsql
The functions acf_odbc_read/cli_odbc_read ignore a number of columns
returned by the SQLNumResultCols.
If the number of columns is zero it means no data.
In this case, a SQLFetch function has to be not called,
because it will cause an error.

ASTERISK-27888 #close

Change-Id: Ie0f7bdac6c405aa5bbd38932c7b831f90729ee19
2018-06-07 10:29:59 -04:00
George Joseph
98da1971e3 chan_pjsip: Register for "BEFORE_MEDIA" responses
chan_pjsip wasn't registering for "BEFORE_MEDIA" responses which meant
it was not updating HANGUPCAUSE for 4XX responses.  If the remote end
sent a "180 Ringing", then a "486 Busy", the hangup cause was left at
"180 Normal Clearing".

* Removed chan_pjsip_incoming_response from the original session
  supplement (which was handling only "AFTER MEDIA") and added it to a
  new session supplement which accepts both "BEFORE_MEDIA" and
  "AFTER_MEDIA".

* Also cleaned up some cleanup code in load module.

ASTERISK-27902

Change-Id: If9b860541887aca8ac2c9f2ed51ceb0550fb007a
2018-06-07 07:56:00 -06:00
Alexander Traud
1205bcb69f ooh323c: GCC 8.1 warned about output truncated before terminating nul.
ASTERISK-27901

Change-Id: I5a8e894f4924ef52e3094f6870656a559d67f3d7
2018-06-07 06:20:36 -06:00
Joshua Colp
19f8f85689 Merge "pjsip_options: handle modification of qualify options in realtime" into 13 2018-06-06 11:21:38 -05:00
George Joseph
8b6c84787c Merge "pjsip_options: show/reload AOR qualify options using CLI" into 13 2018-06-06 10:10:40 -05:00
George Joseph
499867d006 Merge "app_confbridge: Add talking indicator for ConfBridgeList AMI response" into 13 2018-06-06 09:46:29 -05:00