Will now support two extra parameters: address and codec. For *internal
connections, the birpc.Service object will be retrieved from rpcParamsMap
from utils. Supported codecs: <*gob|*json|*http_jsonrpc> (ingored for
*internal address).
Action does not bother with setting defaults anymore, lets the API
handle them.
Improve action comments.
Add unit tests for the action. UnregisterRpcParams' implementation was
required.
Updated *alter_sessions action tariffplan for radius coa integration test
to include address and codec.
Some birpc clients that are set up in integration tests were still registering
a SessionSv1 object. Updated them to register an AgentV1 object instead.
Ensure parameter fields are not abbreviated.
The action will not depend on balance type anymore. It will go through all
balances.
*default balance from source balance can go negative during transfer.
The one from sessions takes an additional event alongside the
SessionFilter, while the one from agents will accept a CGREvent
instead of a simple originID string
The additional event sent to SessionSv1ReAuthorize will be merged
with the EventStart event from the matched session and can be used
when building server initiated requests from the *req map. The
initial packet which was initially inside *req, will be moved to
the *oreq ExtraDP (stands for original request).
Updated radigo library to latest version.
Updated RadiusAgent to satisfy the birpc client interface.
Added *radDAdiscMsg OrderedNavigableMap type field within AgentRequest.
This one is similar to *diamreq, as it is used for building RADIUS
server-initiated Disconnect Requests.
radReplyAppendAttributes: refactored to reflect that it can now be
used to also append attributes to request packets, not only reply.
Added bidirectional support for session related RadiusAgent methods.
For Dynamic Authorization to be possible, a new field was added within RadiusAgent
that holds dicts and secrets only for the clients that support it. They are used
to create the DA Client sending Disconnect Requests.
Added a new cache partition to store Access-Request packets with the purpose
of using them to build the Disconnect Requests. They are identified by sessionID.
It defaults to the value of 'Acct-Session-id'.
Added a predefined '*dmr' template as well as a 'dmr_template' config option within
the 'radius_agent' config section. This will map to a custom or to the predefined
template and will be used to build the Disconnect Request. By default, it doesn't
point to any template (this also means that the Access-Request packets will not be
cached).
Another option added to 'radius_agent' is 'client_da_addresses', which lists the
RADIUS clients supporting Dynamic Authorization. The key represents the host of
the client, while the value represents the address to which we will send the
Disconnect Request.
Added integration test.
Rating map is now accessible from Accounting.
ExtraCharges struct is accessible from Accounting.
RatingUnit fields that did not represent the id of another event cost struct
are now retrievable.
Add ees_success_ids and ees_failed_ids fields in reader config. The
former will be used to set EeIDs when the event processing returns
no error, while the latter will be used otherwise.
Add config sanity checks for the added options.
Remove Processed opts and everything related to them since they should
not be used anymore.
Fixed test compilation errors caused by the change.
HierarchyPath parser now returns nil when
the path is empty (instead of a string slice with one
EmptyString element).
If the prefix is set to true, when calling the AsString
method on a nil HierarchyPath, only the separator will
be returned. This avoids a nil expr error coming from
the xmlquery library.
Use the Query and QueryAll functions from the xmlquery
package to be able to handle the errors ourselves and
avoid panics.
Remove config default value for xml_root_path. The field
will remain commented in config_defaults for reference.
Add tests for HierarchyPath.AsString function.
Add comments for XmlProvider and xml_root_path opt.
Added in-depth comments to the constructor.
Added test cases for most edge cases (if not all).
Updated the test to verify not only if an error occurs, but to also
check whether it matches the one we expect.
Added 3 more sanity checks that were missed.
Updated ees/ers implementation to use the jetstream package which
separates the jetstream context from Core NATS.
Removed the jsOpts fields from the NatsEE struct. We are now using the
jetStreamMaxWait option directly through a timeout context.
Added streamName option for NATS reader since it is now required to be
specified when creating a consumer (it is not inferred based on subject
anymore).
Updated nats ers integration test.
Removed deprecated birpc unit test.
Updated tests to also use the new jetstream package.
Updated tests to start the nats-server using their official driver
instead of using the std go exec package. time.Sleeps are now not
required anymore to wait for the server.
In test configurations for nats readers, made sure that natsStreamName
option is populated. It is now required for consumers to know where to
subscribe.
Fixed potential panic that happened when jetstreamMaxWait option would
not be set.