- Feb 23, 2021
-
-
Sebastien Duthil authored
ASTERISK-29244 Change-Id: I1862d58264c2c8b5d8983272cb29734b184d67c5
-
- Feb 16, 2021
-
-
Ben Ford authored
After some changes to streams and topologies, receiving fax through local channels stopped working. This change adds a stream topology with a stream of type IMAGE to the local channel pair and allows fax to be received. ASTERISK-29035 #close Change-Id: Id103cc5c9295295d8e68d5628e76220f8f17e9fb
-
- Jan 27, 2021
-
-
Dan Cropp authored
When a Transfer/REFER is executed, TRANSFERSTATUSPROTOCOL variable is 0 when no protocl specific error SIP example of failure, 3xx-6xx for the SIP error code received This allows applications to perform actions based on the failure reason. ASTERISK-29252 #close Reported-by: Dan Cropp Change-Id: Ia6a94784b4925628af122409cdd733c9f29abfc4
-
Alexander Traud authored
ASTERISK-29259 Change-Id: Ib6a6550e0e08355745d66da8e60ef49e81f9c6c5
-
Ivan Poddubnyi authored
Log proper control frame names instead of "Unknown control '14'", etc. Change-Id: I1724f2f4d1b064b25a5c93a7da0cb03be5143935
-
- Jan 06, 2021
-
-
Sean Bright authored
Rename check_manager_enabled() and check_webmanager_enabled() to begin with ast_ so that the symbols are automatically exported by the linker. ASTERISK~29184 Change-Id: I85762b9a5d14500c15f6bad6507138c8858644c9
-
- Jan 04, 2021
-
-
Alexander Traud authored
This was dead code, test code introduced with Asterisk 13. This was found while analyzing ASTERISK_28416 and ASTERISK_29185. This change partly fixes, not closes those two issues. Change-Id: I42d0daa37f6f334c7d86672f06f085858a3f3940
-
- Dec 17, 2020
-
-
Sean Bright authored
The documentation in the wiki says there should be spyee-channel information elements in the ChanSpyStop AMI event. https://wiki.asterisk.org/wiki/x/Xc5uAg However, this is not the case in Asterisk <= 16.10.0 Version. We're using these Spyee* arguments since Asterisk 11.x, so these arguments vanished in Asterisk 12 or higher. For maximum compatibility, we still send the ChanSpyStop event even if we are not able to find any 'Spyee' information. ASTERISK-28883 #close Change-Id: I81ce397a3fd614c094d043ffe5b1b1d76188835f
-
George Joseph authored
Scope tracing allows you to not specify a format string or variable, in which case it just prints the indent, file, function, and line number. The trace output automatically adds a newline to the end in this case. If you also have debugging turned on for the module, a debug message is also printed but the standard log functionality which prints it doesn't add the newline so you have messages that don't break correctly. * format_log_message_ap(), which is the common log message formatter for all channels, now adds a newline to the end of format strings that don't already have a newline. ASTERISK-29209 Reported by: Alexander Traud Change-Id: I994a7df27f88df343b7d19f3e81a4b562d9d41da
-
- Dec 09, 2020
-
-
lvl authored
As described in the issue, /tmp is not a suitable location for a large amount of cached media files, since most distributions make /tmp a RAM-based tmpfs mount with limited capacity. I opted for a location that can be configured separately, as opposed to using a subdirectory of spooldir, given the different storage profile (transient files vs files that might stay there indefinitely). This commit just makes the cache directory configurable, and changes the default location from /tmp to /var/cache/asterisk. ASTERISK-29143 Change-Id: Ic54e95199405abacd9e509cef5f08fa14c510b5d
-
- Dec 03, 2020
-
-
Sean Bright authored
Change-Id: Ia0e4124110df613ce5fdfa9ef8780016ebaa52c6
-
- Nov 18, 2020
-
-
Boris P. Korzun authored
Fixed a bug (like a typo) in retransfer_enter() at main/bridge_basic.c:2641. common_recall_channel_setup() setups common things on the recalled transfer target, but used same target as source instead trasfered. ASTERISK-29161 #close Change-Id: Ieb549654a621c38b1ad5e9d15b9f18823d9cc31f
-
- Nov 03, 2020
-
-
Alexander Traud authored
ASTERISK-29146 Change-Id: Ib04bdad87d729f805f5fc620ef9952f58ea96d41
-
- Oct 29, 2020
-
-
Walter Doekes authored
Version: gcc (Ubuntu 9.3.0-10ubuntu2) 9.3.0 Warning: say.c:2371:24: error: ‘%d’ directive output may be truncated writing between 1 and 11 bytes into a region of size 10 [-Werror=format-truncation=] 2371 | snprintf(buf, 10, "%d", num); say.c:2371:23: note: directive argument in the range [-2147483648, 9] That's not possible though, as the if() starts out checking for (num < 0), making this Warning a false positive. (Also replaced some else<TAB>if with else<SP>if while in the vicinity.) Change-Id: Ic7a70120188c9aa525a6d70289385bfce878438a
-
- Oct 08, 2020
-
-
Sean Bright authored
ASTERISK-28430 #close Change-Id: Ib556b0a0c95cca939e956886214ec8d828d89606
-
- Oct 02, 2020
-
-
Kevin Harwell authored
Added debug logging categories that allow a user to output debug information based on a specified category. This lets the user limit, and filter debug output to data relevant to a particular context, or topic. For instance the following categories are now available for debug logging purposes: dtls, dtls_packet, ice, rtcp, rtcp_packet, rtp, rtp_packet, stun, stun_packet These debug categories can be enable/disable via an Asterisk CLI command. While this overrides, and outputs debug data, core system debugging is not affected by this patch. Statements still output at their appropriate debug level. As well backwards compatibility has been maintained with past debug groups that could be enabled using the CLI (e.g. rtpdebug, stundebug, etc.). ASTERISK-29054 #close Change-Id: I6e6cb247bb1f01dbf34750b2cd98e5b5b41a1849
-
Sean Bright authored
In the event that the desired extension already exists, ast_add_extension2_lockopt() will free the 'data' it is passed before returning an error, so we should not be freeing it ourselves. Additionally, there were two places where ast_add_extension2_lockopt() could return an error without also freeing the 'data' pointer, so we add that. ASTERISK-29097 #close Change-Id: I904707aae55169feda050a5ed7c6793b53fe6eae
-
George Joseph authored
app_confbridge now has the ability to set the estimated bitrate on an SFU bridge. To use it, set a bridge profile's remb_behavior to "force" and set remb_estimated_bitrate to a rate in bits per second. The remb_estimated_bitrate parameter is ignored if remb_behavior is something other than "force". Change-Id: Idce6464ff014a37ea3b82944452e56cc4d75ab0a
-
- Sep 30, 2020
-
-
Jasper van der Neut authored
Check result of ast_translator_build_path against NULL before dereferencing. ASTERISK-29091 Change-Id: Ia3538ea190bd371f70c9dd49984b021765691b29
-
- Sep 23, 2020
-
-
Sean Bright authored
ASTERISK-28311 #close Change-Id: Ib1ce8fc1a8752751f5bf3615c59245532dfd9aa2
-
- Sep 15, 2020
-
-
Sean Bright authored
ASTERISK-28416 #close Change-Id: I069420875ebdbcaada52d92599a5f7de3cb2cdf4
-
- Sep 14, 2020
-
-
George Joseph authored
Added to: * bridges/bridge_softmix.c * channels/chan_pjsip.c * include/asterisk/res_pjsip_session.h * main/channel.c * res/res_pjsip_session.c There NO functional changes in this commit. Change-Id: I06af034d1ff3ea1feb56596fd7bd6d7939dfdcc3
-
George Joseph authored
When both Asterisk and a UA send re-invites at the same time, both send 491 "Transaction in progress" responses to each other and back off a specified amount of time before retrying. When Asterisk prepares to send its re-invite, it sets up the session's pending media state with the new topology it wants, then sends the re-invite. Unfortunately, when it received the re-invite from the UA, it partially processed the media in the re-invite and reset the pending media state before sending the 491 losing the state it set in its own re-invite. Asterisk also was not tracking re-invites received while an existing re-invite was queued resulting in sending stale SDP with missing or duplicated streams, or no re-invite at all because we erroneously determined that a re-invite wasn't needed. There was also an issue in bridge_softmix where we were using a stream from the wrong topology to determine if a stream was added. This also caused us to erroneously determine that a re-invite wasn't needed. Regardless of how the delayed re-invite was triggered, we need to reconcile the topology that was active at the time the delayed request was queued, the pending topology of the queued request, and the topology currently active on the session. To do this we need a topology resolver AND we need to make stream named unique so we can accurately tell what a stream has been added or removed and if we can re-use a slot in the topology. Summary of changes: * bridge_softmix: * We no longer reset the stream name to "removed" in remove_all_original_streams(). That was causing multiple streams to have the same name and wrecked the checks for duplicate streams. * softmix_bridge_stream_sources_update() was checking the old_stream to see if it had the softmix prefix and not considering the stream as "new" if it did. If the stream in that slot has something in it because another re-invite happened, then that slot in old might have a softmix stream but the same stream in new might actually be a new one. Now we check the new_stream's name instead of the old_stream's. * stream: * Instead of using plain media type name ("audio", "video", etc) as the default stream name, we now append the stream position to it to make it unique. We need to do this so we can distinguish multiple streams of the same type from each other. * When we set a stream's state to REMOVED, we no longer reset its name to "removed" or destroy its metadata. Again, we need to do this so we can distinguish multiple streams of the same type from each other. * res_pjsip_session: * Added resolve_refresh_media_states() that takes in 3 media states and creates an up-to-date pending media state that includes the changes that might have happened while a delayed session refresh was in the delayed queue. * Added is_media_state_valid() that checks the consistency of a media state and returns a true/false value. A valid state has: * The same number of stream entries as media session entries. Some media session entries can be NULL however. * No duplicate streams. * A valid stream for each non-NULL media session. * A stream that matches each media session's stream_num and media type. * Updated handle_incoming_sdp() to set the stream name to include the stream position number in the name to make it unique. * Updated the ast_sip_session_delayed_request structure to include both the pending and active media states and updated the associated delay functions to process them. * Updated sip_session_refresh() to accept both the pending and active media states that were in effect when the request was originally queued and to pass them on should the request need to be delayed again. * Updated sip_session_refresh() to call resolve_refresh_media_states() and substitute its results for the pending state passed in. * Updated sip_session_refresh() with additional debugging. * Updated session_reinvite_on_rx_request() to simply return PJ_FALSE to pjproject if a transaction is in progress. This stops us from creating a partial pending media state that would be invalid later on. * Updated reschedule_reinvite() to clone both the current pending and active media states and pass them to delay_request() so the resolver can tell what the original intention of the re-invite was. * Added a large unit test for the resolver. ASTERISK-29014 Change-Id: Id3440972943c611a15f652c6c569fa0e4536bfcb
-
- Sep 10, 2020
-
-
Sungtae Kim authored
Currently, it was not possible to create bridge with video_mode single. This made hard to put the bridge in a vidoe_single mode. So, added video_single option for Bridge creation using the ARI. This allows create a bridge with video_mode single. ASTERISK-29055 Change-Id: I43e720e5c83fc75fafe10fe22808ae7f055da2ae
-
Ben Ford authored
There's a race condition with bridging where a bridge can be torn down causing the bridge_channel's ast_channel to become NULL when it's still needed. This particular case happened with attended transfers, but the crash occurred when trying to publish a stasis message. Now, the bridge_channel is locked, a ref to the ast_channel is obtained, and that ref is passed down the chain. Change-Id: Ic48715c0c041615d17d286790ae3e8c61bb28814
-
- Sep 02, 2020
-
-
Kevin Harwell authored
Change-Id: Id603b0b03b78eb84c7fca030a08b343c0d5973f9
-
- Aug 28, 2020
-
-
Joshua C. Colp authored
When the ExtensionState AMI action is executed on a pattern matched hint it can end up adding a new hint if one does not already exist. This results in a locking order of contexts -> hints -> contexts. If at the same time a reload is occurring and adding its own hint it will have a locking order of hints -> contexts. This results in a deadlock as one thread wants a lock on contexts that the other has, and the other thread wants a lock on hints that the other has. This change enforces a hints -> contexts locking order by explicitly locking hints in the places where a hint is added when queried for. This matches the order seen through normal adding of hints. ASTERISK-29046 Change-Id: I49f027f4aab5d2d50855ae937bcf5e2fd8bfc504
-
George Joseph authored
Added a new log formatter called "plain" that always prints file, function and line number if available (even for verbose messages) and never prints color control characters. It also doesn't apply any special formatting for verbose messages. Most suitable for file output but can be used for other channels as well. You use it in logger.conf like so: debug => [plain]debug console => [plain]error,warning,debug,notice,pjsip_history messages => [plain]warning,error,verbose Change-Id: I4fdfe4089f66ce2f9cb29f3005522090dbb5243d
-
- Aug 25, 2020
-
-
Sean Bright authored
T.140 data in RTP is not zero terminated, so when we are queuing a text frame on a bridge we need to ensure that we are passing a zero terminated string. ASTERISK-28974 #close Change-Id: Ic10057387ce30b2094613ea67e3ae8c5c431dda3
-
- Aug 24, 2020
-
-
George Joseph authored
The SCOPE_ENTER and SCOPE_EXIT* macros now print debug messages at the same level as the scope level. This allows the same messages to be printed to the debug log when AST_DEVMODE isn't enabled. Also added a few variants of the SCOPE_EXIT macros that will also call ast_log instead of ast_debug to make it easier to use scope tracing and still print error messages. Change-Id: I7fe55f7ec28069919a0fc0b11a82235ce904cc21
-
- Aug 20, 2020
-
-
George Joseph authored
* Added ast_stream_to_stra and ast_stream_topology_to_stra() macros which are shortcuts for ast_str_tmp(256, ast_stream_to_str(stream, &STR_TMP)) * Added the stream position to the string representation of the stream. * Fixed some formatting in ast_stream_to_str(). Change-Id: Idaf4cb0affa46d4dce58a73a111f35435331cc4b
-
- Aug 18, 2020
-
-
George Joseph authored
Allow passing a topology from the called channel back to the calling channel. * Added a new function ast_queue_answer() that accepts a stream topology and queues an ANSWER CONTROL frame with it as the data. This allows the called channel to indicate its resolved topology. * Added a new virtual function to the channel tech structure answer_with_stream_topology() that allows the calling channel to receive the called channel's topology. Added ast_raw_answer_with_stream_topology() that invokes that virtual function. * Modified app_dial.c and features.c to grab the topology from the ANSWER frame queued by the answering channel and send it to the calling channel with ast_raw_answer_with_stream_topology(). * Modified frame.c to automatically cleanup the reference to the topology on ANSWER frames. Added a few debugging messages to stream.c. Change-Id: I0115d2ed68d6bae0f87e85abcf16c771bdaf992c
-
- Aug 06, 2020
-
-
Ben Ford authored
With the addition of STIR/SHAKEN, the function ast_base64decode_string was added for convenience since there is a lot of converting done during the STIR/SHAKEN process. This function returned the decoded string for you, but did not NULL terminate it, causing some issues (specifically with MALLOC_DEBUG). Now, the returned string is NULL terminated, and the documentation has been updated to reflect this. Change-Id: Icdd7d05b323b0c47ff6ed43492937a03641bdcf5
-
- Jul 28, 2020
-
-
Sean Bright authored
There are various places in Asterisk - specifically in regards to database integration - where having some kind of UTF-8 validation would be beneficial. This patch adds: * Functions to validate that a given string contains only valid UTF-8 sequences. * A function to copy a string (similar to ast_copy_string) stopping when an invalid UTF-8 sequence is encountered. * A UTF-8 validator that allows for progressive validation. All of this is based on the excellent UTF-8 decoder by Björn Höhrmann. More information is available here: https://bjoern.hoehrmann.de/utf-8/decoder/dfa/ The API was written in such a way that should allow us to replace the implementation later should we determine that we need something more comprehensive. Change-Id: I3555d787a79e7c780a7800cd26e0b5056368abf9
-
- Jul 24, 2020
-
-
sungtae kim authored
Currently, if the bridge has created by the ARI, the video_mode parameter was not shown in the BridgeCreated event correctly. Fixed it and added video_mode shown in the 'bridge show <bridge id>' cli. ASTERISK-28987 Change-Id: I8c205126724e34c2bdab9380f523eb62478e4295
-
- Jul 20, 2020
-
-
Sean Bright authored
If an ACL is misconfigured in the realtime database (for instance, the "rule" is blank) and Asterisk attempts to read the ACL, Asterisk will crash. ASTERISK-28978 #close Change-Id: Ic1536c4df856231bfd2da00128f7822224d77610
-
- Jul 08, 2020
-
-
George Joseph authored
Prior to making any modifications to the pjsip infrastructure for ACN, I've added the tracing functions to the existing code. This should make the final commit easier to review, but we can also now run a "before and after" trace. No functional changes were made with this commit. Change-Id: Ia83a1a2687ccb96f2bc8a2a3928a5214c4be775c
-
- Jul 07, 2020
-
-
George Joseph authored
* ast_frame_subclass2str() and ast_frame_type2str() now return a pointer to the buffer that was passed in instead of void. This makes it easier to use these functions inline in printf-style debugging statements. * Added many missing control frame entries in ast_frame_subclass2str. Change-Id: Ifd0d6578e758cd644c96d17a5383ff2128c572fc
-
George Joseph authored
Tracing through synchronous tasks was a little troublesome because the new thread's stack counter reset to 0. This change allows a synchronous task to set its trace level to be the same as the thread that pushed the task. For now, the task's level has to be passed in the task's data structure but a future enhancement to the taskprocessor subsystem could automatically set the trace level of the servant to be that of the caller. This doesn't really make sense for async tasks because you never know when they're going to run anyway. Change-Id: Ib8049c0b815063a45d8c7b0cb4e30b7b87b1d825
-
- Jul 06, 2020
-
-
Kevin Harwell authored
This patch allows a user of AMI to now specify the type of message content contained within by setting the 'Content-Type' parameter. Note, the AMI version has been bumped for this change. ASTERISK-28945 #close Change-Id: Ibb5315702532c6b954e1498beddc8855fabdf4bb
-