summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2018-03-21Merge "core: Stop using AST_INLINE_API for allocator functions."Jenkins2
2018-03-21Merge "rtp: Add REMB RTP property and set it on PJSIP video RTP."Jenkins2
2018-03-20Merge "core: Remove additional symbols."Joshua Colp
2018-03-20Merge "core: Remove dead symbols from asterisk.exports.in."Jenkins2
2018-03-20Merge "channel.c: Allow generic plc then channel formats are equal"Jenkins2
2018-03-20Merge "stringfields: Remove MALLOC_DEBUG fields from struct ↵Jenkins2
ast_string_field_mgr."
2018-03-20Merge "BuildSystem: Remove unused dependency on libltdl."Joshua Colp
2018-03-19core: Remove additional symbols.Corey Farrell
Remove symbols that are depreacated and replaced: * ast_channel_datastore_alloc * ast_channel_datastore_free * ast_channel_cmpwhentohangup * ast_channel_setwhentohangup * config_text_file_save * devstate2str * ast_device_state_changed * ast_device_state_changed_literal * ast_verbose_get_by_module Remove unused symbols: * channelreloadreason2txt (last used in Asterisk 12). Remove unused ast_options flags: * AST_OPT_FLAG_END_CDR_BEFORE_H_EXTEN / ast_opt_end_cdr_before_h_exten * AST_OPT_FLAG_VERBOSE_MODULE / ast_opt_verb_module * AST_OPT_FLAG_INITIATED_SECONDS Change-Id: I841255995d195f8efc1ed47af9c7a2f131c08645
2018-03-19core: Remove dead symbols from asterisk.exports.in.Corey Farrell
* dahdi_chan_name * dahdi_chan_name_len * dahdi_chan_mode * __manager_event * dialed_interface_info Added comment about __progname and environ being needed for FreeBSD to prevent accidental removal in the future. Change-Id: I3ae026bc541cd9cb572be2ffa95fc359547642b5
2018-03-19channel.c: Allow generic plc then channel formats are equalGeorge Joseph
If the two formats on a channel are equal, we don't transcode and since the generic plc needs slin to work, it doesn't get invoked. * A new configuration option "genericplc_on_equal_codecs" was added to the "plc" section of codecs.conf to allow generic packet loss concealment even if no transcoding was originally needed. Transcoding via SLIN is forced in this case. ASTERISK-27743 Change-Id: I0577026a179dea34232e63123254b4e0508378f4
2018-03-19Merge "loader: Convert reload_classes to built-in modules."Jenkins2
2018-03-19rtp: Add REMB RTP property and set it on PJSIP video RTP.Joshua Colp
This change adds a property to RTP instances to indicate that REMB support is enabled and that sending/receiving should be passed through. This also enables it on video RTP instances in PJSIP if WebRTC support is enabled. Finally the goog-remb extension is added to the SDP using the rtcp-fb attribute to indicate our support for it. Details about REMB can be found on the draft document for it: https://tools.ietf.org/html/draft-alvestrand-rmcat-remb-03 Change-Id: I1902dda1c0882bd1a0d71b2f120684b44b97e789
2018-03-17BuildSystem: Remove unused dependency on libltdl.Alexander Traud
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-17core: Stop using AST_INLINE_API for allocator functions.Corey Farrell
This replaces AST_INLINE_API allocators in utils.h with real functions implemented in astmm.c. Associated macro's are also moved from utils.h to astmm.h. Remove menuselect conflicts between MALLOC_DEBUG and DEBUG_CHAOS as they can now be combined. This has multiple benefits: * Simplifies asterisk/utils.h by removing inline functions and use of the logger. * Removal of these inline functions decreases size of Asterisk and module binaries by 1% or more. * Puts memory management functions together with and without MALLOC_DEBUG enabled, simplifying management of the code. * Enables DEBUG_CHAOS for ASTMM_REDIRECT and bundled pjproject. Change-Id: If9df4377f74bdbb627461b27a473123e05525887
2018-03-14Merge "core: Remove incorrect usage of attribute_malloc."Jenkins2
2018-03-14Merge "core: Remove non-critical cleanup from startup aborts."Jenkins2
2018-03-14loader: Convert reload_classes to built-in modules.Corey Farrell
* acl (named_acl.c) * cdr * cel * ccss * dnsmgr * dsp * enum * extconfig (config.c) * features * http * indications * logger * manager * plc * sounds * udptl These modules are now loaded at appropriate time by the module loader. Unlike loadable modules these use AST_MODULE_LOAD_FAILURE on error so the module loader will abort startup on failure of these modules. Some of these modules are still initialized or shutdown from outside the module loader. logger.c is initialized very early and shutdown very late, manager.c is initialized by the module loader but is shutdown by the Asterisk core (too much uses it without holding references). Change-Id: I371a9a45064f20026c492623ea8062d02a1ab97f
2018-03-13Merge "BuildSystem: Enable PortAudio in NetBSD."Jenkins2
2018-03-13core: Remove incorrect usage of attribute_malloc.Corey Farrell
GCC documentation states that when __attribute__((malloc)) is used it should not return storage which contains any valid pointers. It specifically mentions that realloc functions should not have the malloc attribute, but this also means that complex initializers which could contain initialized pointers should not use this attribute. Change-Id: If507f33ffb3ca3b83b702196eb0e8215d27fc7d2
2018-03-13stringfields: Remove MALLOC_DEBUG fields from struct ast_string_field_mgr.Corey Farrell
This causes MALLOC_DEBUG reporting to be slightly different, calls which cause additional memory pools to be allocated now report the callers location rather than the location which originally allocated the string field structure. This reduces storage needed by string fields and allows MALLOC_DEBUG to identify the source of additional allocations rather than obscuring it by reporting the original allocation caller. Change-Id: Idd18e6639a87ab862079b580c114d90361412289
2018-03-13Merge "core: Remove ABI effects of MALLOC_DEBUG."Jenkins2
2018-03-13core: Remove non-critical cleanup from startup aborts.Corey Farrell
When built-in components of Asterisk fail to start they cause the Asterisk startup to abort. In these cases only the most critical cleanup should be performed - closing databases and terminating proceses. These cleanups are registered using ast_register_atexit, all other cleanups should not be run during startup abort. The main reason for this change is that these cleanup procedures are untestable from the partially initialized states, if they fail it could prevent us from ever running the critical cleanup with ast_run_atexits. Create separate initialization for dns_core.c to be run unconditionally during startup instead of being initialized by the first dns resolver to be registered. This ensures that 'sched' is initialized before it can be potentially used. Replace ast_register_atexit with ast_register_cleanup in media_cache.c. There is no reason for this cleanup to happen unconditionally. Change-Id: Iecc2df98008b21509925ff16740bd5fa29527db3
2018-03-08BuildSystem: Enable PortAudio in NetBSD.Alexander Traud
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-07app_osplookup: Move header defines into the app.Corey Farrell
astosp.h is leftover from when logic was split between app_osplookup and res_osp. All logic was moved into app_osplookup by 109737eb1c in 2006, but astosp.h remained. This moves the remaining defines into app_osplookup and deletes astosp.h. Change-Id: I0a6c4debd7c9543b608520b1765abfa4fab7b2fd
2018-03-05Merge "BuildSystem: Detect whether uselocale(.) is available."Jenkins2
2018-03-03BuildSystem: Detect whether uselocale(.) is available.Alexander Traud
ASTERISK-27712 Reported by: Joerg Sonnenberger, D'Arcy Cain Change-Id: Idf1c9d43617a3e13028b95b313415903d80ef807
2018-03-01core: Remove ABI effects of MALLOC_DEBUG.Richard Mudgett
This allows asterisk to be compiled with MALLOC_DEBUG to load modules built without MALLOC_DEBUG. Now pre-compiled third-party modules will still work regardless of MALLOC_DEBUG being enabled or not. Change-Id: Ic07ad80b2c2df894db984cf27b16a69383ce0e10
2018-02-28pjproject: Add cache_pools debugging option.Richard Mudgett
The pool cache gets in the way of finding use after free errors of memory pool contents. Tools like valgrind and MALLOC_DEBUG don't know when a pool is released because it gets put into the cache instead of being freed. * Added the "cache_pools" option to pjproject.conf. Disabling the option helps track down pool content mismanagement when using valgrind or MALLOC_DEBUG. The cache gets in the way of determining if the pool contents are used after free and who freed it. To disable the pool caching simply disable the cache_pools option in pjproject.conf and restart Asterisk. Sample pjproject.conf setting: [startup] cache_pools=no * Made current users of the caching pool factory initialization and destruction calls call common routines to create and destroy cached pools. ASTERISK-27704 Change-Id: I64d5befbaeed2532f93aa027a51eb52347d2b828
2018-02-23Add extended properties to rtp_engine for RTP retransmission support.Ben Ford
A couple of additional properties are needed in rtp_engine to enable support for packet retransmission: AST_RTP_PROPERTY_RETRANS_RECV and AST_RTP_PROPERTY_RETRANS_SEND. These will both be enabled automatically if an endpoint has the webrtc option enabled. While this adds no functionality currently, it will serve as a building block for future changes for RTP retransmission support. For more information, refer to the wiki page: https://wiki.asterisk.org/wiki/display/AST/WebRTC+User+Experience+Improvements Change-Id: Ic598acd042a045f9d10e5bdccb66f4efc9e587cc
2018-02-14BuildSystem: Remove chan_h323 leftovers.Alexander Traud
ASTERISK-27670 Change-Id: I07a8ef8bbd6001e25711fa1bff152eb6c9efa729
2018-02-01Merge "app_confbridge: Update dsp_silence_threshold and ↵Jenkins2
dsp_talking_threshold docs."
2018-02-01Merge "res_pjsip_pubsub: Prune subs with reliable transports at startup"George Joseph
2018-01-31Merge "core: Create ast_atomic macro's."Jenkins2
2018-01-31app_confbridge: Update dsp_silence_threshold and dsp_talking_threshold docs.Richard Mudgett
The dsp_talking_threshold does not represent time in milliseconds. It represents the average magnitude per sample in the audio packets. This is what the DSP uses to determine if a packet is silence or talking/noise. Change-Id: If6f939c100eb92a5ac6c21236559018eeaf58443
2018-01-31Merge "loader: Use ast_cli_completion_add for 'module load' completion."Jenkins2
2018-01-31Merge "pbx_variables.c: Misc fixes in variable substitution."Jenkins2
2018-01-30core: Create ast_atomic macro's.Corey Farrell
Create ast_atomic macro's to provide a consistent interface to the common functionality of __atomic and __sync built-in functions. ASTERISK-27619 Change-Id: Ieba3f81832a0e25c5725ea067e5d6f742d33eb5b
2018-01-30res_pjsip_pubsub: Prune subs with reliable transports at startupGeorge Joseph
In an earlier release, inbound registrations on a reliable transport were pruned on Asterisk restart since the TCP connection would have been torn down and become unusable when Asterisk stopped. This same process is now also applied to inbound subscriptions. Also fixed issues in res_pjsip_registrar where it wasn't handling the monitoring correctly when multiple registrations came in over the same transport. To accomplish this, the pjsip_transport_event feature needed to be refactored to allow multiple monitors (multiple subcriptions or registrations from the same endpoint) to exist on the same transport. Since this changed the API, any external modules that may have used the transport monitor feature (highly unlikey) will need to be changed. ASTERISK-27612 Reported by: Ross Beer Change-Id: Iee87cf4eb9b7b2b93d5739a72af52d6ca8fbbe36
2018-01-30Merge "Build System: Require __sync or __atomic functions."Jenkins2
2018-01-30Merge "Build System: Add support for __atomic built-in operators."Jenkins2
2018-01-29Merge "Remove redundant module checks and references."Jenkins2
2018-01-27loader: Use ast_cli_completion_add for 'module load' completion.Corey Farrell
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. Change-Id: I8bf51ffaa7ef1606f3bd1b5bb13f1905d72c6134
2018-01-27headers: Consistent use of typeof and/or __typeof__.Alexander Traud
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. Change-Id: I2a962c3e596e882f691a19345445b14571a5f07c
2018-01-25Build System: Require __sync or __atomic functions.Corey Farrell
This change causes the configure script to throw an error if neither __sync nor __atomic builtin functions are available. ASTERISK-27619 Change-Id: Ie01a281e0f5c41dfeeb5f250c1ccea8752f56ef9
2018-01-24Build System: Add support for __atomic built-in operators.Corey Farrell
Add a check to configure.ac for __atomic_fetch_add support. If found use the __atomic built-in operators for ast_atomic_dec_and_test and ast_atomic_fetchadd_int. ASTERISK~27619 Change-Id: I65b4feb02bae368904ed0fb03f585c05f50a690e
2018-01-24Remove redundant module checks and references.Corey Farrell
This removes references that are no longer needed due to automatic references created by module dependencies. In addition this removes most calls to ast_module_check as they were checking modules which are listed as dependencies. Change-Id: I332a6e8383d4c72c8e89d988a184ab8320c4872e
2018-01-22pbx_variables.c: Misc fixes in variable substitution.Richard Mudgett
* 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. Change-Id: Ia83d99f4f16abe47f329eb39b6ff2013ae7c9854
2018-01-16res_pjsip: Split type=identify to IP address and SIP header matching prioritiesRichard Mudgett
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. ASTERISK-27491 Change-Id: I9df142a575b7e1e3471b7cda5d3ea156cef08095
2018-01-15loader: Add dependency fields to module structures.Corey Farrell
* Declare 'requires' and 'enhances' text fields on module info structure. * Rename 'nonoptreq' to 'optional_modules'. * Update doxygen comments. Still need to investigate dependencies among modules I cannot compile. Change-Id: I3ad9547a0a6442409ff4e352a6d897bef2cc04bf
2018-01-15vector: Additional string vector definitions.Corey Farrell
ast_vector_string_split: This function will add items to an ast_vector_string by splitting values of a string buffer. Items are appended to the vector in the order they are found. ast_vector_const_string: A vector of 'const char *'. Change-Id: I1bf02a1efeb2baeea11c59c557d39dd1197494d7