shared balances for multiple phone numers

151 views
Skip to first unread message

Александр Чудов

unread,
Feb 14, 2018, 11:13:31 AM2/14/18
to CGRateS
Hello community!

I need help in next question.
Our company want next functional:

many phone numbers (lines/msisdns) should use ONE monetary balance and ONE example of not monetary balance (voice/sms/data).

Is it possible to use CGRateS standard functional for this task? If yes which, and how?

I searched in DOCs and here in group and found next:
1) There is some "shared groups" in docs http://cgrates.readthedocs.io/en/latest/tariff_plans.html#shared-groups 
but description in doc isn't full. What this "shared groups" means? Can I use it for my task?
And yes, I saw this part in tutorial http://cgrates.readthedocs.io/en/latest/tut_cgrates_usage.html#id6
Seams good, but it isn't clear how to set up  "shared groups".
2) in some topics here in group I found mention about "shared balances"
Is this the same as "shared groups"? If not, what the difference between these to notions?

I will be appreciate for any help!

Aleksandr. 

DanB

unread,
Feb 14, 2018, 11:28:28 AM2/14/18
to cgr...@googlegroups.com
Hi Aleksandr,

In your case I would use Account in the events pointing the common
account. Subject can stay as msisdn.

Shared balances (same as shared groups), are simple tags which you add
to your balances, making them part of a shared group.

By using a single account (not shared balances) you get centralized
balance management as well as faster queries.

DanB
> --
> 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 post to this group, send email to cgr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/cgrates/538448a0-9f84-4e84-8904-ce27c0e1b230%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.

Александр Чудов

unread,
Feb 15, 2018, 5:09:09 AM2/15/18
to CGRateS
Thank you DanB for your advice.

Ok, "single account" is my solution.

For standard msisdns we use next keys in redis cgrates:
user = usr_tenant:34111111111
account = acc_tenant:34111111111
+ "derived charges" and "rating profile" keys.
(all keys contains MSISDN as account and subject!)

Am I right understand, that for "single account" solution, I need create:
1) account =  acc_tenant:single_account_name (use some name for account instead of MSISDN)
2) user = usr_tenant:34111111111, but inside user should be:
tenant = tenant
account = single_account_name
subject = 34111111111
requestType = xxxxx
cli = 34111111111
?

And what additionally I should create to get "single account" solution?

Best regards, Aleksandr.

среда, 14 февраля 2018 г., 18:28:28 UTC+2 пользователь DanB написал:

DanB

unread,
Feb 15, 2018, 8:12:50 AM2/15/18
to cgr...@googlegroups.com
Hi Aleksandr,

Answers inline ...

On Thu, 2018-02-15 at 02:09 -0800, Александр Чудов wrote:
> Thank you DanB for your advice.
>
> Ok, "single account" is my solution.
>
> For standard msisdns we use next keys in redis cgrates:
> user = usr_tenant:34111111111
> account = acc_tenant:34111111111
> + "derived charges" and "rating profile" keys.
> (all keys contains MSISDN as account and subject!)
>
> Am I right understand, that for "single account" solution, I need
> create:
> 1) account = acc_tenant:single_account_name (use some name for
> account instead of MSISDN)
> 2) user = usr_tenant:34111111111, but inside user should be:
> tenant = tenant
> account = single_account_name
> subject = 34111111111
> requestType = xxxxx
> cli = 34111111111
Yes, this should do, although I would recommend you to start using
AttributeS instead of UserS since it is more flexible and we will
discontinue support for users.
> ?
>
> And what additionally I should create to get "single account"
> solution?
It depends on whether it will work for you but no, I think this should
be all.


DanB
>
> Best regards, Aleksandr.
>
> среда, 14 февраля 2018 г., 18:28:28 UTC+2 пользователь DanB написал:
> > Hi Aleksandr,
> >
> > In your case I would use Account in the events pointing the common
> > account. Subject can stay as msisdn.
> >
> > Shared balances (same as shared groups), are simple tags which you
> > add
> > to your balances, making them part of a shared group.
> >
> > By using a single account (not shared balances) you get
> > centralized
> > balance management as well as faster queries.
> >
> > DanB
>
> --
> 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 post to this group, send email to cgr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/cgrates/6d2cbdf6-b924-4bab-aa60-eeca87b7894b%40googlegroups.com

Александр Чудов

unread,
Feb 15, 2018, 8:48:43 AM2/15/18
to CGRateS
Thanks, DanB!

But what do you mean "start using AttributeS instead of UserS"?
What attributes should we use? And start from what version of CGRateS?

Aleksandr.

четверг, 15 февраля 2018 г., 15:12:50 UTC+2 пользователь DanB написал:

DanB

unread,
Feb 15, 2018, 9:58:21 AM2/15/18
to cgr...@googlegroups.com
Aleksandr,

I am talking about AttributeS which is available in master.
Configured here:
https://github.com/cgrates/cgrates/blob/master/data/tariffplans/tutoria
l/Attributes.csv

DanB
> msgid/cgrates/1ce6e3c1-3c67-45a6-b2a0-bdc576c18aa4%40googlegroups.com

Александр Чудов

unread,
Feb 15, 2018, 10:07:29 AM2/15/18
to CGRateS
Ok. Thanks, DanB.

четверг, 15 февраля 2018 г., 16:58:21 UTC+2 пользователь DanB написал:
Reply all
Reply to author
Forward
0 new messages