Commit Graph

13018 Commits

Author SHA1 Message Date
ionutboangiu
1f7e0b33a2 Update *alter_sessions action
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.
2024-02-27 16:28:48 +01:00
DanB
675d9e25ce Updating Radius CoA integration test to make use of the *alter_sessions action 2024-02-21 20:33:06 +01:00
ionutboangiu
c67ec00baa Implement *alter_sessions action 2024-02-21 18:43:53 +01:00
ionutboangiu
838832c2b2 Rename agents API object: SessionSv1 to AgentV1 2024-02-21 18:43:53 +01:00
ionutboangiu
f9d1c0f0e1 Refactor ReAuthorize to AlterSessions 2024-02-21 18:43:53 +01:00
DanB
ec9b95088f Updating radius_coa integration test to use thresholds for generating SessionSv1.ReAuthorize 2024-02-20 20:40:10 +01:00
Bas Couwenberg
ecdda5d2d2 Update deb_packages playbook to support multiple distributions. 2024-02-20 16:52:59 +01:00
Bas Couwenberg
325b37f54c Fix bash-term-in-posix-shell Lintian issue. 2024-02-20 16:52:59 +01:00
Bas Couwenberg
72e11d9c78 Fix script-not-executable Lintian issue. 2024-02-20 16:52:59 +01:00
Bas Couwenberg
1ccc9f4381 Fix executable-not-elf-or-script Lintian issues. 2024-02-20 16:52:59 +01:00
Bas Couwenberg
456c1c0582 Fix systemd-service-file-missing-documentation-key Lintian issue. 2024-02-20 16:52:59 +01:00
Bas Couwenberg
831c5b8fab Fix maintainer-script-lacks-home-in-adduser Lintian issue. 2024-02-20 16:52:59 +01:00
Bas Couwenberg
3ec26e9320 Modernize Debian packaging. 2024-02-20 16:52:59 +01:00
Bas Couwenberg
0785141218 Pass commit date and hash to -ldflags separately. 2024-02-20 16:52:59 +01:00
DanB
556060817c Dynamic templates for Radius CoA out of APIOpts 2024-02-20 16:21:13 +01:00
ionutboangiu
e50d71808a Optimize TransferBalanceAPI and test *cdrlog functionality 2024-02-20 11:11:39 +01:00
ionutboangiu
52bb1c2970 Add support for *transfer_balance inside *cdrlog action 2024-02-20 11:11:39 +01:00
ionutboangiu
87da08f7fd Revise *transfer_balance action and its API
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.
2024-02-19 11:28:52 +01:00
ionutboangiu
0c32f1761c Implement APIerSv1.TransferBalance API 2024-02-19 11:28:52 +01:00
ionutboangiu
41976e5721 Update *cdrlog action to support *remove_expired actions
Will also be able to process more than one CDR per
action.
2024-02-19 11:28:52 +01:00
ionutboangiu
267e6109e1 Implement CDRsv1.ProcessEvents API 2024-02-19 11:28:52 +01:00
arberkatellari
8ab43944a2 Update readthedocs tutorial 2024-02-15 17:02:41 +01:00
arberkatellari
e730ef4eb2 Update integration tests 2024-02-15 17:02:41 +01:00
arberkatellari
bbaf75c995 Update readthedocs & add console export_cdrs 2024-02-15 17:02:41 +01:00
gezimbll
1ec7cbccf8 updated installation steps for opensips 2024-02-15 16:34:24 +01:00
ionutboangiu
8fe3a74998 Remove test content made redundant by go version update 2024-02-14 10:15:51 +01:00
ionutboangiu
d8ad760dbb Update both ReAuthorize API signatures
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).
2024-02-14 10:15:51 +01:00
ionutboangiu
61bcf48678 Bump go version 2024-02-14 10:15:51 +01:00
ionutboangiu
9494fc6e5e Implement PrepareMap methods for virtual EE 2024-02-09 17:39:18 +01:00
ionutboangiu
c5b197db6f Simplify event cloning (ees) 2024-02-09 17:36:24 +01:00
ionutboangiu
3637e4364e Clone export event only if processed by attributes 2024-02-09 15:57:25 +01:00
ionutboangiu
3ff7007421 Revise failing tests after CoA update 2024-02-09 15:57:25 +01:00
ionutboangiu
0dc1567a7a Ensure event is cloned before being sent to attributes
Also the exporter ID has been added in APIOpts under the *exporterID
key.
2024-02-09 15:57:25 +01:00
ionutboangiu
7129d349a1 Merge CoA into ReAuthorize logic
Also updated the integration test.
2024-02-08 13:14:14 +01:00
ionutboangiu
02c8ed11c1 Implement support for RADIUS CoA 2024-02-07 18:28:17 +01:00
ionutboangiu
9991b29cae Implement DisconnectSession API for RADIUS Agent
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.
2024-02-07 18:28:17 +01:00
ionutboangiu
d182d6f601 Revise behaviour of balance factor
Now it multiplies instead of dividing.
2024-02-06 10:06:30 +01:00
ionutboangiu
f01ae9fb37 Add compatibility support between *remove_balance and *cdrlog actions 2024-01-30 18:46:48 +01:00
ionutboangiu
8c0bee1a1a Add error constant for INSUFFICIENT_CREDIT_BALANCE_BLOCKER 2024-01-29 09:57:49 +01:00
ionutboangiu
c4899cc01b Update blocker tests and add test for balance factor 2024-01-29 09:57:49 +01:00
ionutboangiu
050af6032c Include DestinationIDs and Factor when cloning balances
This fixes an issue where, if data_db is of type *internal, the Factor value is lost
on GetAccount
2024-01-29 09:57:49 +01:00
gezimbll
823b1ac37a integration tests for *http type of filter and attributes 2024-01-26 12:11:46 +01:00
gezimbll
dfb8011a1a Fix encoding dataprovider as json body for *http filter 2024-01-26 12:11:46 +01:00
ionutboangiu
911cd1b607 Update SMCostRetries backoff increment unit to ms 2024-01-25 18:41:17 +01:00
ionutboangiu
5c96ecf27e Update balance factor to depend on category
Updated unit tests to reflect that also.
2024-01-25 18:41:17 +01:00
ionutboangiu
dca2c4b6a1 Revise unit tests following the blocker update 2024-01-23 14:12:33 +01:00
ionutboangiu
36bdc41e97 Add support for kafka ssl encryption
For both poster and reader.
Added integration test.
2024-01-23 14:12:33 +01:00
DanB
e0d15f1a9e Prevent balance Blocker to partially debit 2024-01-19 16:28:09 +01:00
ionutboangiu
2fab0b92c5 Update balance blocker test (incomplete) 2024-01-19 10:35:18 +01:00
gezimbll
6f6374abb9 added *http attribute type 2024-01-15 16:17:02 +01:00