summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2017-12-30astobj2: Create case-insensitive variants of container function macros.Corey Farrell
* AO2_STRING_FIELD_CASE_HASH_FN * AO2_STRING_FIELD_CASE_CMP_FN * AO2_STRING_FIELD_CASE_SORT_FN Change-Id: I11af8c6a0c43380a42732553f519c667abb842cf
2017-12-22Remove as much trailing whitespace as possible.Sean Bright
Change-Id: I873c1c6d00f447269bd841494459efccdd2c19c0
2017-12-20Fix Common Typo's.Corey Farrell
Fix instances of: * Retreive * Recieve * other then * different then * Repeated words ("the the", "an an", "and and", etc). * othterwise, teh ASTERISK-24198 #close Change-Id: I3809a9c113b92fd9d0d9f9bac98e9c66dc8b2d31
2017-12-20manager.h: Bump AMI versionRichard Mudgett
Change-Id: I62e6ddeb261ef012687e1fb6734c554e2499b6bf
2017-12-18Merge "aco: Create ways to minimize use of regex." into 13Jenkins2
2017-12-18Merge "loader: Replace priority heap with vector." into 13George Joseph
2017-12-15loader: Replace priority heap with vector.Corey Farrell
This is needed for future changes which will require being able to process the load priority out of order. Change-Id: Ia23421197f09789940510b03ebbbf3bf24d51bea
2017-12-15aco: Create ways to minimize use of regex.Corey Farrell
ACO uses regex in many situations where it is completely unneeded. In some cases this doubles the total processing performed by aco_process_config. * Create ACO_IGNORE category type for use in place of skip_category regex source string. * Create additional aco_category_op values to allow specifying category filter using either a single plain string or a NULL terminated array of plain strings. * Create ACO_PREFIX to allow matching option names to case insensitive prefixes. Change-Id: I66a920dcd8e2b0301f73f968016440a985e72821
2017-12-14res_rtp_asterisk.c: Disable packet flood detection for video streams.Richard Mudgett
We should not do flood detection on video RTP streams. Video RTP streams are very bursty by nature. They send out a burst of packets to update the video frame then wait for the next video frame update. Really only audio streams can be checked for flooding. The others are either bursty or don't have a set rate. * Added code to selectively disable packet flood detection for video RTP streams. ASTERISK-27440 Change-Id: I78031491a6e75c2d4b1e9c2462dc498fe9880a70
2017-12-12chan_pjsip/res_pjsip: Add CHANNEL(pjsip,request_uri)Richard Mudgett
This patch does three things associated with the initial incoming INVITE request URI. 1) Add access to the full initial incoming INVITE request URI. 2) We were not setting DNID on incoming PJSIP channels. The DNID is the user portion of the initial incoming INVITE Request-URI. The value is accessed by reading CALLERID(dnid). 3) Fix CHANNEL(pjsip,target_uri) documentation. * The initial incoming INVITE request URI is now available using CHANNEL(pjsip,request_uri). * Set the DNID on PJSIP channel creation so CALLERID(dnid) can return the initial incoming INVITE request URI user portion. * CHANNEL(pjsip,target_uri) now correctly documents that the target URI is the contact URI. * Refactored print_escaped_uri() out of channel_read_pjsip() to handle pjsip_uri_print() error condition when the buffer is too small. ASTERISK-27478 Change-Id: I512e60d1f162395c946451becb37af3333337b33
2017-12-11Merge "astdb: Improve prefix searches in astdb" into 13Jenkins2
2017-12-10astdb: Improve prefix searches in astdbSean Bright
Using the LIKE operator requires a full table scan of 'astdb', whereas a comparison operation is able to use the primary key index. This patch adds a new function to the AstDB API for quick prefix matches and updates res_sorcery_astdb to utilize it. This showed substantial performance improvement in my test environment. Related to ASTERISK~26806, but does not completely resolve it. Change-Id: I7d37f9ba2aea139dabf2ca72d31fbe34bd9b2fa1
2017-12-08utils: Add convenience function for setting fd flagsSean Bright
There are many places in the code base where we ignore the return value of fcntl() when getting/setting file descriptior flags. This patch introduces a convenience function that allows setting or clearing file descriptor flags and will also log an error on failure for later analysis. Change-Id: I8b81901e1b1bd537ca632567cdb408931c6eded7
2017-12-04security-events: Fix SuccessfulAuth using_password declaration.Richard Mudgett
The SuccessfulAuth using_password field was declared as a pointer to a uint32_t when the field was later read as a uint32_t value. This resulted in unnecessary casts and a non-portable field value reinterpret in main/security_events.c:add_json_object(). i.e., It would work on a 32 bit architecture but not on a 64 bit big endian architecture. Change-Id: Ia08bc797613a62f07e5473425f9ccd8d77c80935
2017-11-27Merge "CLI: Create ast_cli_completion_add function." into 13Jenkins2
2017-11-27Merge "CLI: Remove calls to ast_cli_generator." into 13George Joseph
2017-11-21Merge "BuildSystem: pjsip_evsub_set_uas_timeout was not used." into 13Joshua Colp
2017-11-21CLI: Create ast_cli_completion_add function.Corey Farrell
Some completion generators are very inefficent due to the way CLI requests matches one at a time. ast_cli_completion_add can be called multiple times during one invokation of a CLI generator to add all results without having to reinitialize the search state for each match. Change-Id: I73d26d270bbbe1e3e6390799cfc1b639e39cceec
2017-11-21CLI: Remove calls to ast_cli_generator.Corey Farrell
The ability to add to localized storage cannot be supported by ast_cli_generator. The only calls to ast_cli_generator should be by functions that need to proxy the CLI generator, for example 'cli check permissions' or 'core show help'. * ast_cli_generatornummatches now retrieves the vector of matches and reports the number of elements (not including 'best' match). * test_substitution retrieves and iterates the vector. Change-Id: I8cd6b93905363cf7a33a2d2b0e2a8f8446d9f248
2017-11-21Merge "CLI: Create ast_cli_completion_vector." into 13Joshua Colp
2017-11-21Merge "README: Send people to secure websites where available." into 13Joshua Colp
2017-11-20BuildSystem: pjsip_evsub_set_uas_timeout was not used.Alexander Traud
ASTERISK-27435 Change-Id: Id318a7ae6d7d69b53f911d30bf3eece64852f15c
2017-11-17README: Send people to secure websites where available.Corey Farrell
We should be sending people to secure web URL's where available. Update README's and docs. Change-Id: Id5b1e049b0b18b49a784f1254605aefa244ce19a
2017-11-17doxygen: Remove obsolete contents.Corey Farrell
Remove doxygen contents that have nothing to do with the current state of Asterisk. Change-Id: Ic072cc8641f9533a202990ccf275ce87e3efd95c
2017-11-17Merge "Build: Make function constructor/destructor attributes mandatory." ↵Joshua Colp
into 13
2017-11-17CLI: Create ast_cli_completion_vector.Corey Farrell
This is a rewrite of ast_cli_completion_matches using a vector to build the list. The original function calls the vector version, NULL terminates the vector and extracts the elements array. One change in behavior the results are now sorted and deduplicated. This will solve bugs where some duplicate checking was done before the list was sorted. Change-Id: Iede20c5b4d965fa5ec71fda136ce9425eeb69519
2017-11-16Merge "sorcery: Add ast_sorcery_retrieve_by_prefix()" into 13Joshua Colp
2017-11-16Merge "pjsip / hep: Provide correct local address for Websockets." into 13Jenkins2
2017-11-14Merge "core: Add cache_media_frames debugging option." into 13Joshua Colp
2017-11-14pjsip / hep: Provide correct local address for Websockets.Joshua Colp
Previously for PJSIP the local address of WebSocket connections was set to the remote address. For logging purposes this is not particularly useful. The WebSocket API has been extended to allow the local address to be queried and this is used in PJSIP to set the local address to the correct value. The PJSIP HEP support has also been tweaked so that reliable transports always use the local address on the transport and do not try to (wrongly) guess. As they are connection based it is impossible for the source to be anything else. ASTERISK-26758 ASTERISK-27363 Change-Id: Icd305fd038ad755e2682ab2786e381f6bf29e8ca
2017-11-13alertpipe: Correct documented return of ast_alertpipe_write.Corey Farrell
Change-Id: I4ea49c441890a81384144479dc93ab5a3989486d
2017-11-13sorcery: Add ast_sorcery_retrieve_by_prefix()Sean Bright
Some consumers of the sorcery API use ast_sorcery_retrieve_by_regex only so that they can anchor the potential match as a prefix and not because they truly need regular expressions. Rather than using regular expressions for simple prefix lookups, add a new operation - ast_sorcery_retrieve_by_prefix - that does them. Patches against 13 and 15 have a compatibility layer needed to maintain ABI that is not needed in master. Change-Id: I56f4e20ba1154bd52281f995c27a429a854f6a79
2017-11-13vectors: Add new macro and a string vector definition.Corey Farrell
* AST_VECTOR_STEAL_ELEMENTS - steal the array of elements for use with non-vector code. * struct ast_vector_string - a vector of 'char *'. Change-Id: I104d1b204be03fccf67e02a195596adcb5ab1e42
2017-11-13Build: Make function constructor/destructor attributes mandatory.Corey Farrell
This change causes the configure script to fail if the C compiler does not support both function attributes constructor and destructor. These were already required as modules cannot function without these attributes and Asterisk requires modules. This also has AST_GCC_ATTRIBUTE set a variable ax_cv_have_func_attribute_$1. This is the same variable name used by autoconf-archive's AX_GCC_FUNC_ATTRIBUTE, used for the same purpose. Change-Id: Id68e8a1447f2a6d707c54b56350e7bfdb33fb663
2017-11-11core: Add cache_media_frames debugging option.Richard Mudgett
The media frame cache gets in the way of finding use after free errors of media frames. Tools like valgrind and MALLOC_DEBUG don't know when a frame is released because it gets put into the cache instead of being freed. * Added the "cache_media_frames" option to asterisk.conf. Disabling the option helps track down media frame mismanagement when using valgrind or MALLOC_DEBUG. The cache gets in the way of determining if the frame is used after free and who freed it. NOTE: This option has no effect when Asterisk is compiled with the LOW_MEMORY compile time option enabled because the cache code does not exist. To disable the media frame cache simply disable the cache_media_frames option in asterisk.conf and restart Asterisk. Sample asterisk.conf setting: [options] cache_media_frames=no ASTERISK-27413 Change-Id: I0ab2ce0f4547cccf2eb214901835c2d951b78c00
2017-11-07Merge "Fix ast_(v)asprintf() malloc failure usage conditions." into 13Jenkins2
2017-11-06Fix ast_(v)asprintf() malloc failure usage conditions.Richard Mudgett
When (v)asprintf() fails, the state of the allocated buffer is undefined. The library had better not leave an allocated buffer as a result or no one will know to free it. The most likely way it can return failure is for an allocation failure. If the printf conversion fails then you actually have a threading problem which is much worse because another thread modified the parameter values. * Made __ast_asprintf()/__ast_vasprintf() set the returned buffer to NULL on failure. That is much more useful than either an uninitialized pointer or a pointer that has already been freed. Many uses won't have to check for failure to ensure that the buffer won't be double freed or prevent an attempt to free an uninitialized pointer. * stasis.c: Fixed memory leak in multi_object_blob_to_ami() allocated by ast_asprintf(). * ari/resource_bridges.c:ari_bridges_play_helper(): Remove assignment to the wrong thing which is now not needed even if assigning to the right thing. Change-Id: Ib5252fb8850ecf0f78ed0ee2ca0796bda7e91c23
2017-11-06configure: Add autoconf check for libopusfile.Corey Farrell
This check is being added to make it easier for end-users of third party open source Opus modules. This was removed by ASTERISK-26426 but only the module needed to be removed. Change-Id: I62b9cd0c4fa8a77596ab0e042948a643a1152677
2017-11-02Modules: Additional improvements to CLI completion.Corey Farrell
Replace 'needsreload' argument with a 'type' argument to specify which type of modules you want completion. This provides more accurate CLI completion for load and unload commands. * 'module unload' now excludes modules that have active references or are not running. * 'module load' now excludes modules that are already running. * 'core set debug [atleast] <level> [module]' shows running modules only. ASTERISK-27378 Change-Id: Iea3e00054461484196c46f688f02635cc886bad1
2017-10-31Merge "Build System: Fix --disable-xmldoc option." into 13Jenkins2
2017-10-25res_pjsip: Add 'ip' as a valid option to 'identify_by' on endpoint.Joshua Colp
When the identify_by option on an endpoint is set to ip it will only be identified using the res_pjsip_endpoint_identifier_ip module. This ensures that it is not mistakenly matched using the username of the From header. To ensure behavior has not changed the default has been changed to "username,ip" for the identify_by option. ASTERISK-27206 Change-Id: I2170b86a7f7e221b4f00bf14aa1ef1ac5b050bbd
2017-10-25Build System: Fix --disable-xmldoc option.Corey Farrell
The configure option to disable XML documentation does not currently work. This patch makes it effective, but also causes an ABI change by removing the ast_xmldoc_* symbols. Disabling xmldoc also prevents docs from being automatically generated, but they can still be manually generated with 'make doc/core-en_US.xml'. ASTERISK-26639 Change-Id: Ifac562340c09f80c83e0203de098fcac93bf8c44
2017-10-13AMI: Increase version numberKevin Harwell
Bump the AMI patch number since the following new addition was made: * Added a new CancelAtxfer action that cancels an attended transfer. Change-Id: I9bac528791bd62ef0e99243903b6bc7a6c7ab182
2017-10-13Merge "features, manager : Add CancelAtxfer AMI action" into 13Joshua Colp
2017-10-12features, manager : Add CancelAtxfer AMI actionThomas Sevestre
Add action to cancel feature attended transfer with AMI interface ASTERISK-27215 #close Change-Id: Iab8a81362b5a1757e2608f70b014ef863200cb42
2017-10-11Merge "res_pjsip_registrar.c: Update remove_existing AOR contact handling." ↵Jenkins2
into 13
2017-10-09Merge "cdr.h: Fix doxygen comments." into 13Joshua Colp
2017-10-09cdr.h: Fix doxygen comments.Richard Mudgett
* Also some misc formatting in cdr.c. Change-Id: Ied89a28802a662c37c43326a1aafdce596e0df4a
2017-10-09res_pjsip_registrar.c: Update remove_existing AOR contact handling.Richard Mudgett
When "rewrite_contact" is enabled, the "max_contacts" count option can block re-registrations because the source port from the endpoint can be random. When the re-registration is blocked, the endpoint may give up re-registering and require manual intervention. * The "remove_existing" option now allows a registration to succeed by displacing any existing contacts that now exceed the "max_contacts" count. Any removed contacts are the next to expire. The behaviour change is beneficial when "rewrite_contact" is enabled and "max_contacts" is greater than one. The removed contact is likely the old contact created by "rewrite_contact" that the device is refreshing. ASTERISK-27192 Change-Id: I64c107a10b70db1697d17136051ae6bf22b5314b
2017-10-09res_pjsip: Fix issues that prevented shutdown of modules.Corey Farrell
res_pjsip and res_pjsip_session had circular references, preventing both modules from shutting down. * Move session supplement registration to res_pjsip. * Use create internal functions for use by pjsip_message_filter.c. ASTERISK-27306 Change-Id: Ifbd5c19ec848010111afeab2436f9699da06ba6b