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.
This commit is contained in:
Dennis Grunert 2024-01-10 12:25:57 +01:00
parent 98e7813e77
commit 80864347f3
1 changed files with 3 additions and 3 deletions

View File

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