Commit Graph

1843 Commits

Author SHA1 Message Date
gezimbll
a3e3cde958 added janusconn methods for loading from json 2024-04-09 20:22:31 +02:00
DanB
9b87b32abf Adding JanusConn to config 2024-04-09 14:59:00 +02:00
gezimbll
c5c8ca5991 added methods for janusagent configuration 2024-04-09 13:43:43 +02:00
DanB
8db91ca479 Basic service infrastructure for JanusAgent 2024-04-08 20:09:06 +02:00
ionutboangiu
b924fc9e0c Add method on ERsCfg to retrieve reader by ID 2024-04-04 12:31:18 +03:00
ionutboangiu
ca66480c52 Add reply_timeout field for FS event socket conns 2024-03-22 15:12:04 +01:00
gezimbll
cff5d22913 fixing unit tests on ersCfg 2024-03-13 18:26:01 +01:00
gezimbll
66940db0b0 changed concurrentEvents naming in ers 2024-03-13 18:26:01 +01:00
gezimbll
21d65b3810 added concurrent event processing for ers 2024-03-13 18:26:01 +01:00
ionutboangiu
b457768a33 Update actions to share Time ref variable 2024-03-13 18:25:06 +01:00
ionutboangiu
bf939a47ac Rename chan_delimiter cfg field to active_session_delimiter 2024-03-11 16:59:31 +01:00
ionutboangiu
afe03ac5fd Revise xmldp sanity check test to account for previous update 2024-03-11 16:41:09 +01:00
ionutboangiu
51a3c933d7 Add chan_delimiter option within freeswitch_agent section
Used for 'show_channels' requests and responses.
2024-03-11 16:39:45 +01:00
ionutboangiu
28e53cecc9 Add requests_cache_key field to radagent cfg 2024-03-07 17:20:23 +01:00
ionutboangiu
c9b6c1fbb7 Add support for sending *dmr template via APIOpts 2024-03-07 17:20:23 +01:00
ionutboangiu
eaeb04404e Add sessions_conns to rals section
Update ActionConnCfg constructor to take into account this new field.
2024-03-07 17:20:23 +01:00
ionutboangiu
ca6a9440f7 Update client_da_addresses structure
Supports configuring transport (tcp/udp), host, port and
flags (only *log for now).
2024-03-06 16:15:36 +01:00
ionutboangiu
b580e09a00 Add sanity checks for radius templates 2024-03-04 19:17:31 +01:00
arberkatellari
9be32c36da Add CAPs counting to cgr-console status command 2024-03-04 09:50:10 +01:00
ionutboangiu
d0f64a7b54 Adjust prefixes to skip when sanity checking xmlRootPath
Before everything starting with '~' was considered, but the check
should be done only with paths starting with '~*req'.
2024-02-27 16:29:49 +01:00
ionutboangiu
6f86c06fd2 Add sessions_conns field to ThresholdSCfg 2024-02-27 16:28:48 +01:00
DanB
556060817c Dynamic templates for Radius CoA out of APIOpts 2024-02-20 16:21:13 +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
3ff7007421 Revise failing tests after CoA update 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
36bdc41e97 Add support for kafka ssl encryption
For both poster and reader.
Added integration test.
2024-01-23 14:12:33 +01:00
arberkatellari
d5d873b851 Add caching_delay flag to cgr-loader 2024-01-06 17:15:33 +01:00
ionutboangiu
17fbc2d51b Rename mongoScheme opt to mongoConnScheme 2023-12-12 10:10:26 +01:00
ionutboangiu
24cbe49d90 Add support for mongodb+srv conn format
Option can be found in db opts under the name 'mongoSchema'.
2023-12-11 17:15:40 +01:00
ionutboangiu
1154cad0df Rename max_recursion_depth cfg param to fallback_depth 2023-12-07 17:08:22 +01:00
ionutboangiu
ff53446e41 Make recursion_max_depth a configurable option
Also added an integration test checking the recursion depth functionality.
2023-12-07 17:08:22 +01:00
ionutboangiu
0c91933065 Revise ERs event exporting
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.
2023-11-29 16:21:51 +01:00
ionutboangiu
f4e11d8a5a Add ees_conns field option for ERs section 2023-11-29 16:21:51 +01:00
arberkatellari
054c584775 Create APIerSV1GetAccountCost 2023-11-09 09:37:34 +01:00
arberkatellari
8781b968ac Remove unnecessary LazySanityCheck 2023-11-09 09:37:34 +01:00
Varun Dhand
5e513d130d fix: typo in rjreader.go 2023-11-09 09:37:34 +01:00
ionutboangiu
c282d40201 Implement reconnect logic for AMQP EventReader
Implemented functionality that handles reconnecting to the amqp server
and reinitializing the amqp channel in case of errors and timeouts. This
is handled by a goroutine created in the client constructor (it also
handles the initial connect/init).

Reconnects and reinits will use a fibonacci backoff strategy, and the
attempt amount and max waiting interval can be adjusted by the
'reconnects' and 'max_reconnect_interval' config options.

Messages that fail processing are now dropped instead of being requeued,
preventing infinite processing loops. However, this means that the
messages are lost. Handling failed messages will need to be addressed
separately.

'concurrent_requests' will now set the prefetch count. Setting the
prefetch count using the Qos function was able to replace our old
approach that was using channels. Default value is 1024 which,
according to the rabbitmq docs, 'runs into the law of diminishing
returns'. The recommended value is between 100-300. Source:
https://www.rabbitmq.com/confirms.html#channel-qos-prefetch-throughput

Fix test compilation errors and failing tests caused by these changes.

References #4160
2023-11-08 18:31:07 +01:00
ionutboangiu
f696164177 Add reconnects and max_reconnect_interval config options for ers
They are separate for each configured reader.

Additional changes:
 - rearrange config_defaults fields for ers/ees;
 - add comment for RunDelay config option inside struct definition;
 - improve comments for amqp opts in config_defaults.
2023-11-08 18:31:07 +01:00
gezimbll
09e5088262 Removed warnings from go staticcheck 2023-11-08 17:10:13 +01:00
gezimbll
c2dacc42c1 Removed warnings from go staticcheck 2023-11-08 17:10:13 +01:00
gezimbll
9e2a629b82 Add *log flag for logging ees events 2023-11-08 16:52:38 +01:00
Varun Dhand
c4fefedefa fix: typo in rjreader.go 2023-11-02 19:40:53 +01:00
Varun Dhand
6baffaa67c fix: typo in rjreader.go 2023-11-02 19:40:53 +01:00
gezimbll
5a85c119c8 Replacing IsSliceMember ,CloneStringSlice and SliceStringEqual with slices package equivalent functions 2023-11-01 21:52:50 +01:00
gezimbll
16a9c7033f Remove unreachable err cases from HandleJSONErr
json.UnmarshalError happens only when we pass a non-nil pointer, which
is not the case for us. Usage of go vet helps us make sure it also
won't be happening in the future.
2023-10-26 15:52:06 +02:00
arberkatellari
5872b810ec Change default storedb password 2023-10-25 10:16:07 +02:00
ionutboangiu
7cc5dfb26d Update test for XmlProvider String() func 2023-10-17 17:40:43 +02:00
ionutboangiu
63e06dd86a Update XmlProvider String() func
The comment specifies that it should display the already parsed values
out of cache.
2023-10-17 17:40:43 +02:00