Hi Pablo,
Please see inline ...
On Wed, 2019-09-25 at 09:37 -0700, Pablo wrote:
> Hi all!
>
> I'm trying to build the CGRateS's rating configuration with a 'Origin
> - Destination' rating policy. In my Destinations.csv, each prefix
> could have several IDs: one for the country and the rest of IDs for
> the zones the country belongs to.
I hope your logic is right, we treat each prefix individually, ie we
don't have the concept of country vs in-country prefixes. We always
match longest prefix we find configured for your rating plan (attached
to your rating subject). There it can be only one prefix per request.
>
> I've several doubts with this configuration:
>
> Q1. Where can I specify the origin prefix? Should I use the Subject
> field for that?
Yes, you can specify it as rating subject and enable it here:
https://github.com/cgrates/cgrates/blob/master/config/config_defaults.go#L170
The only difference it will make is that we will do multiple queries
(instead of just one) when trying to match your subject in
RatingProfiles
> Q2. If I've to specify the origin prefix in the Subject field, I
> prefer to use the zone better than the prefix (I prefer to manage
> zones instead of country prefixes because the RatingProfile
> configuration will be more simple and less redundant).
Again, we don't have the concept of zones. You will put the caller
identification /CLI in Subject field of your request and we match it
via prefixes within RatingProfiles, that is more or less all. It does
not interact with Destinations or any other part.
> So, for that, I've to use Attributes, right? To transform the
> Subject, from the prefix country to the Destination ID of the zone
> the country belongs to. How can I achieve this if a prefix could have
> several IDs? Could this configuration affects the performance of
> CGRateS?
You can use AttributeS to change the rating prefix, that is correct.
About how to organize them, the simplest way possible ;). AttributeS
does just an aliasing and it does not consider zones, so you will have
to duplicate your data in multiple Attribute profiles I guess.
Regarding performance, I don't see it that of an issue (we have tested
with about 30 mil. attribute profiles and we were having response in
real-time). The only headache is to manage data since that might be
slower.
Hope it helps.
DanB
>
> I'll be grateful if you could give me some recommendations to
> configure this scenario.
>
> Thanks!
> Pablo
>
> --
> 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 on the web visit
>
https://groups.google.com/d/msgid/cgrates/f6b9943a-a4d2-45f4-b561-7ac115198803%40googlegroups.com
> .