BAL_VOICE_120S,*topup_reset,,,,*voice,*out,,DST_1003,SPECIAL_1003,,*unlimited,,120s,20,false,false,10
RatingProfiles.csv
*out,
cgrates.org,call,
SPECIAL_1003,2014-01-14T00:00:00Z,RP_SPECIAL_1003,,
RatingPlans.csv
RP_SPECIAL_1003,DR_SPECIAL_1003,*any,10
DestinationRates.csv
DR_SPECIAL_1003,DST_1003,RT_1CNT_PER_SEC,*up,4,0,
Now Account 1008 is showing voice balance of 120s tied to destination 1003.
When I try to get the cost of call for this account to destination 1003. For some reason its taking default rating plan RP_RETAIL1 to calculate the cost and not considering the balance added.
Account Balance:
cgr-console 'accounts Tenant="
cgrates.org" AccountIds=["1008"]'
[
{
"ID": "
cgrates.org:1008",
"BalanceMap": {
"*voice": [
{
"Uuid": "261736ca-40a4-4441-85da-0411ae2b5d74",
"ID": "",
"Value": 120000000000,
"Directions": {
"*out": true
},
"ExpirationDate": "0001-01-01T00:00:00Z",
"Weight": 20,
"DestinationIDs": {
"DST_1003": true
},
"RatingSubject": "SPECIAL_1003",
"Categories": {},
"SharedGroups": {},
"Timings": [],
"TimingIDs": {},
"Disabled": false,
"Factor": {},
"Blocker": false
}
]
},
"UnitCounters": {},
"ActionTriggers": [],
"AllowNegative": false,
"Disabled": false
}
]
Call Cost:
cgr-console 'cost Category="call" Tenant="
cgrates.org" Destination="1003" AnswerTime="2014-08-04T13:00:00Z" Usage="20s" Account="1008"'
( also tried with subject like below)
cgr-console 'cost Category="call" Tenant="
cgrates.org" Destination="1003" AnswerTime="2014-08-04T13:00:00Z" Usage="20s" Subject="1008"'
{
"CGRID": "",
"RunID": "",
"StartTime": "2014-08-04T13:00:00Z",
"Usage": 30000000000,
"Cost": 0.2,
"Charges": [
{
"RatingID": "085f3a9",
"Increments": [
{
"Usage": 30000000000,
"Cost": 0.2,
"AccountingID": "",
"CompressFactor": 1
}
],
"CompressFactor": 1
}
],
"AccountSummary": null,
"Rating": {
"085f3a9": {
"ConnectFee": 0.8,
"RoundingMethod": "*up",
"RoundingDecimals": 4,
"MaxCost": 0,
"MaxCostStrategy": "",
"TimingID": "f37c592",
"RatesID": "124bb24",
"RatingFiltersID": "a95c67d"
}
},
"Accounting": {},
"RatingFilters": {
"a95c67d": {
"DestinationID": "DST_FS",
"DestinationPrefix": "10",
"RatingPlanID": "RP_RETAIL1",
"Subject": "*out:cgrates.org:call:*any"
}
},
"Rates": {
"124bb24": [
{
"GroupIntervalStart": 0,
"Value": 0.4,
"RateIncrement": 30000000000,
"RateUnit": 60000000000
},
{
"GroupIntervalStart": 60000000000,
"Value": 0.2,
"RateIncrement": 10000000000,
"RateUnit": 60000000000
}
]
},
"Timings": {
"f37c592": {
"Years": [],
"Months": [],
"MonthDays": [],
"WeekDays": [
1,
2,
3,
4,
5
],
"StartTime": "08:00:00"
}
}
}
Thanks,
Venkatesh Ennala.