Removing balance types - says OK, but still there

47 views
Skip to first unread message

Gavin Henry

unread,
Mar 20, 2019, 7:06:11 AM3/20/19
to CGRateS
Hi all,

I'm doing this and getting OK, but even after clearing cache and reloading I'm still seeing this balance. It's added as part of a ActionPlan. I guess I should set a new action plan instead using account_set ?


cgr> balance_remove BalanceUuid="4045fe6a-e336-418e-bbcb-d3e3df913768" Tenant="surevoip" Account="XXXX"
"OK"
cgr> accounts Tenant="surevoip" AccountIds=["XXXX"]
[
 {
  "ID": "surevoip:XXXX",
  "BalanceMap": {
<snip>
   "*voice": [
    {
     "Uuid": "4045fe6a-e336-418e-bbcb-d3e3df913768",
     "ID": "B_UK_MOBILE_UK_LANDLINE_5000",
     "Value": 299975000000000.06,
     "ExpirationDate": "0001-01-01T00:00:00Z",
     "Weight": 10,
     "DestinationIDs": {
      "DST_UK": true,
      "DST_UK_Mobile_Cloud9_074409_077000_078722": true,
      "DST_UK_Mobile_O2_GBRCN": true,
      "DST_UK_Mobile_Orange_GBROR": true,
      "DST_UK_Mobile_T_Mobile_GBRME": true,
      "DST_UK_Mobile_Three_GBRHU": true,
      "DST_UK_Mobile_Vodafone_GBRVF": true
     },
     "RatingSubject": "",
     "Categories": {
      "mo_call_UK_Mobile_O2_GBRCN": true,
      "mo_call_UK_Mobile_Orange_GBROR": true,
      "mo_call_UK_Mobile_T_Mobile_GBRME": true,
      "mo_call_UK_Mobile_Vodafone_GBRVF": true
     },
     "SharedGroups": {},
     "Timings": null,
     "TimingIDs": {},
     "Disabled": false,
     "Factor": null,
     "Blocker": false
    }
   ]
  },
  "UnitCounters": null,
  "ActionTriggers": null,
  "AllowNegative": false,
  "Disabled": false
 }
]

Gavin Henry

unread,
Mar 20, 2019, 7:28:57 AM3/20/19
to CGRateS
If I do the following, this works:

balance_remove Tenant="surevoip" Account="XXXX" BalanceType="*sms"
balance_remove Tenant="surevoip" Account="XXXX" BalanceType="*voice"

but how do I remove the actionplans that the account is set for?

Gavin Henry

unread,
Mar 20, 2019, 7:31:02 AM3/20/19
to CGRateS
Ah, you need the BalanceType (it should complain IMHO :-) ):

balance_remove Tenant="surevoip" Account="XXXX" BalanceType="*data" BalanceUuid="62651e3d-3d09-4d6a-a1c9-74b85eeff4d5"

Alexandru Tripon

unread,
Mar 20, 2019, 7:37:34 AM3/20/19
to cgr...@googlegroups.com
Hi Gavin,

Yes you need the BalanceType .
Please open an issue on github so we can add a warning if it is not present.

Thanks,
Trial97


On Wed, Mar 20, 2019 at 1:31 PM Gavin Henry <gavin...@gmail.com> wrote:
Ah, you need the BalanceType (it should complain IMHO :-) ):

balance_remove Tenant="surevoip" Account="XXXX" BalanceType="*data" BalanceUuid="62651e3d-3d09-4d6a-a1c9-74b85eeff4d5"

--
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/e41c5fd5-a26a-4e2b-afb5-d8eb65b4a1a5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Gavin Henry

unread,
Mar 20, 2019, 7:40:49 AM3/20/19
to CGRateS
Thanks. Done:


How do I remove an AP from an account?

Alexandru Tripon

unread,
Mar 20, 2019, 7:57:08 AM3/20/19
to cgr...@googlegroups.com
Hi Gavin,

You can remove the action plan from an account with:
Or you can overwrite them using:
With the ActionPlansOverwrite on true.

Thanks,
Trial97


Gavin Henry

unread,
Mar 20, 2019, 8:40:16 AM3/20/19
to CGRateS
Thanks. I'm using cgr-console at the moment. What options do I have there?

Alexandru Tripon

unread,
Mar 20, 2019, 9:18:09 AM3/20/19
to cgr...@googlegroups.com
Hi Gavin,

For the moment in cgr-console the only available command to modify the action plans for a given account is account_set.
Here is an example how to remove all action plans from account 1001"
account_set Tenant="cgrates.org" Account="1001" ActionPlanIDs=[] ActionPlansOverwrite=true

Thanks,
Trial97


On Wed, Mar 20, 2019 at 2:40 PM Gavin Henry <gavin...@gmail.com> wrote:
Thanks. I'm using cgr-console at the moment. What options do I have there?

--
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.

Gavin Henry

unread,
Mar 20, 2019, 10:03:18 AM3/20/19
to CGRateS
Brilliant!!!
Reply all
Reply to author
Forward
0 new messages