summaryrefslogtreecommitdiff
path: root/main
AgeCommit message (Collapse)Author
2016-11-30OpenSSL 1.1.0 supportTzafrir Cohen
OpenSSL 1.1.0 includes some major changes in the interface. See https://wiki.openssl.org/index.php/1.1_API_Changes . Status: Right now there are still a few deprecation notes with OpenSSL 1.1.0. But it's a start. Changes: * CRYPTO_LOCK is no longer available. Replace it with its value for now. I don't completely understand what it is used for there. * Remove several functions from libasteriskssl that seem to no longer be needed. * Structures have become opaque and are accesses with accessors. * ERR_remove_thread_state() no longer needed. * SSLv2 code now could no longer be used in 1.1. ASTERISK-26109 #close Change-Id: I5e29d477d486ca29b6aae0dc2f5dff960c1cb82b
2016-11-22res_rtp_asterisk: RTT miscalculation in RTCPgestoip2
When retrieving RTCP stats for PJSIP channels, RTT values are unreliable. RTT calculation is correct, but the data representation isn't. RTT is represented by a 32-bit fixed-point number with the integer part in the first 16 bits and the fractional part in the last 16 bits. In order to get the RTT value, the fractional part is miscalculated, there is an unnecessary 16 bit shift that causes overflow. Besides this there is another mistake, when transforming the integer value to the fixed point fractional part via bitwise operation, that loses precision. * RTT fractional part is no longer shifted, avoiding overflow. * RTT fractional part is transformed to its fixed-point value more precisely. * Fixed timeval2ntp() and ntp2timeval() second fraction conversions. * Fixed NTP timestamp report logging. The usec was inexplicably multiplied by 4096. ASTERISK-26566 #close Reported by Hector Royo Concepcion Change-Id: Ie09bdabfee75afb3f1b8ddfd963e5219ada3b96f
2016-11-21build: Backport addition of librt check to configure.acGeorge Joseph
A while back, a master-only change was made to check for librt which should probably have been cherry-picked to 13 at that time. Sometime between then and now, part of that change did make it into 13 but it was incomplete and non-functional. This patch backports the rest of the librt check and allows the link of libasteriskpj to use the results. Change-Id: I1424008fd8c90f389dda53162ec4a340b253a3c1
2016-11-21Merge "main/app.c: Transmit Silence on ControlPlayback pause" into 13Joshua Colp
2016-11-17main/app.c: Transmit Silence on ControlPlayback pausemisha
ASTERISK-26562 #close Change-Id: Ie6cb0ffc2b8c775639ce7784fe96f4ea00cfa2f8
2016-11-16build: Various OpenBSD issuesGeorge Joseph
OpenBSD's 'find' doesn't take the -delete argument so you have to pipe through 'xargs rm -rf'. 'echo -e' doesn't like \t starting a line. It just prints 't' which causes the libasteriskpj.exports file to be garbage. They were just cosmetic so they were removed. librt doesn't exist so the link of libasteriskpj.so fails. It's not actually needed for linux anyway so -lrt was removed from the link. res_rtp_asterisk was failing to load because of an undefined DTLS_method. '|| defined(LIBRESSL_VERSION_NUMBER)' was added to the #if so DTLSv1_method is used instead. ASTERISK-26608 Change-Id: I926ec95b0b69633231e3ad1d6e803b977272c49c
2016-11-16Merge "channel: Fix issues in hangup scenarios caused by frame deferral" ↵George Joseph
into 13
2016-11-16channel: Fix issues in hangup scenarios caused by frame deferralGeorge Joseph
ASTERISK-26343 Change-Id: I06dbf7366e26028251964143454a77d017bb61c8
2016-11-16Merge "codec_opus: Fix warning when Opus negotiated but codec_opus not ↵Joshua Colp
loaded." into 13
2016-11-16Merge "res/ari/resource_bridges: Add the ability to manipulate the video ↵zuul
source" into 13
2016-11-16Merge "Revert "Revert "channel: Use frame deferral API for safe sleep.""" ↵Joshua Colp
into 13
2016-11-16Merge "Revert "Revert "autoservice: Use frame deferral API""" into 13Joshua Colp
2016-11-16Merge "Revert "Revert "AGI: Only defer frames when in an interception ↵zuul
routine.""" into 13
2016-11-16Merge "Revert "Revert "Add API for channel frame deferral.""" into 13zuul
2016-11-16codec_opus: Fix warning when Opus negotiated but codec_opus not loaded.Richard Mudgett
When Opus is negotiated but not loaded, the log is spammed with messages because the system does not know how to calculate the number of samples in a frame. * Suppress the warning by supplying a function that assumes 20ms of samples in the frame. For pass through support it doesn't really seem to matter what number of samples is returned anyway. ASTERISK-26605 #close Change-Id: Icf2273692f040dc2c45b01e72a790d11092f9e0f
2016-11-16Merge "Add X.509 subject alternative name support to TLS certificate ↵Joshua Colp
verification." into 13
2016-11-16Merge "cli: Fix ast_el_read_char to work with libedit >= 3.1" into 13Joshua Colp
2016-11-15file.c/__ast_file_read_dirs: Fix issues on filesystems without d_typeGeorge Joseph
One of the code paths in __ast_file_read_dirs will only get executed if the OS doesn't support dirent->d_type OR if the filesystem the particular file is on doesn't support it. So, while standard Linux systems support the field, some filesystems like XFS do not. In this case, we need to call stat() to determine whether the directory entry is a file or directory so we append the filename to the supplied directory path and call stat. We forgot to truncate path back to just the directory afterwards though so we were passing a complete file name to the callback in the dir_name parameter instead of just the directory name. The logic has been re-written to only create a full_path if we need to call stat() or if we need to descend into another directory. Change-Id: I54e4228bd8355fad65200c6df3ec4c9c8a98dfba
2016-11-15Add X.509 subject alternative name support to TLS certificateMaciej Szmigiero
verification. This way one X.509 certificate can be used for hosts that can be reached under multiple DNS names or for multiple hosts. Signed-off-by: Maciej Szmigiero <mail@maciej.szmigiero.name> ASTERISK-25063 #close Change-Id: I13302c80490a0b44c43f1b45376c9bd7b15a538f
2016-11-14res/ari/resource_bridges: Add the ability to manipulate the video sourceMatt Jordan
In multi-party bridges, Asterisk currently supports two video modes: * Follow the talker, in which the speaker with the most energy is shown to all participants but the speaker, and the speaker sees the previous video source * Explicitly set video sources, in which all participants see a locked video source Prior to this patch, ARI had no ability to manipulate the video source. This isn't important for two-party bridges, in which Asterisk merely relays the video between the participants. However, in a multi-party bridge, it can be advantageous to allow an external application to manipulate the video source. This patch provides two new routes to accomplish this: (1) setVideoSource: POST /bridges/{bridgeId}/videoSource/{channelId} Sets a video source to an explicit channel (2) clearVideoSource: DELETE /bridges/{bridgeId}/videoSource Removes any explicit video source, and sets the video mode to talk detection ASTERISK-26595 #close Change-Id: I98e455d5bffc08ea5e8d6b84ccaf063c714e6621
2016-11-14Revert "Revert "channel: Use frame deferral API for safe sleep.""George Joseph
This reverts commit 58c88cfbaa80cb43419cde9186d643d1c5d24baf. Change-Id: I72692e2b2e83ef6da9390075ff20b138b2c374b6
2016-11-14Revert "Revert "autoservice: Use frame deferral API""George Joseph
This reverts commit 1df434e2b4bd7cc34b9b4addf405a3caa7ac16b8. Change-Id: Id2b8a8bccbb4bbdd82b792275d4cd6f32563e401
2016-11-14Revert "Revert "AGI: Only defer frames when in an interception routine.""George Joseph
This reverts commit 6be5d8de0da7e804544507f70382425af9a07b3f. Change-Id: I4b548137f52ae0686d8f09e21496b778d1c6a797
2016-11-14Revert "Revert "Add API for channel frame deferral.""George Joseph
This reverts commit 6b5a7ced136b7178ae0b2ba39221eba1cd2e37c9. Change-Id: I61d1dbb2e69e1977f684b7dfc8e98211024e1cd1
2016-11-14cli: Fix ast_el_read_char to work with libedit >= 3.1George Joseph
Libedit 3.1 is not build with unicode on as a default and so the prototype for the el_gets callback changed from expecting a char buffer to accepting a wchar buffer. If ast_el_read_char isn't changed, the cli reads garbage from teh terminal. Added a configure test for (*el_rfunc_t)(EditLine *, wchar_t *) and updated ast_el_read_char to use the HAVE_ define to detemrine whether to use char or wchar. ASTERISK-26592 #close Change-Id: I9099b46f68e06d0202ff80e53022a2b68b08871a
2016-11-10Merge "Revert "autoservice: Use frame deferral API"" into 13George Joseph
2016-11-10Merge "Revert "Add API for channel frame deferral."" into 13George Joseph
2016-11-10Merge "Revert "AGI: Only defer frames when in an interception routine."" into 13George Joseph
2016-11-10Revert "Add API for channel frame deferral."George Joseph
This reverts commit 9231a56cf3d6f5eca1bf2d37d827453400690773. Multiple testsuite failures were detected after the fact. Change-Id: I3bac8d7c3ddb69a4ddf6c5d6de0ffa5ff7ff3af7
2016-11-10Revert "AGI: Only defer frames when in an interception routine."George Joseph
This reverts commit 5c10091f3d1430c6fc04015226f8c3e3aa9d8282. Multiple testsuite failures were detected after the fact. Change-Id: I397a841acc17ae230c512449cd6bed89d2ef3b73
2016-11-10Revert "autoservice: Use frame deferral API"George Joseph
This reverts commit 2e3a3545754749de21873bfdc6d1a40ec7d8893f. Multiple testsuite failures were detected after the fact. Change-Id: Ia45fa4633fae74dca345b24bb6722737c63035de
2016-11-10Revert "channel: Use frame deferral API for safe sleep."George Joseph
This reverts commit 44f7e252397fd87420b3374df26941d7436401b3. Multiple testsuite failures were detected after the fact. Change-Id: I56299087da22128a95f0c8f3955f740890d7ca65
2016-11-08channel: Use frame deferral API for safe sleep.Mark Michelson
This is another case where manual frame deferral can be replaced with centralized routines instead. Change-Id: I42cdf205f8f29a7977e599751a57efbaac07c30e
2016-11-08autoservice: Use frame deferral APIMark Michelson
Rather than use manual frame deferral, just let the channel API do it for us. ASTERISK-26343 Change-Id: I688386f36e765dbc07be863943a43f26bd5eac49
2016-11-08AGI: Only defer frames when in an interception routine.Mark Michelson
AGI recently was modified to defer important frames. This was because when AGI was used in a connected line interception routine, the resulting connected line frame would end up getting discarded by the AGI. However, this caused bad behavior in other cases. Specifically, during a transfer, if someone attempted to manually set the Caller ID on a channel in an AGI, the deferred connected line frame would end up overwriting what had been manually set in the AGI. Since the initial issue was specific to interception routines, this change removes the manual frame deferral from AGI and instead uses the new frame deferral API in interception routines. ASTERISK-26343 #close Reported by Morton Tryfoss Change-Id: Iab7d39436d0ee99bfe32ad55ef91e9bd88db4208
2016-11-08Merge "Add API for channel frame deferral." into 13zuul
2016-11-08Merge "stasis_recording/stored: remove calls to deprecated readdir_r ↵Joshua Colp
function." into 13
2016-11-07Merge "main/bridge: Add some verbose logging for video source changes" into 13Joshua Colp
2016-11-07Merge "main/bridge_channel: Fix channel reference leak on video source" into 13Joshua Colp
2016-11-07Add API for channel frame deferral.Mark Michelson
There are several places in Asterisk that have duplicated logic for deferring important frames until later. This commit adds a couple of API calls to facilitate this automatically. ast_channel_start_defer_frames(): Future reads of deferrable frames on this channel will be deferred until later. ast_channel_stop_defer_frames(): Any frames that have been deferred get requeued onto the channel. ASTERISK-26343 Change-Id: I3e1b87bc6796f222442fa6f7d1b6a4706fb33641
2016-11-04main/bridge_channel: Fix channel reference leak on video sourceMatt Jordan
When a channel is made the video source, the bridge holds a reference to it. Whenever the video source changes, that reference is released. However, a ref leak does occur if the channel leaves the bridge (such as being hung up) while it is the video source, as the bridge never releases the ref in such a case. This patch adds a line to the bridge_channel_internal_join routine such that, when a channel finishes its time in the bridge, it notifies the bridge via ast_bridge_remove_video_src that if it is a video source its reference should be released. ASTERISK-26555 #close Change-Id: I3a2f5238a9d2fc49c591f0e65199d782ab0be76a
2016-11-04main/bridge: Add some verbose logging for video source changesMatt Jordan
It's actually quite useful to see the source of a video stream change. This doesn't happen terribly often, even with talk detection - but when it does, it's nice to know which channel is now providing your video stream. As a verbose 5 level message, it shouldn't be terribly spammy or costly to have, and is 'lower level' then most other verbose messages that the bridge system emits. ASTERISK-26555 Change-Id: Ia1c20ecafa9670171fd38bddcf3beccae47fb15c
2016-11-04stasis_recording/stored: remove calls to deprecated readdir_r function.Kevin Harwell
The readdir_r function has been deprecated and should no longer be used. This patch removes the readdir_r dependency (replaced it with readdir) and also moves the directory search code to a more centralized spot (file.c) Also removed a strict dependency on the dirent structure's d_type field as it is not portable. The code now checks to see if the value is available. If so, it tries to use it, but defaults back to using the stats function if necessary. Lastly, for most implementations of readdir it *should* be thread-safe to make concurrent calls to it as long as different directory streams are specified. glibc falls into this category. However, since it is possible that there exist some implementations that are not safe, locking has been added for those other than glibc. ASTERISK-26412 ASTERISK-26509 #close Change-Id: Id8f54689b1e2873e82a09d0d0d2faf41964e80ba
2016-11-02rtp_engine: Allow more than 32 dynamic payload types.Alexander Traud
The dynamic range (96-127) allows 32 RTP Payload Types. RFC 3551 section 3 allows to reassign other ranges. Consequently, when the dynamic range is exhausted, you can go for "rtp_pt_dynamic = 35" (or 0) in asterisk.conf. This enables the range 35-63 (or 0-63) giving room for another 29 (or 64) payload types. ASTERISK-26311 #close Change-Id: I7bc96ab764bc30098a178b841cbf7146f9d64964 (cherry picked from commit 9ac53877f688c06acaa7c377f15da8770e4ee88b)
2016-11-01netsock.c: fix includes for HURDTzafrir Cohen
ASTERISK-25070 Change-Id: I43bf94d2d36d3d8a8d0df40cd6c027d65a462814
2016-10-31manager: Add documentation for NewConnectedLine event.Etienne Lessard
The NewConnectedLine event has been added by commit fe7671f, but the documentation was missing. ASTERISK-26537 #close Change-Id: I7fc331f18caa28492da9303e576f70884ca8c9e6
2016-10-29astobj2: Declare private variable data_size for AO2_DEBUG only.Corey Farrell
Every ao2 object contains storage for a private variable data_size, though the value is never read if AO2_DEBUG is disabled. This change makes the variable conditional, reducing memory usage. ASTERISK-26524 #close Change-Id: If859929e507676ebc58b0f84247a4231e11da07f
2016-10-28pjproject_bundled: Fix issue where "/version.mak" wasn't foundGeorge Joseph
main/Makefile includes third-party/pjproject/build.mak but doesn't set PJDIR beforehand so "include $(PJDIR)/version.mak" evaluates to "/version.mak". Fix is to set PJDIR in main/Makefile before the include. Change-Id: I0f7c67d60209049056fe9c4b041bf0463aa95604
2016-10-28Fix shutdown crash caused by modules being left open.Corey Farrell
It is only safe to run ast_register_cleanup callbacks when all modules have been unloaded. Previously these callbacks were run during graceful shutdown, making it possible to crash during shutdown. ASTERISK-26513 #close Change-Id: Ibfa635bb688d1227ec54aa211d90d6bd45052e21
2016-10-24Merge "typo: s/paranthesis/parenthesis/ in a comment" into 13Joshua Colp