Reverse Billing Lab on CGRates

35 views
Skip to first unread message

simba masamba

unread,
Sep 25, 2026, 5:06:25 AMSep 25
to cgr...@googlegroups.com
hi Team,

I have been lab'ing and testing "reverse-billing" on cgrates such that a particular prefixes of numbers when called are the ones that incur the call cost instead of the caller.
In my lab, 27110493433 mimics an onnet subscriber and 27110493484 mimics a reverse-billed number.

Testing my Attribute profile I get the below:
"CGREvent": {
            "Tenant": "voice.lab.liquidtelecom.net",
            "ID": "test1",
            "Time": null,
            "Event": {
                "Account": "27110493484",
                "Category": "call",
                "Destination": "27110493484",
                "OriginalCallingParty": "27110493433",
                "RequestType": "*prepaid",
                "SetupTime": "2026-09-24T18:37:19Z",
                "Subject": "27110493484",
                "Usage": "30s"
            }
        }

This is what I want, as the B-number is the one that is being debited. However, I am facing 2 issues:
1.CDR is showing something else as below:
cgrates-attr-qstn-1.png

The originalCallingParty is wrong
My Attributes profile is as below:
{
"method": "ApierV1.SetAttributeProfile",
"params":[{
    "Tenant":{{POC-Tenant}},
    "ID":"ATTR_TOLLFREE_REVERSE_BILLING",
    "Contexts":["*sessions","*chargers","*cdrs"],
    "FilterIDs":["FLTR_TOLLFREE_DEST"],
    "Attributes":[
        {"Path":"*req.OriginalCallingParty","Type":"*variable","Value":[{"Rules":"~*req.Account"}]},
        {"Path":"*req.Account","Type":"*variable","Value":[{"Rules":"~*req.Destination"}]},
        {"Path":"*req.Subject","Type":"*variable","Value":[{"Rules":"~*req.Destination"}]}
    ],
    "Blocker":true,
    "Weight":50,
    "Cache": null
    }]
}

2. For the reverse-billed number, I set it to allowNegative balance to be true so that the amount reflects customer's arrears. For some reason it's not deducting from the MAIN *monetary balance which was 0 but the *default balance. What is your recommended approach to this?
balance-in-arrears.png
cgrates-attr-qstn.png

simba masamba

unread,
Sep 29, 2026, 9:02:28 AM (11 days ago) Sep 29
to cgr...@googlegroups.com
hi Team,

Please when you can, have a look at my issue and advise.
Otherwise I appreciate  your support all the time.

BR,

Armir Veliaj

unread,
Sep 30, 2026, 11:45:14 AM (9 days ago) Sep 30
to CGRateS
Hi Simba,

The OriginalCallingParty value looks like it is being overwritten when the attribute profile runs again.

The first time, it copies the caller’s number from Account, then changes Account to the called number. If the profile runs a second time, it copies that called number into OriginalCallingParty, replacing the original caller. This would explain why your standalone attribute test is correct but the CDR is not.
Could you share an ngrep capture for one reverse-billed call together with json config to try replicate your issue?

For the balance question, as mentioned also in the other thread what you are seeing is expected and by design. AllowNegative: true lets the account continue making calls without sufficient monetary credit, but the unpaid charges accumulate in the *default monetary balance. It does not make your custom MAIN balance go negative. You can use *default to track the customer’s arrears.

 
Thanks,
Armir

simba masamba

unread,
Oct 1, 2026, 3:33:45 AM (9 days ago) Oct 1
to cgr...@googlegroups.com
Hi Armir,

thanks for your reply.

My ngrep capture is as below:

interface: any
filter: ( port 2012 or port 2080 or port 8021 or port 2014 or port 2053 ) and (ip || ip6)
#
T 2026/10/01 07:22:40.651947 10.181.248.49:63475 -> 10.170.56.131:2080 [A] #1
......
##
T 2026/10/01 07:22:41.359591 10.181.248.49:51483 -> 10.170.56.131:2080 [A] #3
......
##
T 2026/10/01 07:22:41.686695 10.181.248.49:63475 -> 10.170.56.131:2080 [A] #5
......
##
T 2026/10/01 07:22:42.414632 10.181.248.49:51483 -> 10.170.56.131:2080 [A] #7
......
##
T 2026/10/01 07:22:42.489029 10.170.56.112:41694 -> 10.170.56.131:2012 [AP] #9
{"method":"SessionSv1.InitiateSession","params":[{"GetAttributes":true,"AllocateResources":false,"InitSession":true,"ForceDuration":false,"ProcessThresholds":false,"ProcessStats":false,"AttributeIDs":null,"ThresholdIDs":null,"StatIDs":null,"Tenant":"voice.lab.liquidtelecom.net","ID":"0f8a782","Time":"2026-10-01T07:22:42.488421555Z","Event":{"Account":"27110493433","Category":"call","Destination":"27110493484","DiameterIOI":"voice.lab.liquidtelecom.net","IMSChargingId":"a40d1b27dfdee610439fa9bd726a0020","OriginHost":"10.170.248.140","OriginID":"0gQAAC8WAAACBAAALxYAAOT+SbJTgs6ga/+KA53a7l/JrCXsXQ+UH...@10.170.248.200","RequestType":"*prepaid","RouteID":"voice.lab.liquidtelecom.net","SetupTime":"2026-10-01T07:22:42Z","Subject":"27110493433","SubscriberId":"27110493433","ToR":"*voice","Usage":"30s"}}],"id":34}

#
T 2026/10/01 07:22:42.489383 127.0.0.1:39958 -> 127.0.0.1:2012 [AP] #10
{"method":"AttributeSv1.ProcessEvent","params":[{"AttributeIDs":null,"Context":"*sessions","ProcessRuns":null,"Tenant":"voice.lab.liquidtelecom.net","ID":"0f8a782","Time":"2026-10-01T07:22:42.488421555Z","Event":{"Account":"27110493433","Category":"call","Destination":"27110493484","DiameterIOI":"voice.lab.liquidtelecom.net","IMSChargingId":"a40d1b27dfdee610439fa9bd726a0020","OriginHost":"10.170.248.140","OriginID":"0gQAAC8WAAACBAAALxYAAOT+SbJTgs6ga/+KA53a7l/JrCXsXQ+UH...@10.170.248.200","RequestType":"*prepaid","RouteID":"voice.lab.liquidtelecom.net","SetupTime":"2026-10-01T07:22:42Z","Subject":"27110493433","SubscriberId":"27110493433","ToR":"*voice","Usage":"30s"}}],"id":78}

#
T 2026/10/01 07:22:42.490224 127.0.0.1:2012 -> 127.0.0.1:39958 [AP] #11
{"id":78,"result":{"MatchedProfiles":["ATTR_TOLLFREE_REVERSE_BILLING"],"AlteredFields":["*req.Account","*req.OriginalCallingParty","*req.Subject"],"CGREvent":{"Tenant":"voice.lab.liquidtelecom.net","ID":"0f8a782","Time":"2026-10-01T07:22:42.488421555Z","Event":{"Account":"27110493484","Category":"call","Destination":"27110493484","DiameterIOI":"voice.lab.liquidtelecom.net","IMSChargingId":"a40d1b27dfdee610439fa9bd726a0020","OriginHost":"10.170.248.140","OriginID":"0gQAAC8WAAACBAAALxYAAOT+SbJTgs6ga/+KA53a7l/JrCXsXQ+UH...@10.170.248.200","OriginalCallingParty":"27110493433","RequestType":"*prepaid","RouteID":"voice.lab.liquidtelecom.net","SetupTime":"2026-10-01T07:22:42Z","Subject":"27110493484","SubscriberId":"27110493433","ToR":"*voice","Usage":"30s"}}},"error":null}

##
T 2026/10/01 07:22:42.490422 127.0.0.1:39958 -> 127.0.0.1:2012 [AP] #13
{"method":"ChargerSv1.ProcessEvent","params":[{"Tenant":"voice.lab.liquidtelecom.net","ID":"65e4c09","Time":null,"Event":{"Account":"27110493484","CGRID":"b783c240df451638861587e3a5dad63a33e21fa9","Category":"call","Destination":"27110493484","DiameterIOI":"voice.lab.liquidtelecom.net","IMSChargingId":"a40d1b27dfdee610439fa9bd726a0020","OriginHost":"10.170.248.140","OriginID":"0gQAAC8WAAACBAAALxYAAOT+SbJTgs6ga/+KA53a7l/JrCXsXQ+UH...@10.170.248.200","OriginalCallingParty":"27110493433","RequestType":"*prepaid","RouteID":"voice.lab.liquidtelecom.net","SetupTime":"2026-10-01T07:22:42Z","Subject":"27110493484","SubscriberId":"27110493433","ToR":"*voice","Usage":"30s"}}],"id":79}

#
T 2026/10/01 07:22:42.491189 127.0.0.1:39958 -> 127.0.0.1:2012 [AP] #14
{"method":"AttributeSv1.ProcessEvent","params":[{"AttributeIDs":["ATTR_TOLLFREE_REVERSE_BILLING","ATTR_ALLOW_CALLS"],"Context":"*chargers","ProcessRuns":null,"Tenant":"voice.lab.liquidtelecom.net","ID":"65e4c09","Time":null,"Event":{"Account":"27110493484","CGRID":"b783c240df451638861587e3a5dad63a33e21fa9","Category":"call","Destination":"27110493484","DiameterIOI":"voice.lab.liquidtelecom.net","IMSChargingId":"a40d1b27dfdee610439fa9bd726a0020","OriginHost":"10.170.248.140","OriginID":"0gQAAC8WAAACBAAALxYAAOT+SbJTgs6ga/+KA53a7l/JrCXsXQ+UH...@10.170.248.200","OriginalCallingParty":"27110493433","RequestType":"*prepaid","RouteID":"voice.lab.liquidtelecom.net","RunID":"*default","SetupTime":"2026-10-01T07:22:42Z","Subject":"27110493484","SubscriberId":"27110493433","ToR":"*voice","Usage":"30s"}}],"id":80}

##
T 2026/10/01 07:22:42.491372 127.0.0.1:2012 -> 127.0.0.1:39958 [AP] #16
{"id":80,"result":{"MatchedProfiles":["ATTR_TOLLFREE_REVERSE_BILLING"],"AlteredFields":["*req.Account","*req.OriginalCallingParty","*req.Subject"],"CGREvent":{"Tenant":"voice.lab.liquidtelecom.net","ID":"65e4c09","Time":null,"Event":{"Account":"27110493484","CGRID":"b783c240df451638861587e3a5dad63a33e21fa9","Category":"call","Destination":"27110493484","DiameterIOI":"voice.lab.liquidtelecom.net","IMSChargingId":"a40d1b27dfdee610439fa9bd726a0020","OriginHost":"10.170.248.140","OriginID":"0gQAAC8WAAACBAAALxYAAOT+SbJTgs6ga/+KA53a7l/JrCXsXQ+UH...@10.170.248.200","OriginalCallingParty":"27110493484","RequestType":"*prepaid","RouteID":"voice.lab.liquidtelecom.net","RunID":"*default","SetupTime":"2026-10-01T07:22:42Z","Subject":"27110493484","SubscriberId":"27110493433","ToR":"*voice","Usage":"30s"}}},"error":null}

#
T 2026/10/01 07:22:42.491512 127.0.0.1:2012 -> 127.0.0.1:39958 [AP] #17
{"id":79,"result":[{"ChargerSProfile":"DEFAULT","AttributeSProfiles":["ATTR_TOLLFREE_REVERSE_BILLING"],"AlteredFields":["*req.RunID","*req.Account","*req.OriginalCallingParty","*req.Subject"],"CGREvent":{"Tenant":"voice.lab.liquidtelecom.net","ID":"65e4c09","Time":null,"Event":{"Account":"27110493484","CGRID":"b783c240df451638861587e3a5dad63a33e21fa9","Category":"call","Destination":"27110493484","DiameterIOI":"voice.lab.liquidtelecom.net","IMSChargingId":"a40d1b27dfdee610439fa9bd726a0020","OriginHost":"10.170.248.140","OriginID":"0gQAAC8WAAACBAAALxYAAOT+SbJTgs6ga/+KA53a7l/JrCXsXQ+UH...@10.170.248.200","OriginalCallingParty":"27110493484","RequestType":"*prepaid","RouteID":"voice.lab.liquidtelecom.net","RunID":"*default","SetupTime":"2026-10-01T07:22:42Z","Subject":"27110493484","SubscriberId":"27110493433","ToR":"*voice","Usage":"30s"}}}],"error":null}

##
T 2026/10/01 07:22:42.491688 127.0.0.1:39958 -> 127.0.0.1:2012 [AP] #19
{"method":"Responder.MaxDebit","params":[{"Category":"call","Tenant":"voice.lab.liquidtelecom.net","Subject":"27110493484","Account":"27110493484","Destination":"27110493484","TimeStart":"2026-10-01T07:22:42Z","TimeEnd":"2026-10-01T07:23:12Z","LoopIndex":0,"DurationIndex":30000000000,"FallbackSubject":"","RatingInfos":null,"Increments":null,"ToR":"*voice","ExtraFields":{"DiameterIOI":"voice.lab.liquidtelecom.net","IMSChargingId":"a40d1b27dfdee610439fa9bd726a0020","OriginalCallingParty":"27110493484","RouteID":"voice.lab.liquidtelecom.net","SubscriberId":"27110493433"},"MaxRate":0,"MaxRateUnit":0,"MaxCostSoFar":0,"CgrID":"b783c240df451638861587e3a5dad63a33e21fa9","RunID":"*default","ForceDuration":false,"PerformRounding":false,"DenyNegativeAccount":false}],"id":81}

#
T 2026/10/01 07:22:42.492395 127.0.0.1:2012 -> 127.0.0.1:39958 [AP] #20
{"id":81,"result":{"Category":"call","Tenant":"voice.lab.liquidtelecom.net","Subject":"27110493484","Account":"27110493484","Destination":"27110493484","ToR":"*voice","Cost":5.0001,"Timespans":[{"TimeStart":"2026-10-01T07:22:42Z","TimeEnd":"2026-10-01T07:23:12Z","Cost":5.0001,"RateInterval":{"Timing":{"Years":[],"Months":[],"MonthDays":[],"WeekDays":[],"StartTime":"00:00:00","EndTime":""},"Rating":{"ConnectFee":0,"RoundingMethod":"*up","RoundingDecimals":4,"MaxCost":0,"MaxCostStrategy":"","Rates":[{"GroupIntervalStart":0,"Value":10,"RateIncrement":1000000000,"RateUnit":60000000000}]},"Weight":10},"DurationIndex":30000000000,"Increments":[{"Duration":1000000000,"Cost":0.16667,"BalanceInfo":{"Unit":null,"Monetary":{"UUID":"24cd9322-ea4d-4c4b-ba1d-c08f33d48000","ID":"*default","Value":-45.33746,"RateInterval":null},"AccountID":"voice.lab.liquidtelecom.net:27110493484"},"CompressFactor":30}],"RoundIncrement":null,"MatchedSubject":"*out:voice.lab.liquidtelecom.net:call:27110493484","MatchedPrefix":"271104","MatchedDestId":"SOUTH_AFRICA_FIXED_-_LIQUID","RatingPlanId":"RP_ZA_TIER3_2026","CompressFactor":1}],"RatedUsage":30000000000,"AccountSummary":{"Tenant":"voice.lab.liquidtelecom.net","ID":"27110493484","BalanceSummaries":[{"UUID":"24cd9322-ea4d-4c4b-ba1d-c08f33d48000","ID":"*default","Type":"*monetary","Value":-45.33746,"Disabled":false}],"AllowNegative":true,"Disabled":false}},"error":null}

#
T 2026/10/01 07:22:42.492637 10.170.56.131:2012 -> 10.170.56.112:41694 [AP] #21
{"id":34,"result":{"Attributes":{"MatchedProfiles":["ATTR_TOLLFREE_REVERSE_BILLING"],"AlteredFields":["*req.Account","*req.OriginalCallingParty","*req.Subject"],"CGREvent":{"Tenant":"voice.lab.liquidtelecom.net","ID":"0f8a782","Time":"2026-10-01T07:22:42.488421555Z","Event":{"Account":"27110493484","CGRID":"b783c240df451638861587e3a5dad63a33e21fa9","Category":"call","Destination":"27110493484","DiameterIOI":"voice.lab.liquidtelecom.net","IMSChargingId":"a40d1b27dfdee610439fa9bd726a0020","OriginHost":"10.170.248.140","OriginID":"0gQAAC8WAAACBAAALxYAAOT+SbJTgs6ga/+KA53a7l/JrCXsXQ+UH...@10.170.248.200","OriginalCallingParty":"27110493433","RequestType":"*prepaid","RouteID":"voice.lab.liquidtelecom.net","SetupTime":"2026-10-01T07:22:42Z","Subject":"27110493484","SubscriberId":"27110493433","ToR":"*voice","Usage":"30s"}}},"ResourceAllocation":null,"MaxUsage":30000000000,"ThresholdIDs":null,"StatQueueIDs":null},"error":null}

###
T 2026/10/01 07:22:42.731763 10.181.248.49:63475 -> 10.170.56.131:2080 [A] #24
......
######
T 2026/10/01 07:22:43.466372 10.181.248.49:51483 -> 10.170.56.131:2080 [A] #30
......
##
T 2026/10/01 07:22:43.789096 10.181.248.49:63475 -> 10.170.56.131:2080 [A] #32
......
##
T 2026/10/01 07:22:44.511657 10.181.248.49:51483 -> 10.170.56.131:2080 [A] #34
......
##
T 2026/10/01 07:22:44.827540 10.181.248.49:63475 -> 10.170.56.131:2080 [A] #36
......
##
T 2026/10/01 07:22:45.549444 10.181.248.49:51483 -> 10.170.56.131:2080 [A] #38
......
##
T 2026/10/01 07:22:45.954858 10.181.248.49:63475 -> 10.170.56.131:2080 [A] #40
......
##
T 2026/10/01 07:22:46.607183 10.181.248.49:51483 -> 10.170.56.131:2080 [A] #42
......
##
T 2026/10/01 07:22:47.010520 10.181.248.49:63475 -> 10.170.56.131:2080 [A] #44
......
##
T 2026/10/01 07:22:47.652376 10.181.248.49:51483 -> 10.170.56.131:2080 [A] #46
......
##
T 2026/10/01 07:22:48.056558 10.181.248.49:63475 -> 10.170.56.131:2080 [A] #48
......
##
T 2026/10/01 07:22:48.693456 10.181.248.49:51483 -> 10.170.56.131:2080 [A] #50
......
##
T 2026/10/01 07:22:49.095292 10.181.248.49:63475 -> 10.170.56.131:2080 [A] #52
......
##
T 2026/10/01 07:22:49.732899 10.181.248.49:51483 -> 10.170.56.131:2080 [A] #54
......
##
T 2026/10/01 07:22:50.141693 10.181.248.49:63475 -> 10.170.56.131:2080 [A] #56
......
##
T 2026/10/01 07:22:50.800478 10.181.248.49:51483 -> 10.170.56.131:2080 [A] #58
......
##
T 2026/10/01 07:22:51.197778 10.181.248.49:63475 -> 10.170.56.131:2080 [A] #60
......
##
T 2026/10/01 07:22:51.831507 10.181.248.49:51483 -> 10.170.56.131:2080 [A] #62
......
##
T 2026/10/01 07:22:52.240341 10.181.248.49:63475 -> 10.170.56.131:2080 [A] #64
......
##
T 2026/10/01 07:22:52.881483 10.181.248.49:51483 -> 10.170.56.131:2080 [A] #66
......
##
T 2026/10/01 07:22:53.284814 10.181.248.49:63475 -> 10.170.56.131:2080 [A] #68
......
#####
T 2026/10/01 07:22:53.708904 127.0.0.1:48106 -> 127.0.0.1:2012 [AP] #73
{"method":"CoreSv1.Status","params":[{"Tenant":"","APIKey":null,"RouteID":null}],"id":1}

##
T 2026/10/01 07:22:53.709189 127.0.0.1:2012 -> 127.0.0.1:48106 [AP] #75
{"id":1,"result":{"ActiveGoroutines":36,"GoVersion":"go1.26.2","MemoryUsage":"14.7MiB","NodeID":"liq-cgr-rals1-poc-jhb","RunningSince":"Fri Sep 25 08:16:32 UTC 2026","Version":"CGR...@v0.10.5"},"error":null}

#####
T 2026/10/01 07:22:53.923469 10.181.248.49:51483 -> 10.170.56.131:2080 [A] #80
......
##
T 2026/10/01 07:22:54.330327 10.181.248.49:63475 -> 10.170.56.131:2080 [A] #82
......
##
T 2026/10/01 07:22:54.972038 10.181.248.49:51483 -> 10.170.56.131:2080 [A] #84
......
##
T 2026/10/01 07:22:55.374287 10.181.248.49:63475 -> 10.170.56.131:2080 [A] #86
......
#####
T 2026/10/01 07:22:55.830486 127.0.0.1:48118 -> 127.0.0.1:2012 [AP] #91
{"method":"CoreSv1.Status","params":[{"Tenant":"","APIKey":null,"RouteID":null}],"id":1}

##
T 2026/10/01 07:22:55.831419 127.0.0.1:2012 -> 127.0.0.1:48118 [AP] #93
{"id":1,"result":{"ActiveGoroutines":36,"GoVersion":"go1.26.2","MemoryUsage":"14.7MiB","NodeID":"liq-cgr-rals1-poc-jhb","RunningSince":"Fri Sep 25 08:16:32 UTC 2026","Version":"CGR...@v0.10.5"},"error":null}

#####
T 2026/10/01 07:22:56.021898 10.181.248.49:51483 -> 10.170.56.131:2080 [A] #98
......
##
T 2026/10/01 07:22:56.422445 10.181.248.49:63475 -> 10.170.56.131:2080 [A] #100
......
##
T 2026/10/01 07:22:57.072947 10.181.248.49:51483 -> 10.170.56.131:2080 [A] #102
......
##
T 2026/10/01 07:22:57.466849 10.181.248.49:63475 -> 10.170.56.131:2080 [A] #104
......
##########
T 2026/10/01 07:22:58.122257 10.181.248.49:51483 -> 10.170.56.131:2080 [A] #114
......
######
T 2026/10/01 07:22:58.511330 10.181.248.49:63475 -> 10.170.56.131:2080 [A] #120
......
##
T 2026/10/01 07:22:59.170224 10.181.248.49:51483 -> 10.170.56.131:2080 [A] #122
......
##
T 2026/10/01 07:22:59.553593 10.181.248.49:63475 -> 10.170.56.131:2080 [A] #124
......
#####
T 2026/10/01 07:22:59.964497 127.0.0.1:44484 -> 127.0.0.1:2012 [AP] #129
{"method":"CoreSv1.Status","params":[{"Tenant":"","APIKey":null,"RouteID":null}],"id":1}

##
T 2026/10/01 07:22:59.965068 127.0.0.1:2012 -> 127.0.0.1:44484 [AP] #131
{"id":1,"result":{"ActiveGoroutines":36,"GoVersion":"go1.26.2","MemoryUsage":"14.8MiB","NodeID":"liq-cgr-rals1-poc-jhb","RunningSince":"Fri Sep 25 08:16:32 UTC 2026","Version":"CGR...@v0.10.5"},"error":null}

#####
T 2026/10/01 07:23:00.224515 10.181.248.49:51483 -> 10.170.56.131:2080 [A] #136
......
##
T 2026/10/01 07:23:00.603675 10.181.248.49:63475 -> 10.170.56.131:2080 [A] #138
......
##
T 2026/10/01 07:23:01.270288 10.181.248.49:51483 -> 10.170.56.131:2080 [A] #140
......
##
T 2026/10/01 07:23:01.632109 10.181.248.49:63475 -> 10.170.56.131:2080 [A] #142
......
##
T 2026/10/01 07:23:02.317350 10.181.248.49:51483 -> 10.170.56.131:2080 [A] #144
......
##
T 2026/10/01 07:23:02.677573 10.181.248.49:63475 -> 10.170.56.131:2080 [A] #146
......
##
T 2026/10/01 07:23:03.360513 10.181.248.49:51483 -> 10.170.56.131:2080 [A] #148
......
##
T 2026/10/01 07:23:03.727592 10.181.248.49:63475 -> 10.170.56.131:2080 [A] #150
......
##
T 2026/10/01 07:23:04.421126 10.181.248.49:51483 -> 10.170.56.131:2080 [A] #152
......
##
T 2026/10/01 07:23:04.774079 10.181.248.49:63475 -> 10.170.56.131:2080 [A] #154
......
##
T 2026/10/01 07:23:05.456570 10.181.248.49:51483 -> 10.170.56.131:2080 [A] #156
......
##
T 2026/10/01 07:23:05.813157 10.181.248.49:63475 -> 10.170.56.131:2080 [A] #158
......
##
T 2026/10/01 07:23:06.506113 10.181.248.49:51483 -> 10.170.56.131:2080 [A] #160
......
##
T 2026/10/01 07:23:06.855643 10.181.248.49:63475 -> 10.170.56.131:2080 [A] #162
......
##
T 2026/10/01 07:23:07.554015 10.181.248.49:51483 -> 10.170.56.131:2080 [A] #164
......
##
T 2026/10/01 07:23:07.896608 10.181.248.49:63475 -> 10.170.56.131:2080 [A] #166
......
##
T 2026/10/01 07:23:08.604785 10.181.248.49:51483 -> 10.170.56.131:2080 [A] #168
......
##
T 2026/10/01 07:23:08.936393 10.181.248.49:63475 -> 10.170.56.131:2080 [A] #170
......
##
T 2026/10/01 07:23:09.642961 10.181.248.49:51483 -> 10.170.56.131:2080 [A] #172
......
##
T 2026/10/01 07:23:09.974665 10.181.248.49:63475 -> 10.170.56.131:2080 [A] #174
......
##
T 2026/10/01 07:23:10.692054 10.181.248.49:51483 -> 10.170.56.131:2080 [A] #176
......
##
T 2026/10/01 07:23:11.024471 10.181.248.49:63475 -> 10.170.56.131:2080 [A] #178
......
##
T 2026/10/01 07:23:11.738653 10.181.248.49:51483 -> 10.170.56.131:2080 [A] #180
......
##
T 2026/10/01 07:23:12.065162 10.181.248.49:63475 -> 10.170.56.131:2080 [A] #182
......
##
T 2026/10/01 07:23:12.786773 10.181.248.49:51483 -> 10.170.56.131:2080 [A] #184
......
##
T 2026/10/01 07:23:13.114791 10.181.248.49:63475 -> 10.170.56.131:2080 [A] #186
......
##############
T 2026/10/01 07:23:13.834587 10.181.248.49:51483 -> 10.170.56.131:2080 [A] #200
......
##
T 2026/10/01 07:23:14.161027 10.181.248.49:63475 -> 10.170.56.131:2080 [A] #202
......
##
T 2026/10/01 07:23:14.873062 10.181.248.49:51483 -> 10.170.56.131:2080 [A] #204
......
##
T 2026/10/01 07:23:15.197664 10.181.248.49:63475 -> 10.170.56.131:2080 [A] #206
......
##
T 2026/10/01 07:23:15.918609 10.181.248.49:51483 -> 10.170.56.131:2080 [A] #208
......
##
T 2026/10/01 07:23:16.234455 10.181.248.49:63475 -> 10.170.56.131:2080 [A] #210
......
##
T 2026/10/01 07:23:16.969950 10.181.248.49:51483 -> 10.170.56.131:2080 [A] #212
......
##
T 2026/10/01 07:23:17.285152 10.181.248.49:63475 -> 10.170.56.131:2080 [A] #214
......
##
T 2026/10/01 07:23:18.029281 10.181.248.49:51483 -> 10.170.56.131:2080 [A] #216
......
##
T 2026/10/01 07:23:18.334418 10.181.248.49:63475 -> 10.170.56.131:2080 [A] #218
......
##
T 2026/10/01 07:23:19.084793 10.181.248.49:51483 -> 10.170.56.131:2080 [A] #220
......
##
T 2026/10/01 07:23:19.365729 10.181.248.49:63475 -> 10.170.56.131:2080 [A] #222
......
##
T 2026/10/01 07:23:20.128032 10.181.248.49:51483 -> 10.170.56.131:2080 [A] #224
......
##
T 2026/10/01 07:23:20.406824 10.181.248.49:63475 -> 10.170.56.131:2080 [A] #226
......
##
T 2026/10/01 07:23:21.167168 10.181.248.49:51483 -> 10.170.56.131:2080 [A] #228
......
##
T 2026/10/01 07:23:21.448183 10.181.248.49:63475 -> 10.170.56.131:2080 [A] #230
......
##
T 2026/10/01 07:23:22.204525 10.181.248.49:51483 -> 10.170.56.131:2080 [A] #232
......
##
T 2026/10/01 07:23:22.501778 10.181.248.49:63475 -> 10.170.56.131:2080 [A] #234
......
##
T 2026/10/01 07:23:23.249636 10.181.248.49:51483 -> 10.170.56.131:2080 [A] #236
......
##
T 2026/10/01 07:23:23.546418 10.181.248.49:63475 -> 10.170.56.131:2080 [A] #238
......
##
T 2026/10/01 07:23:23.657011 10.170.56.112:41694 -> 10.170.56.131:2012 [AP] #240
{"method":"SessionSv1.TerminateSession","params":[{"TerminateSession":true,"ForceDuration":false,"ReleaseResources":false,"ProcessThresholds":false,"ProcessStats":false,"ThresholdIDs":null,"StatIDs":null,"Tenant":"voice.lab.liquidtelecom.net","ID":"e78b067","Time":"2026-10-01T07:23:23.656370743Z","Event":{"Account":"27110493433","AnswerTime":"2026-10-01T07:23:12Z","Category":"call","Destination":"27110493484","DiameterIOI":"voice.lab.liquidtelecom.net","IMSChargingId":"a40d1b27dfdee610439fa9bd726a0020","OriginHost":"10.170.248.140","OriginID":"0gQAAC8WAAACBAAALxYAAOT+SbJTgs6ga/+KA53a7l/JrCXsXQ+UH...@10.170.248.200","RequestType":"*prepaid","RouteID":"voice.lab.liquidtelecom.net","Subject":"27110493433","SubscriberId":"27110493433","ToR":"*voice","Usage":11000000000}}],"id":35}

#
T 2026/10/01 07:23:23.657644 127.0.0.1:39958 -> 127.0.0.1:2012 [AP] #241
{"method":"Responder.RefundIncrements","params":[{"Category":"call","Tenant":"voice.lab.liquidtelecom.net","Subject":"27110493484","Account":"27110493484","Destination":"27110493484","TimeStart":"0001-01-01T00:00:00Z","TimeEnd":"0001-01-01T00:00:00Z","LoopIndex":0,"DurationIndex":0,"FallbackSubject":"","RatingInfos":null,"Increments":[{"Duration":1000000000,"Cost":0.16667,"BalanceInfo":{"Unit":null,"Monetary":{"UUID":"24cd9322-ea4d-4c4b-ba1d-c08f33d48000","ID":"","Value":0,"RateInterval":null},"AccountID":"voice.lab.liquidtelecom.net:27110493484"},"CompressFactor":19}],"ToR":"*voice","ExtraFields":{"DiameterIOI":"voice.lab.liquidtelecom.net","IMSChargingId":"a40d1b27dfdee610439fa9bd726a0020","OriginalCallingParty":"27110493484","RouteID":"voice.lab.liquidtelecom.net","SubscriberId":"27110493433"},"MaxRate":0,"MaxRateUnit":0,"MaxCostSoFar":0,"CgrID":"b783c240df451638861587e3a5dad63a33e21fa9","RunID":"*default","ForceDuration":false,"PerformRounding":false,"DenyNegativeAccount":false}],"id":82}

#
T 2026/10/01 07:23:23.658439 127.0.0.1:2012 -> 127.0.0.1:39958 [AP] #242
{"id":82,"result":{"ID":"voice.lab.liquidtelecom.net:27110493484","BalanceMap":{"*monetary":[{"Uuid":"24cd9322-ea4d-4c4b-ba1d-c08f33d48000","ID":"*default","Value":-42.17073,"ExpirationDate":"0001-01-01T00:00:00Z","Weight":0,"DestinationIDs":null,"RatingSubject":"","Categories":null,"SharedGroups":null,"Timings":null,"TimingIDs":null,"Disabled":false,"Factor":null,"Blocker":false}]},"UnitCounters":null,"ActionTriggers":null,"AllowNegative":true,"Disabled":false,"UpdateTime":"2026-10-01T07:23:23.658200368Z"},"error":null}

##
T 2026/10/01 07:23:23.658632 127.0.0.1:39958 -> 127.0.0.1:2012 [AP] #244
{"method":"Responder.RefundRounding","params":[{"Category":"call","Tenant":"voice.lab.liquidtelecom.net","Subject":"27110493484","Account":"27110493484","Destination":"27110493484","TimeStart":"0001-01-01T00:00:00Z","TimeEnd":"0001-01-01T00:00:00Z","LoopIndex":0,"DurationIndex":0,"FallbackSubject":"","RatingInfos":null,"Increments":[{"Duration":0,"Cost":0.00002999999999997449,"BalanceInfo":{"Unit":null,"Monetary":{"UUID":"24cd9322-ea4d-4c4b-ba1d-c08f33d48000","ID":"","Value":0,"RateInterval":null},"AccountID":"voice.lab.liquidtelecom.net:27110493484"},"CompressFactor":1}],"ToR":"*voice","ExtraFields":{"DiameterIOI":"voice.lab.liquidtelecom.net","IMSChargingId":"a40d1b27dfdee610439fa9bd726a0020","OriginalCallingParty":"27110493484","RouteID":"voice.lab.liquidtelecom.net","SubscriberId":"27110493433"},"MaxRate":0,"MaxRateUnit":0,"MaxCostSoFar":0,"CgrID":"b783c240df451638861587e3a5dad63a33e21fa9","RunID":"*default","ForceDuration":false,"PerformRounding":false,"DenyNegativeAccount":false}],"id":83}

#
T 2026/10/01 07:23:23.659182 127.0.0.1:2012 -> 127.0.0.1:39958 [AP] #245
{"id":83,"result":{"ID":"voice.lab.liquidtelecom.net:27110493484","BalanceMap":{"*monetary":[{"Uuid":"24cd9322-ea4d-4c4b-ba1d-c08f33d48000","ID":"*default","Value":-42.17076,"ExpirationDate":"0001-01-01T00:00:00Z","Weight":0,"DestinationIDs":null,"RatingSubject":"","Categories":null,"SharedGroups":null,"Timings":null,"TimingIDs":null,"Disabled":false,"Factor":null,"Blocker":false}]},"UnitCounters":null,"ActionTriggers":null,"AllowNegative":true,"Disabled":false,"UpdateTime":"2026-10-01T07:23:23.658973739Z"},"error":null}

#
T 2026/10/01 07:23:23.659393 10.170.56.131:2012 -> 10.170.56.112:41694 [AP] #246
{"id":35,"result":"OK","error":null}

##
T 2026/10/01 07:23:23.662866 10.170.56.112:41694 -> 10.170.56.131:2012 [AP] #248
{"method":"SessionSv1.ProcessCDR","params":[{"Tenant":"voice.lab.liquidtelecom.net","ID":"e78b067","Time":"2026-10-01T07:23:23.656370743Z","Event":{"Account":"27110493433","AnswerTime":"2026-10-01T07:23:12Z","Category":"call","Destination":"27110493484","DiameterIOI":"voice.lab.liquidtelecom.net","IMSChargingId":"a40d1b27dfdee610439fa9bd726a0020","OriginHost":"10.170.248.140","OriginID":"0gQAAC8WAAACBAAALxYAAOT+SbJTgs6ga/+KA53a7l/JrCXsXQ+UH...@10.170.248.200","RequestType":"*prepaid","RouteID":"voice.lab.liquidtelecom.net","Subject":"27110493433","SubscriberId":"27110493433","ToR":"*voice","Usage":11000000000}}],"id":36}

#
T 2026/10/01 07:23:23.663150 127.0.0.1:39958 -> 127.0.0.1:2012 [AP] #249
{"method":"CDRsV1.ProcessEvent","params":[{"Flags":["*chargers:false","*attributes:false"],"Tenant":"voice.lab.liquidtelecom.net","ID":"74ed5fc","Time":null,"Event":{"Account":"27110493484","AnswerTime":"2026-10-01T07:23:12Z","CGRID":"b783c240df451638861587e3a5dad63a33e21fa9","Category":"call","Cost":1.8334,"CostDetails":"{\"CGRID\":\"b783c240df451638861587e3a5dad63a33e21fa9\",\"RunID\":\"*default\",\"StartTime\":\"2026-10-01T07:22:42Z\",\"Usage\":11000000000,\"Cost\":1.8334,\"Charges\":[{\"RatingID\":\"5ff5c06\",\"Increments\":[{\"Usage\":1000000000,\"Cost\":0.16667,\"AccountingID\":\"4bb3154\",\"CompressFactor\":11},{\"Usage\":0,\"Cost\":0.00002999999999997449,\"AccountingID\":\"f8100d5\",\"CompressFactor\":1}],\"CompressFactor\":1}],\"AccountSummary\":{\"Tenant\":\"voice.lab.liquidtelecom.net\",\"ID\":\"27110493484\",\"BalanceSummaries\":[{\"UUID\":\"24cd9322-ea4d-4c4b-ba1d-c08f33d48000\",\"ID\":\"*default\",\"Type\":\"*monetary\",\"Value\":-42.17076,\"Disabled\":false}],\"AllowNegative\":true,\"Disabled\":false},\"Rating\":{\"5ff5c06\":{\"ConnectFee\":0,\"RoundingMethod\":\"*up\",\"RoundingDecimals\":4,\"MaxCost\":0,\"MaxCostStrategy\":\"\",\"TimingID\":\"bece255\",\"RatesID\":\"4204003\",\"RatingFiltersID\":\"882d045\"}},\"Accounting\":{\"4bb3154\":{\"AccountID\":\"voice.lab.liquidtelecom.net:27110493484\",\"BalanceUUID\":\"24cd9322-ea4d-4c4b-ba1d-c08f33d48000\",\"RatingID\":\"\",\"Units\":0.16667,\"ExtraChargeID\":\"\"},\"f8100d5\":{\"AccountID\":\"voice.lab.liquidtelecom.net:27110493484\",\"BalanceUUID\":\"24cd9322-ea4d-4c4b-ba1d-c08f33d48000\",\"RatingID\":\"*rounding\",\"Units\":0.00002999999999997449,\"ExtraChargeID\":\"\"}},\"RatingFilters\":{\"882d045\":{\"DestinationID\":\"SOUTH_AFRICA_FIXED_-_LIQUID\",\"DestinationPrefix\":\"271104\",\"RatingPlanID\":\"RP_ZA_TIER3_2026\",\"Subject\":\"*out:voice.lab.liquidtelecom.net:call:27110493484\"}},\"Rates\":{\"4204003\":[{\"GroupIntervalStart\":0,\"Value\":10,\"RateIncrement\":1000000000,\"RateUnit\":60000000000}]},\"Timings\":{\"bece255\":{\"Years\":[],\"Months\":[],\"MonthDays\":[],\"WeekDays\":[],\"StartTime\":\"00:00:00\"}}}","CostSource":"*sessions","Destination":"27110493484","DiameterIOI":"voice.lab.liquidtelecom.net","IMSChargingId":"a40d1b27dfdee610439fa9bd726a0020","OriginHost":"10.170.248.140","OriginID":"0gQAAC8WAAACBAAALxYAAOT+SbJTgs6ga/+KA53a7l/JrCXsXQ+UH...@10.170.248.200","OriginalCallingParty":"27110493484","RequestType":"*prepaid","RouteID":"voice.lab.liquidtelecom.net","RunID":"*default","SetupTime":"2026-10-01T07:22:42Z","Subject":"27110493484","SubscriberId":"27110493433","ToR":"*voice","Usage":11000000000}}],"id":84}

#
T 2026/10/01 07:23:23.663670 10.170.56.131:54728 -> 10.170.56.141:2012 [AP] #250
{"method":"StatSv1.ProcessEvent","params":[{"StatIDs":null,"Tenant":"voice.lab.liquidtelecom.net","ID":"74ed5fc","Time":null,"Event":{"Account":"27110493484","AnswerTime":"2026-10-01T07:23:12Z","CGRID":"b783c240df451638861587e3a5dad63a33e21fa9","Category":"call","Cost":1.8334,"CostDetails":"{\"CGRID\":\"b783c240df451638861587e3a5dad63a33e21fa9\",\"RunID\":\"*default\",\"StartTime\":\"2026-10-01T07:22:42Z\",\"Usage\":11000000000,\"Cost\":1.8334,\"Charges\":[{\"RatingID\":\"5ff5c06\",\"Increments\":[{\"Usage\":1000000000,\"Cost\":0.16667,\"AccountingID\":\"4bb3154\",\"CompressFactor\":11},{\"Usage\":0,\"Cost\":0.00002999999999997449,\"AccountingID\":\"f8100d5\",\"CompressFactor\":1}],\"CompressFactor\":1}],\"AccountSummary\":{\"Tenant\":\"voice.lab.liquidtelecom.net\",\"ID\":\"27110493484\",\"BalanceSummaries\":[{\"UUID\":\"24cd9322-ea4d-4c4b-ba1d-c08f33d48000\",\"ID\":\"*default\",\"Type\":\"*monetary\",\"Value\":-42.17076,\"Disabled\":false}],\"AllowNegative\":true,\"Disabled\":false},\"Rating\":{\"5ff5c06\":{\"ConnectFee\":0,\"RoundingMethod\":\"*up\",\"RoundingDecimals\":4,\"MaxCost\":0,\"MaxCostStrategy\":\"\",\"TimingID\":\"bece255\",\"RatesID\":\"4204003\",\"RatingFiltersID\":\"882d045\"}},\"Accounting\":{\"4bb3154\":{\"AccountID\":\"voice.lab.liquidtelecom.net:27110493484\",\"BalanceUUID\":\"24cd9322-ea4d-4c4b-ba1d-c08f33d48000\",\"RatingID\":\"\",\"Units\":0.16667,\"ExtraChargeID\":\"\"},\"f8100d5\":{\"AccountID\":\"voice.lab.liquidtelecom.net:27110493484\",\"BalanceUUID\":\"24cd9322-ea4d-4c4b-ba1d-c08f33d48000\",\"RatingID\":\"*rounding\",\"Units\":0.00002999999999997449,\"ExtraChargeID\":\"\"}},\"RatingFilters\":{\"882d045\":{\"DestinationID\":\"SOUTH_AFRICA_FIXED_-_LIQUID\",\"DestinationPrefix\":\"271104\",\"RatingPlanID\":\"RP_ZA_TIER3_2026\",\"Subject\":\"*out:voice.lab.liquidtelecom.net:call:27110493484\"}},\"Rates\":{\"4204003\":[{\"GroupIntervalStart\":0,\"Value\":10,\"RateIncrement\":1000000000,\"RateUnit\":60000000000}]},\"Timings\":{\"bece255\":{\"Years\":[],\"Months\":[],\"MonthDays\":[],\"WeekDays\":[],\"StartTime\":\"00:00:00\"}}}","CostSource":"*sessions","Destination":"27110493484","DiameterIOI":"voice.lab.liquidtelecom.net","IMSChargingId":"a40d1b27dfdee610439fa9bd726a0020","OriginHost":"10.170.248.140","OriginID":"0gQAAC8WAAACBAAALxYAAOT+SbJTgs6ga/+KA53a7l/JrCXsXQ+UH...@10.170.248.200","OriginalCallingParty":"27110493484","RequestType":"*prepaid","RouteID":"voice.lab.liquidtelecom.net","RunID":"*default","SetupTime":"2026-10-01T07:22:42Z","Subject":"27110493484","SubscriberId":"27110493433","ToR":"*voice","Usage":11000000000}}],"id":10}

####
T 2026/10/01 07:23:23.704494 10.170.56.141:2012 -> 10.170.56.131:54728 [AP] #254
{"id":10,"result":["StatQueueProfile_VoiceStats"],"error":null}

##
T 2026/10/01 07:23:23.705178 127.0.0.1:2012 -> 127.0.0.1:39958 [AP] #256
{"id":84,"result":"OK","error":null}

#
T 2026/10/01 07:23:23.705239 10.170.56.131:2012 -> 10.170.56.112:41694 [AP] #257
{"id":36,"result":"OK","error":null}

###
T 2026/10/01 07:23:24.307070 10.181.248.49:51483 -> 10.170.56.131:2080 [A] #260
......
##
T 2026/10/01 07:23:24.584230 10.181.248.49:63475 -> 10.170.56.131:2080 [A] #262
......
##
T 2026/10/01 07:23:25.338106 10.181.248.49:51483 -> 10.170.56.131:2080 [A] #264
......
##
T 2026/10/01 07:23:25.623762 10.181.248.49:63475 -> 10.170.56.131:2080 [A] #266
......
#^Cexit
267 received, 115 matched

and I have attached the .json config - kindly have a look.

BR,

Simba



--
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/09d20cc5-a6de-4f35-9ddc-f64b8c87de99n%40googlegroups.com.
cgrates json file.txt

Armir Veliaj

unread,
Oct 1, 2026, 1:25:57 PM (8 days ago) Oct 1
to CGRateS
 Hi Simba,

Your ngrep capture confirms that the attribute profile runs twice: once in *sessions (correct), and again in ChargerS, because your ChargerProfile DEFAULT lists ATTR_TOLLFREE_REVERSE_BILLING in its AttributeIDs. By then Account is already 27110493484, so OriginalCallingParty gets overwritten with the B-number. That altered event is what goes to MaxDebit and the CDR.

To avoid the duplicate execution, update the ChargerProfile DEFAULT (ApierV1.SetChargerProfile) and remove ATTR_TOLLFREE_REVERSE_BILLING from AttributeIDs, keeping only ATTR_ALLOW_CALLS.

Hope it helps,

Thanks,
Armir

simba masamba

unread,
Oct 2, 2026, 6:03:45 AM (8 days ago) Oct 2
to cgr...@googlegroups.com
Hi Armir,

Thanks for checking, the changes I made are:

{
    "method": "ApierV1.SetAttributeProfile",
    "params":[{
    "Tenant":{{POC-Tenant}},
    "ID":"ATTR_TOLLFREE_REVERSE_BILLING",
    "Contexts":["*sessions"],
    "FilterIDs":["FLTR_TOLLFREE_DEST"],

Where I have changed context to only * sessions then I removed the ALL attributes under the Default CHargerS profile: {
    "id": 7,
    "result": {
        "Tenant": "voice.lab.liquidtelecom.net",
        "ID": "DEFAULT",
        "FilterIDs": [],
        "ActivationInterval": null,
        "RunID": "*default",
        "AttributeIDs": [
            "*none"
        ],
        "Weight": 10
    },
    "error": null
} If I then check the CDR its appearing OK now: getCDRs-Correct-CLI.png
Tested all other calls and they are still being processed fine. Let me know if there are any gaps in my logic but thanks so far! BR,


Armir Veliaj

unread,
Oct 2, 2026, 8:00:06 AM (8 days ago) Oct 2
to cgr...@googlegroups.com
Hi Simba,

Yes it looks fine now, and if that is your desired scenario, you can leave those changes unless you want to modify in future.

Thanks,
Armir

simba masamba

unread,
Oct 5, 2026, 2:13:46 AM (5 days ago) Oct 5
to cgr...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages