Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Analytics

89 views
Skip to first unread message

Amor klich

unread,
Mar 6, 2025, 4:12:13 PMMar 6
to CGRateS
Hello 

I'am looking for the best way to get some analytics for an account from date to date like for exp :
Total call cost by destinations
Total call duration by destinations
Total calls by destinations

Are we supposed to do this with sql requests from cdr table or with Stats or some API calls
is there any examples

Thank you

Armir Veliaj

unread,
Mar 7, 2025, 9:47:15 AMMar 7
to CGRateS
Hi Amor,

We recommend using Stats. You can find possible metrics here: https://cgrates.readthedocs.io/en/latest/stats.html.  
For your use case, you want to look at *tcd, *tcc. You can group metrics by destination using filters. For reference, you can check this CSV example for Stats: https://github.com/cgrates/cgrates/blob/master/data/tariffplans/tutorial2/Stats.csv

Thanks,
Armir

Amor klich

unread,
Mar 10, 2025, 9:17:45 AMMar 10
to cgr...@googlegroups.com

Hello Armir

Thank you i got it working with some filters but i couldn't find a way to filter from date to date 


--
You received this message because you are subscribed to the Google Groups "CGRateS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cgrates+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/cgrates/608769d9-363f-463a-a33f-06019eeddb4en%40googlegroups.com.

Armir Veliaj

unread,
Mar 11, 2025, 1:00:04 PMMar 11
to CGRateS
Hi Amor,

For filtering Stats from date to date on an interval, you can get use of ActivationInterval filter type by defining a StatS Profile as in this example : "stats_profile_set  Tenant="cgrates.org" ID="Stats2" FilterIDs=["*ai:~*req.CustomTime:2023-06-01T00:00:00Z|2023-09-01T00:00:00Z"] Metrics=[{"MetricID":"*tcc"}]"
which you can try in cgr-console  or also by APIerSv1.SetStatQueueProfile API .

Thanks,
Armir

Amor klich

unread,
Mar 11, 2025, 5:11:52 PMMar 11
to CGRateS
Hello Armir

Thank you i will give it a try .
Reply all
Reply to author
Forward
0 new messages