- 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
-
Sean Bright authored
Allows a vector to be sorted in-place, rather than only during insertion. Change-Id: I22cba9ddf556a7e44dacc53c4431bd81dd2fa780
-
George Joseph authored
Change-Id: I7d951e75ad2d472fa096647dfb55670b11105e23
-
- Jul 23, 2020
-
-
Joshua C. Colp authored
When dealing with a lot of video streams on WebRTC the resulting SDPs can grow to be quite large. This effectively doubles the maximum size to allow more streams to exist. The res_http_websocket module has also been changed to use a buffer on the session for reading in packets to ensure that the stack space usage is not excessive. Change-Id: I31d4351d70c8e2c11564807a7528b984f3fbdd01
-
- Jul 21, 2020
-
-
George Joseph authored
* Updated AMI version to 8.0.0 * Updated ARI version to 7.0.0 * Update make_ari_stubs.py to "Asterisk 19" Change-Id: I51fb38c2e29f2db785f64a8bbd5565d56bea5af5
-
- 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
-
Joshua C. Colp authored
I noticed this while looking at another issue and brought it up with Teluu. It was possible for an uninitialized timer to be cancelled, resulting in the invalid timer id of 0 being placed into the timer heap causing issues. This change is a backport from the pjproject repository preventing this from happening. Change-Id: I1ba318b1f153a6dd7458846396e2867282b428e7
-
- Jul 15, 2020
-
-
Asterisk Development Team authored
-
- Jul 13, 2020
-
-
Nickolay Shmyrev authored
We read beyond the end of the buffer when copying the string out of the buffer when we used ast_copy_string() because the original string was not null terminated. Instead switch to ast_strndup() which does not exhibit the same behavior. ASTERISK-28975 #close Change-Id: Ib4a75cffeb1eb8cf01136ef30306bd623e531a2a
-
- Jul 10, 2020
-
-
Ben Ford authored
Added a new configuration option for PJSIP endpoints - stir_shaken. If set to yes, then STIR/SHAKEN support will be added to inbound and outbound INVITEs. The default is no. Alembic has been updated to include this option. Previously the dialplan function was not trimming the whitespace from the parameters it recieved. Now it does. Also added a conditional that, when TEST_FRAMEWORK is enabled, the timestamp in the identity header will be overlooked. This is just for testing, since the testsuite will rely on a SIPp scenario with a preset identity header to trigger the MISMATCH result. Change-Id: I43d67f1489b8c1c5729ed3ca8d71e35ddf438df1
-
- Jul 09, 2020
-
-
George Joseph authored
session_on_rx_response wasn't checking for a NULL dialog before attempting to get the invite session from it. Change-Id: Id13534375966cc2eb7f2b55717c9813c63c10065
-
Walter Doekes authored
If your queues.conf had _no_ [general] section, they would default to 'yes'. Now, they always default to 'no'. (Actually, commit ed615afb already partially fixed it for shared_lastcall.) ASTERISK-28951 Change-Id: Ic39d8a0202906bc454194368bbfbae62990fe5f6
-
- 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
-
George Joseph authored
This commit adds the endpoint options required to control Advanced Codec Negotiation. incoming_offer_codec_prefs outgoing_offer_codec_prefs incoming_answer_codec_prefs outgoing_answer_codec_prefs The documentation may need tweaking and some additional edits added, especially for the "answer" prefs. That'll be handled when things finalize. This commit is safe to merge as it doens't alter any existing functionality nor does it alter the previous codec negotiation work which may now be obsolete. Change-Id: I920ba925d7dd36430dfd2ebd9d82d23f123d0e11
-
- Jul 07, 2020
-
-
sungtae kim authored
Currently when the pjsip making an outgoing request, it keep adding the rport parameter in a request message as a default. This causes unexpected rport handle at the other end. Added option for disable this behaviour in the pjsip.conf. This is a system option, but working as a gloabl option. ASTERISK-28959 Change-Id: I9596675e52a742774738b5aad5d1fec32f477abc
-
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
-
Nickolay Shmyrev authored
Do not return error if the client received ping frame while looking for a string and just wait for another frame. ASTERISK-28958 #close Change-Id: I4d06b4827bd71e56cbaafc011ffdcef9f0332922
-
- Jul 06, 2020
-
-
Kevin Harwell authored
When using the PSJIP_MEDIA_OFFER dialplan function it was not overriding an endpoint's configured codecs on refresh unless they had a shared codec between the two. This patch makes it so whatever is set using PJSIP_MEDIA_OFFER is used when creating the SDP for a refresh no matter what. ASTERISK-28878 #close Change-Id: I0f7dc86fd0fb607c308e6f98ede303c54d1eacb6
-
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
-
- Jul 01, 2020
-
-
George Joseph authored
The Streams API becomes the home for the core ACN capabilities. These include... * Parsing and formatting of codec negotation preferences. * Resolving pending streams and topologies with those configured using configured preferences. * Utility functions for creating string representations of streams, topologies, and negotiation preferences. For codec negotiation preferences: * Added ast_stream_codec_prefs_parse() which takes a string representation of codec negotiation preferences, which may come from a pjsip endpoint for example, and populates a ast_stream_codec_negotiation_prefs structure. * Added ast_stream_codec_prefs_to_str() which does the reverse. * Added many functions to parse individual parameter name and value strings to their respectrive enum values, and the reverse. For streams: * Added ast_stream_create_resolved() which takes a "live" stream and resolves it with a configured stream and the negotiation preferences to create a new stream. * Added ast_stream_to_str() which create a string representation of a stream suitable for debug or display purposes. For topology: * Added ast_stream_topology_create_resolved() which takes a "live" topology and resolves it, stream by stream, with a configured topology stream and the negotiation preferences to create a new topology. * Added ast_stream_topology_to_str() which create a string representation of a topology suitable for debug or display purposes. * Renamed ast_format_caps_from_topology() to ast_stream_topology_get_formats() to be more consistent with the existing ast_stream_get_formats(). Additional changes: * A new function ast_format_cap_append_names() appends the results to the ast_str buffer instead of replacing buffer contents. Change-Id: I2df77dedd0c72c52deb6e329effe057a8e06cd56
-
- Jun 30, 2020
-
-
George Joseph authored
Created new SCOPE_ functions that don't depend on RAII_VAR. Besides generating less code, the use of the explicit SCOPE_EXIT macros capture the line number where the scope exited. The RAII_VAR versions can't do that. * SCOPE_ENTER(level, ...): Like SCOPE_TRACE but doesn't use RAII_VAR and therefore needs needs one of... * SCOPE_EXIT(...): Decrements the trace stack counter and optionally prints a message. * SCOPE_EXIT_EXPR(__expr, ...): Decrements the trace stack counter, optionally prints a message, then executes the expression. SCOPE_EXIT_EXPR(break, "My while got broken\n"); * SCOPE_EXIT_RTN(, ...): Decrements the trace stack counter, optionally prints a message, then returns without a value. SCOPE_EXIT_RTN("Bye\n"); * SCOPE_EXIT_RTN_VALUE(__return_value, ...): Decrements the trace stack counter, optionally prints a message, then returns the value specified. SCOPE_EXIT_RTN_VALUE(rc, "Returning with RC: %d\n", rc); Create an ast_str helper ast_str_tmp() that allocates a temporary ast_str that can be passed to a function that needs it, then frees it. This makes using the above macros easier. Example: SCOPE_ENTER(1, Format Caps 1: %s Format Caps 2: %s\n", ast_str_tmp(32, ast_format_cap_get_names(cap1, &STR_TMP), ast_str_tmp(32, ast_format_cap_get_names(cap2, &STR_TMP)); The calls to ast_str_tmp create an ast_str of the specified initial length which can be referenced as STR_TMP. It then calls the expression, which must return a char *, ast_strdupa's it, frees STR_TMP, then returns the ast_strdupa'd string. That string is freed when the function returns. Change-Id: I44059b20d55a889aa91440d2f8a590865998be51
-
- Jun 26, 2020
-
-
Joshua C. Colp authored
The outbound proxy for an AOR was not being applied to any statically configured Contacts. This resulted in the OPTIONS requests being sent to the wrong target. This change sets the outbound proxy on statically configured contacts once the AOR configuration is done being applied. ASTERISK-28965 Change-Id: Ia60f3e93ea63f819c5a46bc8b54be2e588dfa9e0
-
- Jun 25, 2020
-
-
Joshua C. Colp authored
Given a scenario where a module has a dependency on both an external library and a module if the external library was available and the module was not an infinite loop would occur. This happened due to the code changing the dependecy status to no failure on each dependency checking loop iteration, resulting in the code thinking that it had gone from no failure to failure each time triggering another dependency check. This change makes it so that the old dependency status is preserved throughout the dependency checking allowing it to determine that after the first iteration the dependency status does not transition from no failure to failure. ASTERISK-28930 Change-Id: Iea06d45d9fd6d8bfd068882a0bb7e23a53ec3e84
-
Frederic LE FOLL authored
chan_sip handle_response() function, for a 400 response to an INVITE, calls handle_response_invite() and does not generate ACK. handle_response_invite() does not recognize 400 response and has no default response processing for unexpected responses, thus it does not generate ACK either. The ACK on response repetition comes from handle_response() mechanism "We must re-send ACKs to re-transmitted final responses". According to code history, 400 response specific processing was introduced with commit "channels/chan_sip: Add improved support for 4xx error codes" This commit added support for : - 400/414/493 in handle_response_subscribe() handle_response_register() and handle_response(). - 414/493 only in handle_response_invite(). This fix adds 400 response support in handle_response_invite(). ASTERISK-28957 Change-Id: Ic71a087e5398dfc7273946b9ec6f9a36960218ad
-
- Jun 22, 2020
-
-
Kevin Harwell authored
A patch made a reference to the PJSIP_SC_NULL enumeration value, which was added to pjproject 2.8 and above thus making it so Asterisk would fail to compile with prior versions of pjproject. This patch removes the reference, and instead initializes the value to '0'. ASTERISK-28886 #close Change-Id: I68491c80da1a0154b2286c9458440141c98db9d7
-
Università di Bologna - CESIA VoIP authored
1) Fix memory-leaks Added code to release ast_events extracted from corosync and stasis messages 2) Clean stasis cache when a member of the corosync cluster leaves the group Added code to remove from the stasis cache of the members remained on the group all the messages with the EID of the left member. If the device states of the left member remain in the stasis cache of other members, they will not be updated anymore and high priority cached values, like BUSY, will take precedence over current device states. 3) Stop corosync event propagation when node is not joined to the group Updated dispatch_thread_handler code to detect when asterisk is not joined to the corosync group and added some condition in publish_event_to_corosync code to send corosync messages only when joined. When a node is not joined its corosync daemon can't send messages: the cpg_mcast_joined function append new messages to the FIFO buffer until it's full and then it blocks indefinitely. In this scenario if the stasis_message_cb callback, registered by res_corosync to handle stasis messages, try to send a corosync messages, the thread of the stasis thread-pool will be blocked until the node join the corosync cluster. ASTERISK-28888 Reported by: Università di Bologna - CESIA VoIP Change-Id: Ie8e99bc23f141a73c13ae6fb1948d148d4de17f2
-
Moises Silva authored
ASTERISK-28949 Change-Id: Id465030f2b1997b83d408933fdbabe01827469ca
-
- Jun 19, 2020
-
-
Joshua C. Colp authored
When stream support was added to Asterisk the stream state was used inconsistently, resulting in odd behavior. This was then standardized to be the state of a stream from the perspective of Asterisk. This change updates the StreamEcho dialplan application to use the correct state, send only, since we are only sending to the endpoint and not expecting them to send us multiple video streams. ASTERISK-28954 Change-Id: I35bfd533ef1184ffe62586b22bbd253c82872a56
-
Guido Falsi authored
The change to how setvar works for various channels performed in ASTERISK~23756 missed some required change in the dahdi channel, where the variables are actually set while reading configuration. This change should fix the issue. ASTERISK-28955 Change-Id: Ibfeb7f8cbdd735346dc4028de6a265f24f9df274
-
Joshua C. Colp authored
When a re-INVITE is received we create a new set of streams that are then swapped in as the active streams. We did not preserve the SDP label from the previous streams, resulting in the label getting lost. This change ensures that if an SDP label is present on the previous stream then it is set on the new stream. ASTERISK-28953 Change-Id: I9dd63b88b562fe96ce5c791a3dae5bcaca258445
-
- Jun 18, 2020
-
-
Joshua C. Colp authored
The AMI action and CLI command did not take into account the properties of full backend caching. This resulted in an expired object remaining removed until a full backend update occurred, instead of having the object updated when needed. This change makes it so that the AMI action and CLI command for object expire will now fail instead of putting the cache into an undesired state. If full backend caching is enabled then only operations which act on the entire cache are available. ASTERISK-28942 Change-Id: Id662d888f177ab566c8e802ad583083b742d21f4
-
Ben Ford authored
Integrated STIR/SHAKEN support with outgoing INVITEs. When an INVITE is sent, the caller ID will be checked to see if there is a certificate that corresponds to it. If so, that information will be retrieved and an Identity header will be added to the SIP message. The format is: header.payload.signature;info=<public_key_url>alg=ES256;ppt=shaken Header, payload, and signature are all BASE64 encoded. The public key URL is retrieved from the certificate. Currently the algorithm and ppt are ES256 and shaken, respectively. This message is signed and can be used for verification on the receiving end. Two new configuration options have been added to the certificate object: attestation and origid. The attestation is required and must be A, B, or C. origid is the origination identifier. A new utility function has been added as well that takes a string, allocates space, BASE64 encodes it, then returns it, eliminating the need to calculate the size yourself. Change-Id: I1f84d6a5839cb2ed152ef4255b380cfc2de662b4
-
- Jun 17, 2020
-
-
Walter Doekes authored
Because ring_entry() is not called, outgoing->chan is not touched here either. ASTERISK-28950 ASTERISK-28644 Change-Id: I564613715dfaf45af868251eb75a451f512af90f
-
Walter Doekes authored
Change-Id: I24b5453df412232cf7f9a171ea4a34b35ad3ae78
-
- Jun 16, 2020
-
-
Walter Doekes authored
Before this changeset, it was possible that a queue member (agent) was called even though they just got out of a call, and wrapuptime seconds hadn't passed yet. This could happen if a member ended a call _between_ a new call attempt and asterisk trying that particular member for a new call. In that case, Asterisk would check the hangup time of the call-before-the-last-call instead of the hangup time of the-last-call. ASTERISK-28952 Change-Id: Ie0cab8f0e8d639c01cba633d4968ba19873d80b3
-
Kevin Harwell authored
This patch makes the usual necessary changes when upgrading to a new version pjproject. For instance, version number bump, patches removed from third-party, new *.md5 file added, etc.. This patch also includes a change to the Asterisk pjproject Makefile to explicitly create the 'source/pjsip-apps/lib' directory. This directory is no longer there by default so needs to be added so the Asterisk malloc debug can be built. This patch also includes some minor changes to Asterisk that were a result of the upgrade. Specifically, there was a backward incompatibility change made in 2.10 that modified the "expires header" variable field from a signed to an unsigned value. This potentially effects comparison. Namely, those check for a value less than zero. This patch modified a few locations in the Asterisk code that may have been affected. Lastly, this patch adds a new macro PJSIP_MINVERSION that can be used to check a minimum version of pjproject at compile time. ASTERISK-28899 #close Change-Id: Iec8821c6cbbc08c369d0e3cd2f14e691b41d0c81
-
- Jun 15, 2020
-
-
Joshua C. Colp authored
When requesting a Local channel the requested stream topology or a converted stream topology will now be placed onto the resulting channels. Frames written in on streams will now also preserve the stream identifier as they are queued on the opposite channel. Finally when a stream topology change is requested it is immediately accepted and reflected on both channels. Each channel also receives a queued frame to indicate that the topology has changed. ASTERISK-28938 Change-Id: I4e9d94da5230d4bd046dc755651493fce1d87186
-
- Jun 12, 2020
-
-
sungtae kim authored
If channelId parameters were passed in the body, the Asterisk doesn't parsing it correctly. Fixed it to parse the channelId, other_channel_id parameter correclty. ASTERISK-28948 Change-Id: I59b49161a94869169ee19c1ffab5afcef7026157
-
- Jun 11, 2020
-
-
Joshua C. Colp authored
The "value" passed in when setting an RTP property determines whether it should be enabled or disabled. The RTP send and receive retrans props did not examine this to know if the buffers should be enabled. They assumed they always should be. This change makes it so that the "value" passed in is respected. ASTERISK-28939 Change-Id: I9244cdbdc5fd065c7f6b02cbfa572bc55c7123dc
-