Using FreeSWITCH Event / Channel Vars in AttributeS and FilterS

71 views
Skip to first unread message

Gavin Henry

unread,
Jun 28, 2021, 7:51:13 AM6/28/21
to CGRateS

Hi all,

Can you confirm if these are the only variables we can access via FilterS to be used AttributeS:


I'm looking to change the Category of a rating based on the Caller ID of a call, like we do with Roaming. Similar to this I think?


Thanks,
Gavin.

Ionut Boangiu

unread,
Jul 2, 2021, 6:45:51 AM7/2/21
to CGRateS
Hi Gavin,

If you wish to add any specific variables to the event, edit your config by adding these to the "extra_fields" slice (https://github.com/cgrates/cgrates/blob/master/config/config_defaults.go#L629). One example can be found here: https://github.com/cgrates/cgrates/blob/v0.10/agents/fsevent_test.go#L606-L626. Once added, you can then modify them to your liking using AttributeS like so:

Attributes.csv
 #Tenant,ID,Contexts,FilterIDs,ActivationInterval,AttributeFilterIDs,Path,Type,Value,Blocker,Weight
cgrates.org,ATTR_EXAMPLE,*any,*string:~*req.Caller-Caller-ID-Name:1001,,,*req.Category,*constant,DesiredValue,, 

Thanks,
Ionuț

Gavin Henry

unread,
Jul 9, 2021, 2:38:24 PM7/9/21
to CGRateS
Thanks. Perfect. I forgot about the extra_fields!
Reply all
Reply to author
Forward
0 new messages