Fix attributes filter matching - use named filters

- Changed context from *sessions to *any for all attribute profiles
- Created explicit filter definitions in Filters.csv
- Changed from inline filters to named filters (FLTR_ACCOUNT_*)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-23 20:42:19 +05:00
parent ce3ae559a2
commit ae41322355
2 changed files with 8 additions and 4 deletions

View File

@@ -2,12 +2,12 @@
# PPPoE user credentials and RADIUS reply attributes
# User: test - Test user for MikroTik PPPoE
cgrates.org,ATTR_PPPOE_TEST,*sessions,*string:~*req.Account:test,,,,,,false,20
cgrates.org,ATTR_PPPOE_TEST,*any,FLTR_ACCOUNT_TEST,,,,,,false,20
cgrates.org,ATTR_PPPOE_TEST,,,,,*req.Password,*constant,test,,
cgrates.org,ATTR_PPPOE_TEST,,,,,*req.RequestType,*constant,*prepaid,,
cgrates.org,ATTR_PPPOE_TEST,,,,,*req.MikrotikRateLimit,*constant,10M/10M,,
# User: pppoe_user1 - 10Mbps plan with static IP
cgrates.org,ATTR_PPPOE_USER1,*sessions,*string:~*req.Account:pppoe_user1,,,,,,false,20
cgrates.org,ATTR_PPPOE_USER1,*any,FLTR_ACCOUNT_USER1,,,,,,false,20
cgrates.org,ATTR_PPPOE_USER1,,,,,*req.Password,*constant,SecurePass123,,
cgrates.org,ATTR_PPPOE_USER1,,,,,*req.RequestType,*constant,*prepaid,,
cgrates.org,ATTR_PPPOE_USER1,,,,,*req.FramedIPAddress,*constant,10.0.0.101,,
@@ -15,7 +15,7 @@ cgrates.org,ATTR_PPPOE_USER1,,,,,*req.FramedIPNetmask,*constant,255.255.255.0,,
cgrates.org,ATTR_PPPOE_USER1,,,,,*req.MikrotikRateLimit,*constant,10M/10M,,
# User: pppoe_user2 - 20Mbps plan with static IP
cgrates.org,ATTR_PPPOE_USER2,*sessions,*string:~*req.Account:pppoe_user2,,,,,,false,20
cgrates.org,ATTR_PPPOE_USER2,*any,FLTR_ACCOUNT_USER2,,,,,,false,20
cgrates.org,ATTR_PPPOE_USER2,,,,,*req.Password,*constant,SecurePass456,,
cgrates.org,ATTR_PPPOE_USER2,,,,,*req.RequestType,*constant,*prepaid,,
cgrates.org,ATTR_PPPOE_USER2,,,,,*req.FramedIPAddress,*constant,10.0.0.102,,
@@ -23,7 +23,7 @@ cgrates.org,ATTR_PPPOE_USER2,,,,,*req.FramedIPNetmask,*constant,255.255.255.0,,
cgrates.org,ATTR_PPPOE_USER2,,,,,*req.MikrotikRateLimit,*constant,20M/20M,,
# User: pppoe_user3 - 50Mbps plan with dynamic IP
cgrates.org,ATTR_PPPOE_USER3,*sessions,*string:~*req.Account:pppoe_user3,,,,,,false,20
cgrates.org,ATTR_PPPOE_USER3,*any,FLTR_ACCOUNT_USER3,,,,,,false,20
cgrates.org,ATTR_PPPOE_USER3,,,,,*req.Password,*constant,SecurePass789,,
cgrates.org,ATTR_PPPOE_USER3,,,,,*req.RequestType,*constant,*prepaid,,
cgrates.org,ATTR_PPPOE_USER3,,,,,*req.MikrotikRateLimit,*constant,50M/50M,,
1 #Tenant,ID,Contexts,FilterIDs,ActivationInterval,AttributeFilterIDs,Path,Type,Value,Blocker,Weight
2 # PPPoE user credentials and RADIUS reply attributes
3 # User: test - Test user for MikroTik PPPoE
4 cgrates.org,ATTR_PPPOE_TEST,*sessions,*string:~*req.Account:test,,,,,,false,20 cgrates.org,ATTR_PPPOE_TEST,*any,FLTR_ACCOUNT_TEST,,,,,,false,20
5 cgrates.org,ATTR_PPPOE_TEST,,,,,*req.Password,*constant,test,,
6 cgrates.org,ATTR_PPPOE_TEST,,,,,*req.RequestType,*constant,*prepaid,,
7 cgrates.org,ATTR_PPPOE_TEST,,,,,*req.MikrotikRateLimit,*constant,10M/10M,,
8 # User: pppoe_user1 - 10Mbps plan with static IP
9 cgrates.org,ATTR_PPPOE_USER1,*sessions,*string:~*req.Account:pppoe_user1,,,,,,false,20 cgrates.org,ATTR_PPPOE_USER1,*any,FLTR_ACCOUNT_USER1,,,,,,false,20
10 cgrates.org,ATTR_PPPOE_USER1,,,,,*req.Password,*constant,SecurePass123,,
11 cgrates.org,ATTR_PPPOE_USER1,,,,,*req.RequestType,*constant,*prepaid,,
12 cgrates.org,ATTR_PPPOE_USER1,,,,,*req.FramedIPAddress,*constant,10.0.0.101,,
13 cgrates.org,ATTR_PPPOE_USER1,,,,,*req.FramedIPNetmask,*constant,255.255.255.0,,
15 # User: pppoe_user2 - 20Mbps plan with static IP
16 cgrates.org,ATTR_PPPOE_USER2,*sessions,*string:~*req.Account:pppoe_user2,,,,,,false,20 cgrates.org,ATTR_PPPOE_USER2,*any,FLTR_ACCOUNT_USER2,,,,,,false,20
17 cgrates.org,ATTR_PPPOE_USER2,,,,,*req.Password,*constant,SecurePass456,,
18 cgrates.org,ATTR_PPPOE_USER2,,,,,*req.RequestType,*constant,*prepaid,,
19 cgrates.org,ATTR_PPPOE_USER2,,,,,*req.FramedIPAddress,*constant,10.0.0.102,,
20 cgrates.org,ATTR_PPPOE_USER2,,,,,*req.FramedIPNetmask,*constant,255.255.255.0,,
21 cgrates.org,ATTR_PPPOE_USER2,,,,,*req.MikrotikRateLimit,*constant,20M/20M,,
23 cgrates.org,ATTR_PPPOE_USER3,*sessions,*string:~*req.Account:pppoe_user3,,,,,,false,20 cgrates.org,ATTR_PPPOE_USER3,*any,FLTR_ACCOUNT_USER3,,,,,,false,20
24 cgrates.org,ATTR_PPPOE_USER3,,,,,*req.Password,*constant,SecurePass789,,
25 cgrates.org,ATTR_PPPOE_USER3,,,,,*req.RequestType,*constant,*prepaid,,
26 cgrates.org,ATTR_PPPOE_USER3,,,,,*req.MikrotikRateLimit,*constant,50M/50M,,
27
28
29

View File

@@ -1 +1,5 @@
#Tenant,ID,Type,Path,Values,ActivationInterval
cgrates.org,FLTR_ACCOUNT_TEST,*string,~*req.Account,test,
cgrates.org,FLTR_ACCOUNT_USER1,*string,~*req.Account,pppoe_user1,
cgrates.org,FLTR_ACCOUNT_USER2,*string,~*req.Account,pppoe_user2,
cgrates.org,FLTR_ACCOUNT_USER3,*string,~*req.Account,pppoe_user3,
1 #Tenant ID Type Path Values ActivationInterval
2 cgrates.org FLTR_ACCOUNT_TEST *string ~*req.Account test
3 cgrates.org FLTR_ACCOUNT_USER1 *string ~*req.Account pppoe_user1
4 cgrates.org FLTR_ACCOUNT_USER2 *string ~*req.Account pppoe_user2
5 cgrates.org FLTR_ACCOUNT_USER3 *string ~*req.Account pppoe_user3