Hi Simba,
As Gezim is on vacation, please check the answer below.
Setting the Category directly at creation depends on your switch and how you generate events, but you can alternatively use Attributes, as in this example:
#Tenant,ID,Contexts,FilterIDs,ActivationInterval,AttributeFilterIDs,Path,Type,Value,Blocker,Weight
cgrates.org,ATTR_USD_ACCOUNTS,*sessions;*cdrs,*prefix:~*req.Account:263,,,,,,false,10
cgrates.org,ATTR_USD_ACCOUNTS,,,,,*req.Category,*constant,call_usd,,
cgrates.org,ATTR_EUR_ACCOUNTS,*sessions;*cdrs,*prefix:~*req.Account:44,,,,,,false,10
cgrates.org,ATTR_EUR_ACCOUNTS,,,,,*req.Category,*constant,call_eur,,
So, based on the account, the Category gets altered by AttributeS from call to call_usd or call_eur.
You need to make sure that you have the AttributeS connections configured in the SessionS section of the config file, including the index fields in the AttributeS configuration.
For the docs, you can check this link:
https://cgrates.readthedocs.io/en/latest/index.htmlThe most relevant sections for your case are:
Attributes:
https://cgrates.readthedocs.io/en/latest/attributes.html#id2Rating Profiles:
https://cgrates.readthedocs.io/en/latest/rals.html#ratingprofileHope it helps.
Thanks,
Armir