- Jan 31, 2023
-
-
Sean Bright authored
Change-Id: Ic50e95b4fc10f74ab15416d908e8a87ee8ec2f85
-
- Jan 09, 2023
-
-
George Joseph authored
----------------- This commit reinstates MES with some casting fixes to the functions in time.h that convert between doubles and timeval structures. The casting issues were causing incorrect timestamps to be calculated which caused transcoding from/to G722 to produce bad or no audio. ASTERISK-30391 ----------------- This module has been updated to provide additional quality statistics in the form of an Asterisk Media Experience Score. The score is avilable using the same mechanisms you'd use to retrieve jitter, loss, and rtt statistics. For more information about the score and how to retrieve it, see https://wiki.asterisk.org/wiki/display/AST/Media+Experience+Score * Updated chan_pjsip to set quality channel variables when a call ends. * Updated channels/pjsip/dialplan_functions.c to add the ability to retrieve the MES along with the existing rtcp stats when using the CHANNEL dialplan function. * Added the ast_debug_rtp_is_allowed and ast_debug_rtcp_is_allowed checks for debugging purposes. * Added several function to time.h for manipulating time-in-samples and times represented as double seconds. * Updated rtp_engine.c to pass through the MES when stats are requested. Also debug output that dumps the stats when an rtp instance is destroyed. * Updated res_rtp_asterisk.c to implement the calculation of the MES. In the process, also had to update the calculation of jitter. Many debugging statements were also changed to be more informative. * Added a unit test for internal testing. The test should not be run during normal operation and is disabled by default. Change-Id: I4fce265965e68c3fdfeca55e614371ee69c65038
-
George Joseph authored
This reverts commit d454801c. Reason for revert: Issue when transcoding to/from g722 Change-Id: I09f49e171b1661548657a9ba7a978c29d0b5be86
-
- Jan 05, 2023
-
-
Naveen Albert authored
Currently, if a module declines to load, dlopen is called to register the module but dlclose never gets called. Furthermore, loader.c currently doesn't allow dlclose to ever get called on the module, since it declined to load and the unload function bails early in this case. This can be problematic if a module is updated, since the new module cannot be loaded into memory since we haven't closed all references to it. To fix this, we now allow modules to be unloaded, even if they never "loaded" in Asterisk itself, so that dlclose is called and the module can be properly cleaned up, allowing the updated module to be loaded from scratch next time. ASTERISK-30345 #close Change-Id: Ifc743aadfa85ebe3284e02a63e124dafa64988d5
-
- Jan 04, 2023
-
-
Naveen Albert authored
The if statement here is always false after the for loop finishes, so variables are never appended. This removes that to properly append to the end of the variable list. ASTERISK-30351 #close Reported by: Sebastian Gutierrez Change-Id: I1b7f8b85a8918f6a814cb933a479d4278cf16199
-
- Jan 03, 2023
-
-
Boris P. Korzun authored
If native HTTP is disabled but HTTPS is enabled and status page enabled too, Core/HTTP crashes while loading. 'global_http_server' references to NULL, but the status page tries to dereference it. The patch adds a check for HTTP is enabled. ASTERISK-30379 #close Change-Id: I11b02fc920b72aaed9c809fc43210523ccfdc249
-
George Joseph authored
This module has been updated to provide additional quality statistics in the form of an Asterisk Media Experience Score. The score is avilable using the same mechanisms you'd use to retrieve jitter, loss, and rtt statistics. For more information about the score and how to retrieve it, see https://wiki.asterisk.org/wiki/display/AST/Media+Experience+Score * Updated chan_pjsip to set quality channel variables when a call ends. * Updated channels/pjsip/dialplan_functions.c to add the ability to retrieve the MES along with the existing rtcp stats when using the CHANNEL dialplan function. * Added the ast_debug_rtp_is_allowed and ast_debug_rtcp_is_allowed checks for debugging purposes. * Added several function to time.h for manipulating time-in-samples and times represented as double seconds. * Updated rtp_engine.c to pass through the MES when stats are requested. Also debug output that dumps the stats when an rtp instance is destroyed. * Updated res_rtp_asterisk.c to implement the calculation of the MES. In the process, also had to update the calculation of jitter. Many debugging statements were also changed to be more informative. * Added a unit test for internal testing. The test should not be run during normal operation and is disabled by default. ASTERISK-30280 Change-Id: I458cb9a311e8e5dc1db769b8babbcf2e093f107a
-
- Dec 22, 2022
-
-
Naveen Albert authored
pbx_exec makes a channel snapshot before executing applications. This doesn't cause an issue during normal dialplan execution where pbx_exec is called over and over again in succession. However, if pbx_exec is called "one off", e.g. using ast_pbx_exec_application, then a channel snapshot never ends up getting made after the executed application returns, and inaccurate snapshot information will linger for a while, causing "core show channels", etc. to show erroneous info. This is fixed by manually making a channel snapshot at the end of ast_pbx_exec_application, since we anticipate that pbx_exec might not get called again immediately. ASTERISK-30367 #close Change-Id: I2a5131053aa9d11badbc0ef2ef40b1f83d0af086
-
- Dec 20, 2022
-
-
Peter Fern authored
When ast_stream_and_wait returns an error (for example, when attempting to stream to a channel after hangup) the stream is not closed, and callers typically do not check the return code. This results in leaking file descriptors, leading to resource exhaustion. This change ensures that the stream is closed in case of error. ASTERISK-30198 #close Reported-by: Julien Alie Change-Id: Ie46b67314590ad75154595a3d34d461060b2e803
-
- Dec 09, 2022
-
-
Michael Kuron authored
ASTERISK-21502 Change-Id: I051b778f8c862d3b4794d28f2f3d782316707b08
-
- Dec 08, 2022
-
-
Naveen Albert authored
The XML docs are currently only loaded on startup with no way to update them during runtime. This makes it impossible to load modules that use ACO/Sorcery (which require documentation) if they are added to the source tree and built while Asterisk is running (e.g. external modules). This adds a CLI command to reload the XML docs during runtime so that documentation can be updated without a full restart of Asterisk. ASTERISK-30289 #close Change-Id: I4f265b0e5517e757c5453a0f241201a5788d3a07
-
- Dec 03, 2022
-
-
Mike Bradeen authored
Add live_dangerously flag to manager and use this flag to determine if a configuation file outside of AST_CONFIG_DIR should be read. ASTERISK-30176 Change-Id: I46b26af4047433b49ae5c8a85cb8cda806a07404
-
- Nov 29, 2022
-
-
Naveen Albert authored
The Answer application currently waits for up to 500ms for media, even if users specify a different timeout. This adds an option to not wait for media on the channel by doing a raw answer instead. The default 500ms threshold is also documented. ASTERISK-30308 #close Change-Id: Id59cd340c44b8b8b2384c479e17e5123e917cba4
-
Maximilian Fridrich authored
This PR contains two relatively separate changes in channel.c and res_pjsip_session.c which ensure that topology changes are not ignored in cases where they should be handled. For channel.c: The function ast_channel_request_stream_topology_change only triggers a stream topology request change indication, if the channel's topology does not equal the requested topology. However, a channel could be in a state where it is currently "negotiating" a new topology but hasn't updated it yet, so the topology request change would be lost. Channels need to be able to handle such situations internally and stream topology requests should therefore always be passed on. In the case of chan_pjsip for example, it queues a session refresh (re-INVITE) if it is currently in the middle of a transaction or has pending requests (among other reasons). Now, ast_channel_request_stream_topology_change always indicates a stream topology request change even if the requested topology equals the channel's topology. For res_pjsip_session.c: The function resolve_refresh_media_states does not process stream state changes if the delayed active state differs from the current active state. I.e. if the currently active stream state has changed between the time the sip session refresh request was queued and the time it is being processed, the session refresh is ignored. However, res_pjsip_session contains logic that ensures that session refreshes are queued and re-queued correctly if a session refresh is currently not possible. So this check is not necessary and led to some session refreshes being lost. Now, a session refresh is done even if the delayed active state differs from the current active state and it is checked whether the delayed pending state differs from the current active - because that means a refresh is necessary. Further, the unit test of resolve_refresh_media_states was adapted to reflect the new behavior. I.e. the changes to delayed pending are prioritized over the changes to current active because we want to preserve the original intention of the pending state. ASTERISK-30184 Change-Id: Icd0703295271089057717006730b555b9a1d4e5a
-
- Nov 08, 2022
-
-
Naveen Albert authored
The ModuleCheck XML documentation falsely claims that the module's version number is returned. This has not been the case since 14, since the version number is not available anymore, but the documentation was not changed at the time. It is now updated to reflect this. ASTERISK-30285 #close Change-Id: Idde2d1205a11f2623fa1ddab192faa3dc4081e91
-
- Nov 06, 2022
-
-
Naveen Albert authored
Adds an ignore case for wink since it should pass through with no warning. ASTERISK-30290 #close Change-Id: Ieb7e34daa717357ac5c93efb0059f6c2321f16ad
-
- Oct 31, 2022
-
-
Naveen Albert authored
write_openssl_error_to_log has been erroneously using ast_free instead of free, which will cause a crash when MALLOC_DEBUG is enabled since the memory was not allocated by Asterisk's memory manager. This changes it to use the actual free function directly to avoid this. ASTERISK-30278 #close Change-Id: Iac8b6468b718075809c45d8ad16b101af21a474d
-
- Oct 27, 2022
-
-
Frederic LE FOLL authored
race condition: ast_dial_join() may not cancel outgoing call, if function is called just after called party answer and before application execution (bit is_running_app not yet set). This fix adds ast_softhangup() calls in addition to existing pthread_kill() when is_running_app is not set. ASTERISK-30258 Change-Id: Idbdd5c15122159661aa8e996a42d5800083131e4
-
- Oct 26, 2022
-
-
Naveen Albert authored
Some logic in say.c for determining if we need to also add an ampersand for file seperation was faulty, as non-successful files would increment the count, causing a leading ampersand to be added improperly. This is fixed, and a unit test that captures this regression is also added. ASTERISK-30248 #close Change-Id: I02c1d3a11d82fe4ea8b462070cbd1effb5834d2b
-
- Oct 11, 2022
-
-
Mike Bradeen authored
Add enum to allow setting optional direction. If set to only one direction, only feed matching-direction frames to the associated slin factory. This prevents mangling the transcoder on non-mixed frames when the READ and WRITE frames would have otherwise required it. Also removes the need to mute or discard the un-wanted frames as they are no longer added in the first place. res_stasis_snoop is changed to use this addition to set direction on audiohook based on spy direction. If no direction is set, the ast_audiohook_init will init this enum to BOTH which maintains existing functionality. ASTERISK-30252 Change-Id: If8716bad334562a5d812be4eeb2a92e4f3be28eb
-
- Oct 10, 2022
-
-
Naveen Albert authored
Allows bridging, parking, and dial messages to be globally ignored for all CDRs such that only a single CDR record is generated per channel. This is useful when CDRs should endure for the lifetime of an entire channel and bridging and dial updates in the dialplan should not result in multiple CDR records being created for the call. With the ignore bridging option, bridging changes have no impact on the channel's CDRs. With the ignore dial state option, multiple Dials and their outcomes have no impact on the channel's CDRs. The last disposition on the channel is preserved in the CDR, so the actual disposition of the call remains available. These two options can reduce the amount of "CDR hacks" that have hitherto been necessary to ensure that CDR was not "spoiled" by these messages if that was undesired, such as putting a dummy optimization-disabled local channel between the caller and the actual call and putting the CDR on the channel in the middle to ensure that CDR would persist for the entire call and properly record start, answer, and end times. Enabling these options is desirable when calls correspond to the entire lifetime of channels and the CDR should reflect that. Current default behavior remains unchanged. ASTERISK-30091 #close Change-Id: I393981af42732ec5ac3ff9266444abb453b7c832
-
- Sep 26, 2022
-
-
Naveen Albert authored
The DBGetTree AMI action's ListItem previously always reported 1, regardless of the count. This is corrected to report the actual count. ASTERISK-30245 #close patches: gettreecount.diff submitted by Birger Harzenetter (license 5870) Change-Id: I46d8992710f1b8524426b1255f57d1ef4a4934d4
-
Naveen Albert authored
Adds the n "no answer" option to the Bridge application so that answer supervision can not automatically be provided when Bridge is executed. Additionally, a mechanism (dialplan variable) is added to prevent bridge targets (typically the target of a masquerade) from answering the channel when they enter the bridge. ASTERISK-30223 #close Change-Id: I76f73fcd8e403bcd18f2abb40c658f537ac1ba6d
-
Philip Prindeville authored
ASTERISK-30232 #close Change-Id: I2603e2cef8f93f6b0a6ef39f7eac744251bb3902
-
- Sep 22, 2022
-
-
Jaco Kroon authored
If we find that n_max (currently hard wired to 1) sessions were purged, schedule the next purge for 1ms into the future rather than 5000ms (as per current). This way we will purge up to 1000 sessions per second rather than 1 every 5 seconds. This mitigates a build-up of sessions should http sessions gets established faster than 1 per 5 seconds. Change-Id: I9820d39aa080109df44fe98c1325cafae48d54f5 Signed-off-by:
Jaco Kroon <jaco@uls.co.za>
-
- Sep 19, 2022
-
-
George Joseph authored
ASTERISK-30235 Change-Id: Ia1e326e7b52cd06fd5e6c9009e3e63193c92f6cd
-
- Sep 13, 2022
-
-
George Joseph authored
Fixed a segfault caused by var_list_from_loc_info() encountering an empty location info element. Fixed an issue in ast_strsep() where a value with only whitespace wasn't being preserved. Fixed an issue in ast_variable_list_from_quoted_string() where an empty value was considered a failure. ASTERISK-30215 Reported by: Dan Cropp Change-Id: Ieca64e061a6d9298f0196c694b60d986ef82613a
-
- Sep 12, 2022
-
-
Philip Prindeville authored
ASTERISK-30037 Change-Id: I4b6f7264c8c737c476c798d2352f3232b263bbdf
-
Philip Prindeville authored
ASTERISK-30037 Change-Id: Icbf84ce05addb197a458361c35d784e460d8d6c2
-
- Sep 11, 2022
-
-
Naveen Albert authored
Adds an AMI event to indicate that a deadlock has likely started, when Asterisk is compiled with DETECT_DEADLOCKS enabled. This can make it easier to perform automated deadlock detection and take appropriate action (such as doing a core dump). Unlike the deadlock warnings, the AMI event is emitted only once per deadlock. ASTERISK-30161 #close Change-Id: Ifc6ed3e390f8b4cff7f8077a50e4d7a5b54e42fb
-
Naveen Albert authored
Use const char for char arguments to pbx_substitute_variables_helper_full_location that can do so (context and exten). ASTERISK-30209 #close Change-Id: I001357177e9c3dca2b2b4eebc5650c1095b3da6f
-
- Sep 10, 2022
-
-
Naveen Albert authored
If "core show channels" is run before startup has completed, it is possible for bad ao2 refs to occur because the system is not yet fully initialized. This will lead to an assertion failing. To prevent this, initialization of CLI builtins is moved to be later along in the main load sequence. Core CLI commands are loaded at the same time, but channel-related commands are loaded later on. ASTERISK-29846 #close Change-Id: If6b3cde802876bd738c1b4cf2683bea6ddc615b6
-
- Sep 08, 2022
-
-
Naveen Albert authored
Adds additional control options over the transfer feature functionality to give users more control in how the transfer feature sounds and works. First, the "transfer" sound that plays when a transfer is initiated can now be customized by the user in features.conf, just as with the other transfer sounds. Secondly, the user can now specify the transfer extension in advance by using the TRANSFER_EXTEN variable. If a valid extension is contained in this variable, the call will automatically be transferred to this destination. Otherwise, it will fall back to collecting the extension from the user as is always done now. ASTERISK-29899 #close Change-Id: Ibff309caa459a2b958706f2ed0ca393b1ef502e3
-
- Aug 17, 2022
-
-
Naveen Albert authored
Fixes a few coding guideline violations: * Use of C99 comments * Opening brace on same line as function prototype ASTERISK-30163 #close Change-Id: I07771c4c89facd41ce8d323859f022ddbddf6ca7
-
- Aug 10, 2022
-
-
George Joseph authored
* Added processing for the 'confidence' element. * Added documentation to some APIs. * removed a lot of complex code related to the very-off-nominal case of needing to process multiple location info sources. * Create a new 'ast_geoloc_eprofile_to_pidf' API that just takes one eprofile instead of a datastore of multiples. * Plugged a huge leak in XML processing that arose from insufficient documentation by the libxml/libxslt authors. * Refactored stylesheets to be more efficient. * Renamed 'profile_action' to 'profile_precedence' to better reflect it's purpose. * Added the config option for 'allow_routing_use' which sets the value of the 'Geolocation-Routing' header. * Removed the GeolocProfileCreate and GeolocProfileDelete dialplan apps. * Changed the GEOLOC_PROFILE dialplan function as follows: * Removed the 'profile' argument. * Automatically create a profile if it doesn't exist. * Delete a profile if 'inheritable' is set to no. * Fixed various bugs and leaks * Updated Asterisk WiKi documentation. ASTERISK-30167 Change-Id: If38c23f26228e96165be161c2f5e849cb8e16fa0
-
- Aug 02, 2022
-
-
Naveen Albert authored
The manager XML documentation documents a "FilterList" action, but there is no such action. Therefore, this can lead to confusion when people try to use a documented action that does not, in fact, exist. This is removed as the action never did exist in the past, nor would it be trivial to add since we only store the regex_t objects, so the filter list can't actually be provided without storing that separately. Most likely, the documentation was originally added (around version 10) in anticipation of something that never happened. ASTERISK-29917 #close Change-Id: I846b16fd6f80a91d4ddc5d8a861b522d7c6f8f97
-
- Aug 01, 2022
-
-
Naveen Albert authored
Adjusts some logging levels to be more or less important, that is more prominent when actual problems occur and less prominent for less noteworthy things. ASTERISK-30153 #close Change-Id: Ifc8f7df427aa018627db462125ae744986d3261b
-
- Jul 26, 2022
-
-
Naveen Albert authored
When ast_func_read2 is used to read a function using its read function (as opposed to a native ast_str read2 function), the result is copied directly by the function into the ast_str buffer. As a result, the ast_str length remains initialized to 0, which is a bug because this is not the real string length. This can cascade and have issues elsewhere, such as when reading substrings of functions that only register read as opposed to read2 callbacks. In this case, since reading ast_str_strlen returns 0, the returned substring is empty as opposed to the actual substring. This has caused the ast_str family of functions to behave inconsistently and erroneously, in contrast to the pbx_variables substitution functions which work correctly. This fixes this issue by manually updating the ast_str length when the result is copied directly into the ast_str buffer. Additionally, an assertion and a unit test that previously exposed these issues are added, now that the issue is fixed. ASTERISK-29966 #close Change-Id: I4e2dba41410f9d4dff61c995d2ca27718248e07f
-
- Jul 20, 2022
-
-
Naveen Albert authored
Adds the DBGetTree action, which can be used to retrieve all of the DB keys beginning with a particular prefix, similar to the capability provided by the database show CLI command. ASTERISK-30136 #close Change-Id: I3be9425e53be71f24303fdd4d2923c14e84337e6
-
Naveen Albert authored
The global event filtering code was only in one possible execution path, so not all events were being properly filtered out if requested. This moves that into the universal AMI handling code so all events are properly handled. Additionally, the CLI listing of disabled events can also get truncated, so we now print out everything. ASTERISK-30137 #close Change-Id: If8c42edcb2abc5158552da7eba2a8ff6b20e1959
-