lookup and populate cdrs

68 views
Skip to first unread message

mfaisa...@gmail.com

unread,
Jun 20, 2022, 9:38:03 PM6/20/22
to CGRateS
Hi Team,
Could you please help me with example.
I want to populate fields in CDR table with Cell_Name and Location by looking up Cell_id  value = ~*req.5
{"tag": "Cell_Id", "path": "*cgreq.Cell_Id", "type": "*variable", "value": "~*req.5", "mandatory": true},

I assume its possible by adding values in attribute_profile and using filters, but unable to find any example to achieve the goal.
Could you please give me example by mentioning in below tag.

{"tag": "Cell_Name", "path": "*....................", "type": "*variable", "value": "~*............", "mandatory": true},

Also please let me know if I can use any other table other than attibute_profile to compare the values and populate cdr table.

Regards,
Faisal

mfaisa...@gmail.com

unread,
Jun 25, 2022, 1:50:14 AM6/25/22
to CGRateS
Hi Gavin,
Could you please respond on below query.

Regards,
Faisal

Adrian Porosnicu

unread,
Jun 27, 2022, 11:07:06 AM6/27/22
to CGRateS

Hello! 

 We use attributeS in order to modify/add values to our fields in our request. Bellow i'll attach an attribute_profile, in csv format, that will change the value of Cell_ID with, for example, "ID1" only if the Account of the request is 1001(this is how we use filters). 

 ```` 
#Tenant,ID,Context,FilterIDs,ActivationInterval,AttributeFilterIDs,Path,Type,Value,Blocker,Weight 
cgrates.org,ATTR_ACNT_1001,*any,*string:~*req.Account:1001,,,*req.Cell_ID,*constant,ID1,false,10 
```` 

 You can populate CDRs through EEs subsystem that can export the CDR containing the fields that you want. So in order to complete your CDRs table you could add a field in configuration having this format:
 {"tag": "Cell_Name", "path": "*exp.Cell_Name", "type": "*variable", "value": "~*req.Cell_Name", "mandatory": true}, 

 Thanks, 
Adrian

mfaisa...@gmail.com

unread,
Jun 29, 2022, 3:52:50 AM6/29/22
to CGRateS
Thanks you very much Adrian.
Reply all
Reply to author
Forward
0 new messages