Git 2.45+ introduced a backward incompatible change in the iso-strict
date format, showing time in the Zulu timezone with Z suffix instead
of +00:00. This commit adds parsing for the new date format before
falling back to the old format.
Ignore errors for old git versions where %cI is not defined.
Revise GetCGRVersion error messages.
Revise GetCGRVersion unit test.
Avoids the default 1 second delay when the batch doesn't
reach 100 messages within that time.
Useful when the Kafka exporter is not cached, as it would
otherwise encounter that delay. Setting BatchSize to 1
prevents this.
The *transfer_balance action can now use a reference value to ensure
the destination balance reaches a specified amount. If the destination
balance exceeds the reference value, the excess is transferred back
to the source balance. If the destination balance is below the
reference value, the required amount is transferred from the source
balance to the destination balance to reach the specified reference
value. An error is returned if the transfer cannot achieve the
specified reference value.
Used by specifying DestinationReferenceValue inside ExtraParameters.
Other *transfer_balance changes:
- used json tags when unmarshaling ExtraParameters in order to be
able to shorten the names of the fields
- lock the destination account only if it's different from the
source account. It is still passed to the Guard function but
without a lock key and with 0 timeout.
- if the transfer happens within the same account, update the
account and execute its ActionTriggers only once.
- moved transfer units validation after retrieving/creating the
destination balance
*cdrlog action has been updated to create cdrs for reference
*transfer_balance actions, although improvements are needed and
the functionality is not completely tested.
APIerSv1.TransferBalance has been updated to take into account the
ReferenceValue parameter.
Added new *transfer_balance action unit tests to account for the
new changes.
Added integration tests (incomplete for now, but functionality
has been tested manually).
Applies to both file readers and loader (for loader, the blank statement
was used anyway).
It's redundant because for file readers, the rdr.dir value was always
passed as the parameter when it was already part of the method's object.
Parameter had to also be removed from the WatchDir function and the
functions it depends on.
Retrieve the Accounting BalanceCharge inside a new variable and reuse
that instead of repeatedly indexing the map. It is always assumed that
the BalanceCharge exists in the map and is non-nil. A comment was
added as a reminder.
TotalCost cannot be calculated anymore from ChargingIncrement alone.
The function is not used, so it will not be causing any issues for
now.
BalanceCharge clone function now handles the case where it is nil
to avoid any possible nil pointer dereference.
Will accept utils.CGREvent instead of utils.AttrDisconnectSession as a
parameter.
SessionSv1.ForceDisconnect will take utils.SessionFilterWithEvent as a
parameter instead of *utils.SessionFilter.
Added possibility to pass DisconnectCause as an Event parameter.
The forceSTerminate that's called when the session timer expires will
have DisconnectCause 'SESSION_TIMEOUT' instead of 'FORCED_DISCONNECT'.
Added Dispatcher methods for AlterSessions.
Event will be merged with EventStart of the session before being sent to
AgentV1DisconnectSession.
It will be added to CallDescriptor in ExtraFields.
Ensure CDR ExtraFields are passed to CallDescriptor before
sending it to RALs.
Ensure Clone function of CallDescriptor also clones the
ExtraFields map.