From b7887e39cfbbb59d3834bf7098a9baae7945fcaf Mon Sep 17 00:00:00 2001 From: Dennis Grunert Date: Wed, 10 Jan 2024 12:25:57 +0100 Subject: [PATCH] Changed AOC-D encoding value of TypeOfChargingInfo from Total to SubTotal encodeAOCDChargingUnitOperation() set the value of TypeOfChargingInfo to Total, which results in ISDN phones not correctly displaying increasing units. Setting it to SubTotal fixed the issue. --- src/libmisdnuser/suppserv/fac.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libmisdnuser/suppserv/fac.c b/src/libmisdnuser/suppserv/fac.c index dd55857..43c588a 100644 --- a/src/libmisdnuser/suppserv/fac.c +++ b/src/libmisdnuser/suppserv/fac.c @@ -406,7 +406,7 @@ static int encodeAOCDChargingUnitOperation(__u8 * dest, const struct asn1_parm * p[i++] = 0x30; p[i++] = (0x02 + len); p[i++] = 0x02; // Operation Tag - p[i++] = 0x01; // AOC-D so Sub-Total + p[i++] = 0x01; // Recorded units could take up as much as 3 bytes (0xFFFFFF) p[i] = numberOfUnits & 0xFF; @@ -416,9 +416,9 @@ static int encodeAOCDChargingUnitOperation(__u8 * dest, const struct asn1_parm * p[i+2] = (numberOfUnits >> 16) & 0xFF; i += len; - p[i++] = 0x82; - p[i++] = 0x01; + p[i++] = 0x82; // Type of charging info p[i++] = 0x01; + p[i++] = 0x00; // AOC-D so Sub-Total p[1] = (AOCD_CHARGE_UNIT_IE_LENGTH + len); // IE Payload Length p[4] = p[1] - 3; // Invoke Component Length