Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

<Rater> Going negative on account

127 views
Skip to first unread message

Amor klich

unread,
Mar 11, 2025, 5:11:07 PMMar 11
to CGRateS
hello

i am having an issue i don't know if it's an miss configuration or a normal behavior .
i have an account with 10 balance i make a test with 2 simultaneous calls and i get debited twice first debit debit in my configured balance "REFILL" and the second call goes to a new balance *default in negative which i didn't create!  here is some logs  :

Screenshot from 2025-03-11 22-06-57.png


Screenshot from 2025-03-11 22-08-28.png

1st call :

Setup Time: 2025-03-11T21:59:57+01:00

Answer Time: 2025-03-11T22:00:11+01:00

Tenant: DIGIVOIP

Account: OPTIMIS

Category: call

Subject: FRANCE_STANDARD

Cost: 9.96

Usage: 12000000000

Destination: 33184140117

{
"CGRID": "4ff14d3dd6ac7e1146a21cdc62c7fde93dde1b52",
"RunID": "*default",
"OrderID": 4,
"OriginHost": "fs2.digivoip.fr",
"Source": "FS_CHANNEL_ANSWER",
"OriginID": "6d768e35-e9fe-4d3e-ab0f-adf2c4523316",
"ToR": "*voice",
"RequestType": "*prepaid",
"Tenant": "DIGIVOIP",
"Category": "call",
"Account": "OPTIMIS",
"Subject": "FRANCE_STANDARD",
"Destination": "33184140117",
"SetupTime": "2025-03-11T21:59:57+01:00",
"AnswerTime": "2025-03-11T22:00:11+01:00",
"Usage": 12000000000,
"ExtraFields": {
"ACD": "0",
"DisconnectCause": "",
"FsConnID": "1",
"PDD": "0",
"Route": "CALLR1"
},
"ExtraInfo": "",
"Partial": false,
"PreRated": false,
"CostSource": "*sessions",
"Cost": 9.96,
"CostDetails": {
"CGRID": "4ff14d3dd6ac7e1146a21cdc62c7fde93dde1b52",
"RunID": "*default",
"StartTime": "2025-03-11T22:00:11+01:00",
"Usage": 12000000000,
"Cost": 9.96,
"Charges": [
{
"RatingID": "d2f17ab",
"Increments": [
{
"Usage": 1000000000,
"Cost": 0.83,
"AccountingID": "9d8a11a",
"CompressFactor": 7
}
],
"CompressFactor": 1
},
{
"RatingID": "d2f17ab",
"Increments": [
{
"Usage": 1000000000,
"Cost": 0.83,
"AccountingID": "6930736",
"CompressFactor": 5
}
],
"CompressFactor": 1
}
],
"AccountSummary": {
"Tenant": "DIGIVOIP",
"ID": "OPTIMIS",
"BalanceSummaries": [
{
"UUID": "f043e722-ebce-43fe-a79f-c60d5961f029",
"ID": "REFILL",
"Type": "*monetary",
"Initial": 10,
"Value": 0.04,
"Weight": 10,
"Disabled": false
},
{
"UUID": "9cbb8650-397f-45b0-89fc-fc031ff30839",
"ID": "*default",
"Type": "*monetary",
"Initial": 0,
"Value": -4.1500001,
"Disabled": false
}
],
"AllowNegative": false,
"Disabled": false
},
"Rating": {
"d2f17ab": {
"ConnectFee": 0,
"RoundingMethod": "",
"RoundingDecimals": 6,
"MaxCost": 50,
"MaxCostStrategy": "*disconnect",
"TimingID": "0f94e66",
"RatesID": "8563782",
"RatingFiltersID": "91cd23f"
}
},
"Accounting": {
"6930736": {
"AccountID": "DIGIVOIP:OPTIMIS",
"BalanceUUID": "9cbb8650-397f-45b0-89fc-fc031ff30839",
"RatingID": "",
"Units": 0.83,
"ExtraChargeID": ""
},
"9d8a11a": {
"AccountID": "DIGIVOIP:OPTIMIS",
"BalanceUUID": "f043e722-ebce-43fe-a79f-c60d5961f029",
"RatingID": "",
"Units": 0.83,
"ExtraChargeID": ""
}
},
"RatingFilters": {
"91cd23f": {
"DestinationID": "France-Geographic",
"DestinationPrefix": "3318",
"RatingPlanID": "FRANCE_STANDARD",
"Subject": "*out:DIGIVOIP:call:FRANCE_STANDARD"
}
},
"Rates": {
"8563782": [
{
"GroupIntervalStart": 0,
"Value": 0.83,
"RateIncrement": 1000000000,
"RateUnit": 1000000000
}
]
},
"Timings": {
"0f94e66": {
"Years": [],
"Months": [],
"MonthDays": [],
"WeekDays": [],
"StartTime": "00:00:00"
}
}
}
}

Second Call :


Setup Time: 2025-03-11T22:00:02+01:00

Answer Time: 2025-03-11T22:00:13+01:00

Tenant: DIGIVOIP

Account: OPTIMIS

Category: call

Subject: FRANCE_STANDARD

Cost: 9.96

Usage: 12000000000

Destination: 33184140117


{
"CGRID": "ffcbe368e65ceb1a7e31a6fd585e826307b96fd2",
"RunID": "*default",
"OrderID": 5,
"OriginHost": "fs1.digivoip.fr",
"Source": "FS_CHANNEL_ANSWER",
"OriginID": "eb4ee549-5199-45e6-92be-34d6f77e2391",
"ToR": "*voice",
"RequestType": "*prepaid",
"Tenant": "DIGIVOIP",
"Category": "call",
"Account": "OPTIMIS",
"Subject": "FRANCE_STANDARD",
"Destination": "33184140117",
"SetupTime": "2025-03-11T22:00:02+01:00",
"AnswerTime": "2025-03-11T22:00:13+01:00",
"Usage": 12000000000,
"ExtraFields": {
"ACD": "0",
"DisconnectCause": "",
"FsConnID": "0",
"PDD": "0",
"Route": "CALLR1"
},
"ExtraInfo": "",
"Partial": false,
"PreRated": false,
"CostSource": "*sessions",
"Cost": 9.96,
"CostDetails": {
"CGRID": "ffcbe368e65ceb1a7e31a6fd585e826307b96fd2",
"RunID": "*default",
"StartTime": "2025-03-11T22:00:13+01:00",
"Usage": 12000000000,
"Cost": 9.96,
"Charges": [
{
"RatingID": "672ee5b",
"Increments": [
{
"Usage": 1000000000,
"Cost": 0.83,
"AccountingID": "8697097",
"CompressFactor": 5
}
],
"CompressFactor": 1
},
{
"RatingID": "672ee5b",
"Increments": [
{
"Usage": 1000000000,
"Cost": 0.83,
"AccountingID": "04e9c8b",
"CompressFactor": 7
}
],
"CompressFactor": 1
}
],
"AccountSummary": {
"Tenant": "DIGIVOIP",
"ID": "OPTIMIS",
"BalanceSummaries": [
{
"UUID": "f043e722-ebce-43fe-a79f-c60d5961f029",
"ID": "REFILL",
"Type": "*monetary",
"Initial": 5.85,
"Value": 0.04,
"Weight": 10,
"Disabled": false
},
{
"UUID": "9cbb8650-397f-45b0-89fc-fc031ff30839",
"ID": "*default",
"Type": "*monetary",
"Initial": -4.1500001,
"Value": -9.9600001,
"Disabled": false
}
],
"AllowNegative": false,
"Disabled": false
},
"Rating": {
"672ee5b": {
"ConnectFee": 0,
"RoundingMethod": "",
"RoundingDecimals": 6,
"MaxCost": 50,
"MaxCostStrategy": "*disconnect",
"TimingID": "544de89",
"RatesID": "d3eac35",
"RatingFiltersID": "5568cc2"
}
},
"Accounting": {
"8697097": {
"AccountID": "DIGIVOIP:OPTIMIS",
"BalanceUUID": "f043e722-ebce-43fe-a79f-c60d5961f029",
"RatingID": "",
"Units": 0.83,
"ExtraChargeID": ""
},
"04e9c8b": {
"AccountID": "DIGIVOIP:OPTIMIS",
"BalanceUUID": "9cbb8650-397f-45b0-89fc-fc031ff30839",
"RatingID": "",
"Units": 0.83,
"ExtraChargeID": ""
}
},
"RatingFilters": {
"5568cc2": {
"DestinationID": "France-Geographic",
"DestinationPrefix": "3318",
"RatingPlanID": "FRANCE_STANDARD",
"Subject": "*out:DIGIVOIP:call:FRANCE_STANDARD"
}
},
"Rates": {
"d3eac35": [
{
"GroupIntervalStart": 0,
"Value": 0.83,
"RateIncrement": 1000000000,
"RateUnit": 1000000000
}
]
},
"Timings": {
"544de89": {
"Years": [],
"Months": [],
"MonthDays": [],
"WeekDays": [],
"StartTime": "00:00:00"
}
}
}
}


Amor klich

unread,
Mar 11, 2025, 7:09:58 PMMar 11
to CGRateS
Update:
In both calls cgrates gives 12s :  EXECUTE [depth=0] sofia/internal/1...@172.16.2.100 sched_hangup(+12 alloted_timeout)

here is the ngrep :


0 received, 0 matched
root@cgrates:~# ^C
root@cgrates:~#  ngrep -t -W byline port  2012 -d lo
interface: lo (127.0.0.0/255.0.0.0)
filter: ( port 2012 ) and ((ip || ip6) || (vlan && (ip || ip6)))
#
T 2025/03/12 00:05:18.308672 127.0.0.1:57068 -> 127.0.0.1:2012 [AP] #1
{"method":"Responder.GetMaxSessionTime","params":[{"Category":"call","Tenant":"DIGIVOIP","Subject":"FRANCE_STANDARD","Account":"OPTIMIS","Destination":"33184140117","TimeStart":"2025-03-12T00:05:17+01:00","TimeEnd":"2025-03-12T03:05:17+01:00","LoopIndex":0,"DurationIndex":0,"FallbackSubject":"","RatingInfos":null,"Increments":null,"ToR":"*voice","ExtraFields":{"ACD":"0s","DisconnectCause":"","FsConnID":"1","PDD":"0s","Route":""},"MaxRate":0,"MaxRateUnit":0,"MaxCostSoFar":0,"CgrID":"17550cd92eb57f61ed85b3191a57142224eabdd5","RunID":"*default","ForceDuration":false,"PerformRounding":false,"DenyNegativeAccount":false,"DryRun":false,"APIOpts":{}}],"id":54}

#
T 2025/03/12 00:05:18.311544 127.0.0.1:2012 -> 127.0.0.1:57068 [AP] #2
{"id":54,"result":10000000000,"error":null}

#
T 2025/03/12 00:05:18.311603 127.0.0.1:57068 -> 127.0.0.1:2012 [AP] #3
{"method":"RouteSv1.GetRoutes","params":[{"Tenant":"DIGIVOIP","ID":"fb90fe2","Time":"2025-03-12T00:05:17+01:00","Event":{"ACD":0,"Account":"OPTIMIS","AnswerTime":"0001-01-01T00:00:00Z","CGRID":"17550cd92eb57f61ed85b3191a57142224eabdd5","Category":"call","Cost":-1,"Destination":"33184140117","DisconnectCause":"","FsConnID":1,"OriginHost":"fs2.digivoip.fr","OriginID":"535e764c-5616-40bc-874b-698a3f4a6521","PDD":0,"RequestType":"*prepaid","Route":"","SetupTime":"2025-03-12T00:05:17+01:00","Source":"FS_CHANNEL_PARK","Subject":"FRANCE_STANDARD","Tenant":"DIGIVOIP","ToR":"*voice","Usage":0},"APIOpts":{}}],"id":55}

#
T 2025/03/12 00:05:18.311725 127.0.0.1:2012 -> 127.0.0.1:57068 [AP] #4
{"id":55,"result":[{"ProfileID":"ROUTE_ACNT_OPTIMIS","Sorting":"*weight","Routes":[{"RouteID":"CALLR1","RouteParameters":"","SortingData":{"Weight":10}}]}],"error":null}

##
T 2025/03/12 00:05:26.231878 127.0.0.1:57068 -> 127.0.0.1:2012 [AP] #6
{"method":"Responder.GetMaxSessionTime","params":[{"Category":"call","Tenant":"DIGIVOIP","Subject":"FRANCE_STANDARD","Account":"OPTIMIS","Destination":"33184140117","TimeStart":"2025-03-12T00:05:25+01:00","TimeEnd":"2025-03-12T03:05:25+01:00","LoopIndex":0,"DurationIndex":0,"FallbackSubject":"","RatingInfos":null,"Increments":null,"ToR":"*voice","ExtraFields":{"ACD":"0s","DisconnectCause":"","FsConnID":"0","PDD":"0s","Route":""},"MaxRate":0,"MaxRateUnit":0,"MaxCostSoFar":0,"CgrID":"a66ffc99511e8e29d5d978e7ac14f04061d6e88f","RunID":"*default","ForceDuration":false,"PerformRounding":false,"DenyNegativeAccount":false,"DryRun":false,"APIOpts":{}}],"id":56}

#
T 2025/03/12 00:05:26.235139 127.0.0.1:2012 -> 127.0.0.1:57068 [AP] #7
{"id":56,"result":10000000000,"error":null}

##
T 2025/03/12 00:05:26.235219 127.0.0.1:57068 -> 127.0.0.1:2012 [AP] #9
{"method":"RouteSv1.GetRoutes","params":[{"Tenant":"DIGIVOIP","ID":"d6c91b0","Time":"2025-03-12T00:05:25+01:00","Event":{"ACD":0,"Account":"OPTIMIS","AnswerTime":"0001-01-01T00:00:00Z","CGRID":"a66ffc99511e8e29d5d978e7ac14f04061d6e88f","Category":"call","Cost":-1,"Destination":"33184140117","DisconnectCause":"","FsConnID":0,"OriginHost":"fs1.digivoip.fr","OriginID":"24899c29-227b-4f99-882f-8f8be2216af5","PDD":0,"RequestType":"*prepaid","Route":"","SetupTime":"2025-03-12T00:05:25+01:00","Source":"FS_CHANNEL_PARK","Subject":"FRANCE_STANDARD","Tenant":"DIGIVOIP","ToR":"*voice","Usage":0},"APIOpts":{}}],"id":57}

#
T 2025/03/12 00:05:26.235322 127.0.0.1:2012 -> 127.0.0.1:57068 [AP] #10
{"id":57,"result":[{"ProfileID":"ROUTE_ACNT_OPTIMIS","Sorting":"*weight","Routes":[{"RouteID":"CALLR1","RouteParameters":"","SortingData":{"Weight":10}}]}],"error":null}

##
T 2025/03/12 00:05:28.567456 127.0.0.1:57068 -> 127.0.0.1:2012 [AP] #12
{"method":"Responder.MaxDebit","params":[{"Category":"call","Tenant":"DIGIVOIP","Subject":"FRANCE_STANDARD","Account":"OPTIMIS","Destination":"33184140117","TimeStart":"2025-03-12T00:05:28+01:00","TimeEnd":"2025-03-12T00:05:33+01:00","LoopIndex":0,"DurationIndex":5000000000,"FallbackSubject":"","RatingInfos":null,"Increments":null,"ToR":"*voice","ExtraFields":{"ACD":"0s","DisconnectCause":"","FsConnID":"1","PDD":"0s","Route":"CALLR1"},"MaxRate":0,"MaxRateUnit":0,"MaxCostSoFar":0,"CgrID":"17550cd92eb57f61ed85b3191a57142224eabdd5","RunID":"*default","ForceDuration":false,"PerformRounding":false,"DenyNegativeAccount":false,"DryRun":false,"APIOpts":{}}],"id":58}

#
T 2025/03/12 00:05:28.568820 127.0.0.1:57068 -> 127.0.0.1:2012 [AP] #13
{"method":"ThresholdSv1.ProcessEvent","params":[{"Tenant":"DIGIVOIP","ID":"2ebec820-45d8-4057-aa9e-dc372c35ce7b","Time":"2025-03-12T00:05:28.56878701+01:00","Event":{"AllowNegative":false,"BalanceSummaries":[{"UUID":"6d7a88de-87a2-4d2a-8694-fd804522db09","ID":"REFILL_10","Type":"*monetary","Initial":8.34,"Value":4.19,"Weight":10,"Disabled":false}],"Disabled":false,"ID":"OPTIMIS","Tenant":"DIGIVOIP"},"APIOpts":{"*eventType":"AccountUpdate"}}],"id":59}

##
T 2025/03/12 00:05:28.568906 127.0.0.1:2012 -> 127.0.0.1:57068 [AP] #15
{"id":59,"result":null,"error":"NOT_FOUND"}

##
T 2025/03/12 00:05:28.568939 127.0.0.1:57068 -> 127.0.0.1:2012 [AP] #17
{"method":"StatSv1.ProcessEvent","params":[{"Tenant":"DIGIVOIP","ID":"2ebec820-45d8-4057-aa9e-dc372c35ce7b","Time":"2025-03-12T00:05:28.56878701+01:00","Event":{"AllowNegative":false,"BalanceSummaries":[{"UUID":"6d7a88de-87a2-4d2a-8694-fd804522db09","ID":"REFILL_10","Type":"*monetary","Initial":8.34,"Value":4.19,"Weight":10,"Disabled":false}],"Disabled":false,"ID":"OPTIMIS","Tenant":"DIGIVOIP"},"APIOpts":{"*eventType":"AccountUpdate"}}],"id":60}

#
T 2025/03/12 00:05:28.569041 127.0.0.1:2012 -> 127.0.0.1:57068 [AP] #18
{"id":60,"result":["Stats"],"error":null}

#
T 2025/03/12 00:05:28.570255 127.0.0.1:2012 -> 127.0.0.1:57068 [AP] #19
{"id":58,"result":{"Category":"call","Tenant":"DIGIVOIP","Subject":"FRANCE_STANDARD","Account":"OPTIMIS","Destination":"33184140117","ToR":"*voice","Cost":4.15,"Timespans":[{"TimeStart":"2025-03-12T00:05:28+01:00","TimeEnd":"2025-03-12T00:05:33+01:00","Cost":4.15,"RateInterval":{"Timing":{"ID":"*any","Years":[],"Months":[],"MonthDays":[],"WeekDays":[],"StartTime":"00:00:00","EndTime":""},"Rating":{"ConnectFee":0,"RoundingMethod":"","RoundingDecimals":6,"MaxCost":50,"MaxCostStrategy":"*disconnect","Rates":[{"GroupIntervalStart":0,"Value":0.83,"RateIncrement":1000000000,"RateUnit":1000000000}]},"Weight":10},"DurationIndex":5000000000,"Increments":[{"Duration":1000000000,"Cost":0.83,"BalanceInfo":{"Unit":null,"Monetary":{"UUID":"6d7a88de-87a2-4d2a-8694-fd804522db09","ID":"REFILL_10","Value":4.19,"RateInterval":null},"AccountID":"DIGIVOIP:OPTIMIS"},"CompressFactor":5}],"RoundIncrement":null,"MatchedSubject":"*out:DIGIVOIP:call:FRANCE_STANDARD","MatchedPrefix":"3318","MatchedDestId":"France-Geographic","RatingPlanId":"FRANCE_STANDARD","CompressFactor":1}],"RatedUsage":5000000000,"AccountSummary":{"Tenant":"DIGIVOIP","ID":"OPTIMIS","BalanceSummaries":[{"UUID":"6d7a88de-87a2-4d2a-8694-fd804522db09","ID":"REFILL_10","Type":"*monetary","Initial":8.34,"Value":4.19,"Weight":10,"Disabled":false}],"AllowNegative":false,"Disabled":false}},"error":null}

##
T 2025/03/12 00:05:30.192974 127.0.0.1:57068 -> 127.0.0.1:2012 [AP] #21
{"method":"Responder.MaxDebit","params":[{"Category":"call","Tenant":"DIGIVOIP","Subject":"FRANCE_STANDARD","Account":"OPTIMIS","Destination":"33184140117","TimeStart":"2025-03-12T00:05:29+01:00","TimeEnd":"2025-03-12T00:05:34+01:00","LoopIndex":0,"DurationIndex":5000000000,"FallbackSubject":"","RatingInfos":null,"Increments":null,"ToR":"*voice","ExtraFields":{"ACD":"0s","DisconnectCause":"","FsConnID":"0","PDD":"0s","Route":"CALLR1"},"MaxRate":0,"MaxRateUnit":0,"MaxCostSoFar":0,"CgrID":"a66ffc99511e8e29d5d978e7ac14f04061d6e88f","RunID":"*default","ForceDuration":false,"PerformRounding":false,"DenyNegativeAccount":false,"DryRun":false,"APIOpts":{}}],"id":61}

#
T 2025/03/12 00:05:30.194385 127.0.0.1:57068 -> 127.0.0.1:2012 [AP] #22
{"method":"ThresholdSv1.ProcessEvent","params":[{"Tenant":"DIGIVOIP","ID":"0e953ec0-7cc6-4689-9c06-4f65fc40c773","Time":"2025-03-12T00:05:30.194325437+01:00","Event":{"AllowNegative":false,"BalanceSummaries":[{"UUID":"6d7a88de-87a2-4d2a-8694-fd804522db09","ID":"REFILL_10","Type":"*monetary","Initial":4.19,"Value":0.04,"Weight":10,"Disabled":false}],"Disabled":false,"ID":"OPTIMIS","Tenant":"DIGIVOIP"},"APIOpts":{"*eventType":"AccountUpdate"}}],"id":62}

##
T 2025/03/12 00:05:30.194482 127.0.0.1:2012 -> 127.0.0.1:57068 [AP] #24
{"id":62,"result":null,"error":"NOT_FOUND"}

#
T 2025/03/12 00:05:30.194522 127.0.0.1:57068 -> 127.0.0.1:2012 [AP] #25
{"method":"StatSv1.ProcessEvent","params":[{"Tenant":"DIGIVOIP","ID":"0e953ec0-7cc6-4689-9c06-4f65fc40c773","Time":"2025-03-12T00:05:30.194325437+01:00","Event":{"AllowNegative":false,"BalanceSummaries":[{"UUID":"6d7a88de-87a2-4d2a-8694-fd804522db09","ID":"REFILL_10","Type":"*monetary","Initial":4.19,"Value":0.04,"Weight":10,"Disabled":false}],"Disabled":false,"ID":"OPTIMIS","Tenant":"DIGIVOIP"},"APIOpts":{"*eventType":"AccountUpdate"}}],"id":63}

#
T 2025/03/12 00:05:30.194785 127.0.0.1:2012 -> 127.0.0.1:57068 [AP] #26
{"id":63,"result":["Stats"],"error":null}

#
T 2025/03/12 00:05:30.196621 127.0.0.1:2012 -> 127.0.0.1:57068 [AP] #27
{"id":61,"result":{"Category":"call","Tenant":"DIGIVOIP","Subject":"FRANCE_STANDARD","Account":"OPTIMIS","Destination":"33184140117","ToR":"*voice","Cost":4.15,"Timespans":[{"TimeStart":"2025-03-12T00:05:29+01:00","TimeEnd":"2025-03-12T00:05:34+01:00","Cost":4.15,"RateInterval":{"Timing":{"ID":"*any","Years":[],"Months":[],"MonthDays":[],"WeekDays":[],"StartTime":"00:00:00","EndTime":""},"Rating":{"ConnectFee":0,"RoundingMethod":"","RoundingDecimals":6,"MaxCost":50,"MaxCostStrategy":"*disconnect","Rates":[{"GroupIntervalStart":0,"Value":0.83,"RateIncrement":1000000000,"RateUnit":1000000000}]},"Weight":10},"DurationIndex":5000000000,"Increments":[{"Duration":1000000000,"Cost":0.83,"BalanceInfo":{"Unit":null,"Monetary":{"UUID":"6d7a88de-87a2-4d2a-8694-fd804522db09","ID":"REFILL_10","Value":0.04,"RateInterval":null},"AccountID":"DIGIVOIP:OPTIMIS"},"CompressFactor":5}],"RoundIncrement":null,"MatchedSubject":"*out:DIGIVOIP:call:FRANCE_STANDARD","MatchedPrefix":"3318","MatchedDestId":"France-Geographic","RatingPlanId":"FRANCE_STANDARD","CompressFactor":1}],"RatedUsage":5000000000,"AccountSummary":{"Tenant":"DIGIVOIP","ID":"OPTIMIS","BalanceSummaries":[{"UUID":"6d7a88de-87a2-4d2a-8694-fd804522db09","ID":"REFILL_10","Type":"*monetary","Initial":4.19,"Value":0.04,"Weight":10,"Disabled":false}],"AllowNegative":false,"Disabled":false}},"error":null}

##
T 2025/03/12 00:05:33.570882 127.0.0.1:57068 -> 127.0.0.1:2012 [AP] #29
{"method":"Responder.MaxDebit","params":[{"Category":"call","Tenant":"DIGIVOIP","Subject":"FRANCE_STANDARD","Account":"OPTIMIS","Destination":"33184140117","TimeStart":"2025-03-12T00:05:33+01:00","TimeEnd":"2025-03-12T00:05:38+01:00","LoopIndex":1,"DurationIndex":10000000000,"FallbackSubject":"","RatingInfos":null,"Increments":null,"ToR":"*voice","ExtraFields":{"ACD":"0s","DisconnectCause":"","FsConnID":"1","PDD":"0s","Route":"CALLR1"},"MaxRate":0,"MaxRateUnit":0,"MaxCostSoFar":4.15,"CgrID":"17550cd92eb57f61ed85b3191a57142224eabdd5","RunID":"*default","ForceDuration":false,"PerformRounding":false,"DenyNegativeAccount":false,"DryRun":false,"APIOpts":{}}],"id":64}

#
T 2025/03/12 00:05:33.572401 127.0.0.1:2012 -> 127.0.0.1:57068 [AP] #30
{"id":64,"result":{"Category":"call","Tenant":"DIGIVOIP","Subject":"FRANCE_STANDARD","Account":"OPTIMIS","Destination":"33184140117","ToR":"*voice","Cost":0,"Timespans":null,"RatedUsage":0,"AccountSummary":{"Tenant":"DIGIVOIP","ID":"OPTIMIS","BalanceSummaries":[{"UUID":"6d7a88de-87a2-4d2a-8694-fd804522db09","ID":"REFILL_10","Type":"*monetary","Initial":0.04,"Value":0.04,"Weight":10,"Disabled":false}],"AllowNegative":false,"Disabled":false}},"error":null}

##
T 2025/03/12 00:05:35.197748 127.0.0.1:57068 -> 127.0.0.1:2012 [AP] #32
{"method":"Responder.MaxDebit","params":[{"Category":"call","Tenant":"DIGIVOIP","Subject":"FRANCE_STANDARD","Account":"OPTIMIS","Destination":"33184140117","TimeStart":"2025-03-12T00:05:34+01:00","TimeEnd":"2025-03-12T00:05:39+01:00","LoopIndex":1,"DurationIndex":10000000000,"FallbackSubject":"","RatingInfos":null,"Increments":null,"ToR":"*voice","ExtraFields":{"ACD":"0s","DisconnectCause":"","FsConnID":"0","PDD":"0s","Route":"CALLR1"},"MaxRate":0,"MaxRateUnit":0,"MaxCostSoFar":4.15,"CgrID":"a66ffc99511e8e29d5d978e7ac14f04061d6e88f","RunID":"*default","ForceDuration":false,"PerformRounding":false,"DenyNegativeAccount":false,"DryRun":false,"APIOpts":{}}],"id":65}

#
T 2025/03/12 00:05:35.199173 127.0.0.1:2012 -> 127.0.0.1:57068 [AP] #33
{"id":65,"result":{"Category":"call","Tenant":"DIGIVOIP","Subject":"FRANCE_STANDARD","Account":"OPTIMIS","Destination":"33184140117","ToR":"*voice","Cost":0,"Timespans":null,"RatedUsage":0,"AccountSummary":{"Tenant":"DIGIVOIP","ID":"OPTIMIS","BalanceSummaries":[{"UUID":"6d7a88de-87a2-4d2a-8694-fd804522db09","ID":"REFILL_10","Type":"*monetary","Initial":0.04,"Value":0.04,"Weight":10,"Disabled":false}],"AllowNegative":false,"Disabled":false}},"error":null}

##
T 2025/03/12 00:05:38.616323 127.0.0.1:57068 -> 127.0.0.1:2012 [AP] #35
{"method":"Responder.Debit","params":[{"Category":"call","Tenant":"DIGIVOIP","Subject":"FRANCE_STANDARD","Account":"OPTIMIS","Destination":"33184140117","TimeStart":"2025-03-12T00:05:33.572458229+01:00","TimeEnd":"2025-03-12T00:05:38.572458229+01:00","LoopIndex":2,"DurationIndex":10000000000,"FallbackSubject":"","RatingInfos":null,"Increments":null,"ToR":"*voice","ExtraFields":{"ACD":"0s","DisconnectCause":"","FsConnID":"1","PDD":"0s","Route":"CALLR1"},"MaxRate":0,"MaxRateUnit":0,"MaxCostSoFar":4.15,"CgrID":"17550cd92eb57f61ed85b3191a57142224eabdd5","RunID":"*default","ForceDuration":false,"PerformRounding":false,"DenyNegativeAccount":false,"DryRun":false,"APIOpts":{}}],"id":66}

#
T 2025/03/12 00:05:38.617762 127.0.0.1:2012 -> 127.0.0.1:57068 [AP] #36
{"id":66,"result":null,"error":"INSUFFICIENT_CREDIT_BALANCE_BLOCKER"}

##
T 2025/03/12 00:05:38.617914 127.0.0.1:57068 -> 127.0.0.1:2012 [AP] #38
{"method":"CDRsV1.ProcessEvent","params":[{"Flags":["*chargers:false","*attributes:false"],"Tenant":"DIGIVOIP","ID":"40c51df","Time":null,"Event":{"ACD":0,"Account":"OPTIMIS","AnswerTime":"2025-03-12T00:05:28+01:00","CGRID":"17550cd92eb57f61ed85b3191a57142224eabdd5","Category":"call","Cost":4.15,"CostDetails":"{\"CGRID\":\"17550cd92eb57f61ed85b3191a57142224eabdd5\",\"RunID\":\"*default\",\"StartTime\":\"2025-03-12T00:05:28+01:00\",\"Usage\":5000000000,\"Cost\":4.15,\"Charges\":[{\"RatingID\":\"3e9a6e2\",\"Increments\":[{\"Usage\":1000000000,\"Cost\":0.83,\"AccountingID\":\"a084064\",\"CompressFactor\":5}],\"CompressFactor\":1}],\"AccountSummary\":{\"Tenant\":\"DIGIVOIP\",\"ID\":\"OPTIMIS\",\"BalanceSummaries\":[{\"UUID\":\"6d7a88de-87a2-4d2a-8694-fd804522db09\",\"ID\":\"REFILL_10\",\"Type\":\"*monetary\",\"Initial\":8.34,\"Value\":0.04,\"Weight\":10,\"Disabled\":false}],\"AllowNegative\":false,\"Disabled\":false},\"Rating\":{\"3e9a6e2\":{\"ConnectFee\":0,\"RoundingMethod\":\"\",\"RoundingDecimals\":6,\"MaxCost\":50,\"MaxCostStrategy\":\"*disconnect\",\"TimingID\":\"96ab85b\",\"RatesID\":\"03a28bf\",\"RatingFiltersID\":\"c0cd083\"}},\"Accounting\":{\"a084064\":{\"AccountID\":\"DIGIVOIP:OPTIMIS\",\"BalanceUUID\":\"6d7a88de-87a2-4d2a-8694-fd804522db09\",\"RatingID\":\"\",\"Units\":0.83,\"ExtraChargeID\":\"\"}},\"RatingFilters\":{\"c0cd083\":{\"DestinationID\":\"France-Geographic\",\"DestinationPrefix\":\"3318\",\"RatingPlanID\":\"FRANCE_STANDARD\",\"Subject\":\"*out:DIGIVOIP:call:FRANCE_STANDARD\"}},\"Rates\":{\"03a28bf\":[{\"GroupIntervalStart\":0,\"Value\":0.83,\"RateIncrement\":1000000000,\"RateUnit\":1000000000}]},\"Timings\":{\"96ab85b\":{\"Years\":[],\"Months\":[],\"MonthDays\":[],\"WeekDays\":[],\"StartTime\":\"00:00:00\"}}}","CostSource":"*sessions","Destination":"33184140117","DisconnectCause":"","FsConnID":1,"OriginHost":"fs2.digivoip.fr","OriginID":"535e764c-5616-40bc-874b-698a3f4a6521","PDD":0,"RequestType":"*prepaid","Route":"CALLR1","RunID":"*default","SetupTime":"2025-03-12T00:05:17+01:00","Source":"FS_CHANNEL_ANSWER","Subject":"FRANCE_STANDARD","Tenant":"DIGIVOIP","ToR":"*voice","Usage":10000000000},"APIOpts":{}}],"id":67}

##
T 2025/03/12 00:05:38.671110 127.0.0.1:57068 -> 127.0.0.1:2012 [AP] #40
{"method":"StatSv1.ProcessEvent","params":[{"Tenant":"DIGIVOIP","ID":"21027a9","Time":null,"Event":{"ACD":"0","Account":"OPTIMIS","AnswerTime":"2025-03-12T00:05:28+01:00","CGRID":"17550cd92eb57f61ed85b3191a57142224eabdd5","Category":"call","Cost":-1,"CostSource":"*sessions","Destination":"33184140117","DisconnectCause":"","ExtraInfo":"INSUFFICIENT_CREDIT_BALANCE_BLOCKER","FsConnID":"1","OrderID":0,"OriginHost":"fs2.digivoip.fr","OriginID":"535e764c-5616-40bc-874b-698a3f4a6521","PDD":"0","Partial":false,"PreRated":false,"RequestType":"*prepaid","Route":"CALLR1","RunID":"*default","SetupTime":"2025-03-12T00:05:17+01:00","Source":"FS_CHANNEL_ANSWER","Subject":"FRANCE_STANDARD","Tenant":"DIGIVOIP","ToR":"*voice","Usage":10000000000},"APIOpts":{}}],"id":68}

##
T 2025/03/12 00:05:38.671312 127.0.0.1:2012 -> 127.0.0.1:57068 [AP] #42
{"id":68,"result":["Stats"],"error":null}

#
T 2025/03/12 00:05:38.671418 127.0.0.1:2012 -> 127.0.0.1:57068 [AP] #43
{"id":67,"result":"OK","error":null}

##
T 2025/03/12 00:05:39.762984 127.0.0.1:57068 -> 127.0.0.1:2012 [AP] #45
{"method":"Responder.Debit","params":[{"Category":"call","Tenant":"DIGIVOIP","Subject":"FRANCE_STANDARD","Account":"OPTIMIS","Destination":"33184140117","TimeStart":"2025-03-12T00:05:35.199246859+01:00","TimeEnd":"2025-03-12T00:05:40.199246859+01:00","LoopIndex":2,"DurationIndex":10000000000,"FallbackSubject":"","RatingInfos":null,"Increments":null,"ToR":"*voice","ExtraFields":{"ACD":"0s","DisconnectCause":"","FsConnID":"0","PDD":"0s","Route":"CALLR1"},"MaxRate":0,"MaxRateUnit":0,"MaxCostSoFar":4.15,"CgrID":"a66ffc99511e8e29d5d978e7ac14f04061d6e88f","RunID":"*default","ForceDuration":false,"PerformRounding":false,"DenyNegativeAccount":false,"DryRun":false,"APIOpts":{}}],"id":69}

#
T 2025/03/12 00:05:39.764355 127.0.0.1:57068 -> 127.0.0.1:2012 [AP] #46
{"method":"ThresholdSv1.ProcessEvent","params":[{"Tenant":"DIGIVOIP","ID":"e5cfeb1d-337a-4cbe-b6a2-a95ab33bbfae","Time":"2025-03-12T00:05:39.764315739+01:00","Event":{"AllowNegative":false,"BalanceSummaries":[{"UUID":"6d7a88de-87a2-4d2a-8694-fd804522db09","ID":"REFILL_10","Type":"*monetary","Initial":4.19,"Value":0.04,"Weight":10,"Disabled":false}],"Disabled":false,"ID":"OPTIMIS","Tenant":"DIGIVOIP"},"APIOpts":{"*eventType":"AccountUpdate"}}],"id":70}

##
T 2025/03/12 00:05:39.764491 127.0.0.1:2012 -> 127.0.0.1:57068 [AP] #48
{"id":70,"result":null,"error":"NOT_FOUND"}

#
T 2025/03/12 00:05:39.764533 127.0.0.1:57068 -> 127.0.0.1:2012 [AP] #49
{"method":"StatSv1.ProcessEvent","params":[{"Tenant":"DIGIVOIP","ID":"e5cfeb1d-337a-4cbe-b6a2-a95ab33bbfae","Time":"2025-03-12T00:05:39.764315739+01:00","Event":{"AllowNegative":false,"BalanceSummaries":[{"UUID":"6d7a88de-87a2-4d2a-8694-fd804522db09","ID":"REFILL_10","Type":"*monetary","Initial":4.19,"Value":0.04,"Weight":10,"Disabled":false}],"Disabled":false,"ID":"OPTIMIS","Tenant":"DIGIVOIP"},"APIOpts":{"*eventType":"AccountUpdate"}}],"id":71}

#
T 2025/03/12 00:05:39.764636 127.0.0.1:2012 -> 127.0.0.1:57068 [AP] #50
{"id":71,"result":["Stats"],"error":null}

#
T 2025/03/12 00:05:39.765900 127.0.0.1:2012 -> 127.0.0.1:57068 [AP] #51
{"id":69,"result":{"Category":"call","Tenant":"DIGIVOIP","Subject":"FRANCE_STANDARD","Account":"OPTIMIS","Destination":"33184140117","ToR":"*voice","Cost":4.15,"Timespans":[{"TimeStart":"2025-03-12T00:05:35.199246859+01:00","TimeEnd":"2025-03-12T00:05:40.199246859+01:00","Cost":4.15,"RateInterval":{"Timing":{"ID":"*any","Years":[],"Months":[],"MonthDays":[],"WeekDays":[],"StartTime":"00:00:00","EndTime":""},"Rating":{"ConnectFee":0,"RoundingMethod":"","RoundingDecimals":6,"MaxCost":50,"MaxCostStrategy":"*disconnect","Rates":[{"GroupIntervalStart":0,"Value":0.83,"RateIncrement":1000000000,"RateUnit":1000000000}]},"Weight":10},"DurationIndex":10000000000,"Increments":[{"Duration":1000000000,"Cost":0.83,"BalanceInfo":{"Unit":null,"Monetary":{"UUID":"6d7a88de-87a2-4d2a-8694-fd804522db09","ID":"REFILL_10","Value":0.04,"RateInterval":null},"AccountID":"DIGIVOIP:OPTIMIS"},"CompressFactor":5}],"RoundIncrement":null,"MatchedSubject":"*out:DIGIVOIP:call:FRANCE_STANDARD","MatchedPrefix":"3318","MatchedDestId":"France-Geographic","RatingPlanId":"FRANCE_STANDARD","CompressFactor":1}],"RatedUsage":5000000000,"AccountSummary":{"Tenant":"DIGIVOIP","ID":"OPTIMIS","BalanceSummaries":[{"UUID":"6d7a88de-87a2-4d2a-8694-fd804522db09","ID":"REFILL_10","Type":"*monetary","Initial":4.19,"Value":0.04,"Weight":10,"Disabled":false}],"AllowNegative":false,"Disabled":false}},"error":null}

##
T 2025/03/12 00:05:39.766108 127.0.0.1:57068 -> 127.0.0.1:2012 [AP] #53
{"method":"CDRsV1.ProcessEvent","params":[{"Flags":["*chargers:false","*attributes:false"],"Tenant":"DIGIVOIP","ID":"6e1b57a","Time":null,"Event":{"ACD":0,"Account":"OPTIMIS","AnswerTime":"2025-03-12T00:05:29+01:00","CGRID":"a66ffc99511e8e29d5d978e7ac14f04061d6e88f","Category":"call","Cost":8.3,"CostDetails":"{\"CGRID\":\"a66ffc99511e8e29d5d978e7ac14f04061d6e88f\",\"RunID\":\"*default\",\"StartTime\":\"2025-03-12T00:05:29+01:00\",\"Usage\":10000000000,\"Cost\":8.3,\"Charges\":[{\"RatingID\":\"f6769a2\",\"Increments\":[{\"Usage\":1000000000,\"Cost\":0.83,\"AccountingID\":\"786db7e\",\"CompressFactor\":10}],\"CompressFactor\":1}],\"AccountSummary\":{\"Tenant\":\"DIGIVOIP\",\"ID\":\"OPTIMIS\",\"BalanceSummaries\":[{\"UUID\":\"6d7a88de-87a2-4d2a-8694-fd804522db09\",\"ID\":\"REFILL_10\",\"Type\":\"*monetary\",\"Initial\":4.19,\"Value\":0.04,\"Weight\":10,\"Disabled\":false}],\"AllowNegative\":false,\"Disabled\":false},\"Rating\":{\"f6769a2\":{\"ConnectFee\":0,\"RoundingMethod\":\"\",\"RoundingDecimals\":6,\"MaxCost\":50,\"MaxCostStrategy\":\"*disconnect\",\"TimingID\":\"5285641\",\"RatesID\":\"eb56f59\",\"RatingFiltersID\":\"f6d7f06\"}},\"Accounting\":{\"786db7e\":{\"AccountID\":\"DIGIVOIP:OPTIMIS\",\"BalanceUUID\":\"6d7a88de-87a2-4d2a-8694-fd804522db09\",\"RatingID\":\"\",\"Units\":0.83,\"ExtraChargeID\":\"\"}},\"RatingFilters\":{\"f6d7f06\":{\"DestinationID\":\"France-Geographic\",\"DestinationPrefix\":\"3318\",\"RatingPlanID\":\"FRANCE_STANDARD\",\"Subject\":\"*out:DIGIVOIP:call:FRANCE_STANDARD\"}},\"Rates\":{\"eb56f59\":[{\"GroupIntervalStart\":0,\"Value\":0.83,\"RateIncrement\":1000000000,\"RateUnit\":1000000000}]},\"Timings\":{\"5285641\":{\"Years\":[],\"Months\":[],\"MonthDays\":[],\"WeekDays\":[],\"StartTime\":\"00:00:00\"}}}","CostSource":"*sessions","Destination":"33184140117","DisconnectCause":"","FsConnID":0,"OriginHost":"fs1.digivoip.fr","OriginID":"24899c29-227b-4f99-882f-8f8be2216af5","PDD":0,"RequestType":"*prepaid","Route":"CALLR1","RunID":"*default","SetupTime":"2025-03-12T00:05:25+01:00","Source":"FS_CHANNEL_ANSWER","Subject":"FRANCE_STANDARD","Tenant":"DIGIVOIP","ToR":"*voice","Usage":10000000000},"APIOpts":{}}],"id":72}

#
T 2025/03/12 00:05:39.796531 127.0.0.1:57068 -> 127.0.0.1:2012 [AP] #54
{"method":"StatSv1.ProcessEvent","params":[{"Tenant":"DIGIVOIP","ID":"e6d9470","Time":null,"Event":{"ACD":"0","Account":"OPTIMIS","AnswerTime":"2025-03-12T00:05:29+01:00","CGRID":"a66ffc99511e8e29d5d978e7ac14f04061d6e88f","Category":"call","Cost":8.3,"CostDetails":{"CGRID":"a66ffc99511e8e29d5d978e7ac14f04061d6e88f","RunID":"*default","StartTime":"2025-03-12T00:05:29+01:00","Usage":10000000000,"Cost":8.3,"Charges":[{"RatingID":"f6769a2","Increments":[{"Usage":1000000000,"Cost":0.83,"AccountingID":"786db7e","CompressFactor":10}],"CompressFactor":1}],"AccountSummary":{"Tenant":"DIGIVOIP","ID":"OPTIMIS","BalanceSummaries":[{"UUID":"6d7a88de-87a2-4d2a-8694-fd804522db09","ID":"REFILL_10","Type":"*monetary","Initial":4.19,"Value":0.04,"Weight":10,"Disabled":false}],"AllowNegative":false,"Disabled":false},"Rating":{"f6769a2":{"ConnectFee":0,"RoundingMethod":"","RoundingDecimals":6,"MaxCost":50,"MaxCostStrategy":"*disconnect","TimingID":"5285641","RatesID":"eb56f59","RatingFiltersID":"f6d7f06"}},"Accounting":{"786db7e":{"AccountID":"DIGIVOIP:OPTIMIS","BalanceUUID":"6d7a88de-87a2-4d2a-8694-fd804522db09","RatingID":"","Units":0.83,"ExtraChargeID":""}},"RatingFilters":{"f6d7f06":{"DestinationID":"France-Geographic","DestinationPrefix":"3318","RatingPlanID":"FRANCE_STANDARD","Subject":"*out:DIGIVOIP:call:FRANCE_STANDARD"}},"Rates":{"eb56f59":[{"GroupIntervalStart":0,"Value":0.83,"RateIncrement":1000000000,"RateUnit":1000000000}]},"Timings":{"5285641":{"Years":[],"Months":[],"MonthDays":[],"WeekDays":[],"StartTime":"00:00:00"}}},"CostSource":"*sessions","Destination":"33184140117","DisconnectCause":"","ExtraInfo":"","FsConnID":"0","OrderID":0,"OriginHost":"fs1.digivoip.fr","OriginID":"24899c29-227b-4f99-882f-8f8be2216af5","PDD":"0","Partial":false,"PreRated":false,"RequestType":"*prepaid","Route":"CALLR1","RunID":"*default","SetupTime":"2025-03-12T00:05:25+01:00","Source":"FS_CHANNEL_ANSWER","Subject":"FRANCE_STANDARD","Tenant":"DIGIVOIP","ToR":"*voice","Usage":10000000000},"APIOpts":{}}],"id":73}

##
T 2025/03/12 00:05:39.796709 127.0.0.1:2012 -> 127.0.0.1:57068 [AP] #56
{"id":73,"result":["Stats"],"error":null}

#
T 2025/03/12 00:05:39.796746 127.0.0.1:2012 -> 127.0.0.1:57068 [AP] #57
{"id":72,"result":"OK","error":null}

Armir Veliaj

unread,
Mar 13, 2025, 11:56:29 AMMar 13
to CGRateS
Hello, 

Could you please provide us which version you are using?

Thanks,
Armir

Amor klich

unread,
Mar 13, 2025, 1:01:02 PMMar 13
to cgr...@googlegroups.com

Hello lates version from debian repo 0.11

Amor klich

unread,
Mar 13, 2025, 5:19:42 PMMar 13
to CGRateS

CGR...@v0.11.0~dev-20250226115453-535f2e554e66

Amor klich

unread,
Mar 15, 2025, 4:38:57 PMMar 15
to cgr...@googlegroups.com

Hello

Should we use the version 0.10.4 as a stable release ?


--
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/a8650325-02d0-4ad0-8c6d-2913f5f42d34n%40googlegroups.com.

Amor klich

unread,
Mar 15, 2025, 7:25:02 PMMar 15
to CGRateS
hello

I tested also v0.10.4 and i got the same thing so the problem is some  conf in my side i think .

Amor klich

unread,
Mar 17, 2025, 12:46:07 PMMar 17
to cgr...@googlegroups.com

Any help on this is much appreciated


Dan B

unread,
Mar 17, 2025, 3:23:06 PMMar 17
to CGRateS
Hi klic...@gmail.com,

By looking at your ngrep, I can confirm that all inside is happening as expected. The first CDRs you sent, they do not match btw the ngrep (different CGRIDs and call durations), so I will explain you what is happening inside the ngrep you have captured:

1.  Responder.GetMaxSessionTime as part as the authorization (FS_PARK event) for the first call (fs_conn_id: 1) is allowed.
2. Responder.GetMaxSessionTime as part as the authorization (FS_PARK event) for the second call (fs_conn_id: 0) is allowed.
3. Responder.MaxDebit starts the debit loop for first call (fs_conn_id: 1), debits your first 5 seconds from REFILL_10. Initial balance there is 8.34, remaining 4.19 (4.15 were consumed which is 0.83x5).
4. Responder.MaxDebit starts the debit loop for second call (fs_conn_id: 0), debits your first 5 seconds there, remaining 4.19-4.15=0.04.
5. Responder.MaxDebit comes second time for first call, but this time fails since you do not have enough balance. First call (fs_conn_id:1) is killed inside FreeSWITCH.
6. Responder.MaxDebit comes second time for second call, but this time fails since you do not have enough balance. First call (fs_conn_id:0) is killed inside FreeSWITCH.
7. On HANGUP_COMPLETE, SessionS detects that total call duration of the first call (fs_conn_id:1) was 10s, but only 5s were charged, so it attempts a manual debit (Responder.Debit), but this one fails due to Blocker flag being set most probably in some balance you have.
8. CDRsV1.ProcessEvent is being sent for the first call (fs_conn_id:1) and that one does the following:
 * Refunds first what it has debited initially and your balance will reach the same status as before debit, 4.19.
9. Second call will issue it's Responder.Debit and will consume the 4.15 available
10. CDR will now try to debit the 8.3 for full 10s but will only find 0.04 inside your REFILL. Since CDRs are not considering AllowNegative (only authorization and MaxDebit does it), we will create a new balance named *default with initial credit of 0 and go negative on that one (most probably you will end up with a credit of -8.3 or similar due to rounding and the impossibility of consuming the 0.04 since 1 second costs already 0.85).

I hope this helped.

DanB 

Amor klich

unread,
Mar 17, 2025, 6:04:58 PMMar 17
to CGRateS
Hi Dan

Thank you very much for your help it's more than clear ; )
So now if I make 100 calls at the same time the account will be charged in negative with 4.15*100 which is expected   , i am thinking about a way to prevent that like changing debit interval to 60s for exp .

Amor klich

unread,
Mar 21, 2025, 9:03:47 PMMar 21
to CGRateS
Hello 

How to prevent accounts from going negative ? or at least how to minimize this when we have some accounts doing predictive calls like 200 simultaneous calls .

Dan B

unread,
Mar 26, 2025, 1:34:26 PMMar 26
to CGRateS
Hi klic...@gmail.com,

Authorization together with a debit interval "as small as possible" should minimize the risk of going negative on multiple calls out of the same account, however it is almost impossible to achieve it 100%. This is why a negative account means nothing else than small debts  or risks you should assume yourself. If you do not like the concept of negative, you can create a separate balance with smaller weight as "buffer" which you manage separately (whether *voice or *monetary).

There is also some action (*topup_zero_negative) which can automatically reset the negative account, by dropping the extra charges.

Hope this helps.

DanB

Reply all
Reply to author
Forward
0 new messages