Closed vazir closed 1 year ago
Dear @p1-bmu Benoit Michau,
Tryed to manually recompile the TCAP_CAP with
./pycrate_asn1compile.py -s TCAP_CAP
and noticed the
INF: CAP-datatypes.AChBillingChargingCharacteristics, unprocessed CONSTRAINED BY constraint
May it be the reason? And... is there a way to fix?
You're correct.
The definition for AChBillingChargingCharacteristics
is here:
https://github.com/P1sec/pycrate/blob/da145b1c39ad4edd4a90216ba6c56119eb877825/pycrate_asn1dir/Pycrate_TCAP_CAP/CAP-datatypes.asn#L74
It's an OCTET STRING, with a CONSTRAINED BY constraint, which is not supported by Pycrate, as it is used in very different ways depending of the protocols, and is not very well defined by the ASN.1 specification itself. So, the object is just handled as an OCTET STRING in Pycrate.
If you want the full decoding of its content, you can try the CONTAINING constraint, which is supported by Pycrate. You will need to change the ASN.1 definition to something like this:
AChBillingChargingCharacteristics {PARAMETERS-BOUND : bound} ::= OCTET STRING (SIZE
(bound.&minAChBillingChargingLength .. bound.&maxAChBillingChargingLength))
(CONTAINING CAMEL-AChBillingChargingCharacteristics {bound})
And recompile the TCAP-CAP specification.
@p1-bmu It did worked like a charm... You are real magician!
basicROS : invoke : { invokeId present : 2, opcode local : 35, argument ApplyChargingArg: { aChBillingChargingCharacteristics CAMEL-AChBillingChargingCharacteristics: timeDurationCharging : { maxCallPeriodDuration 600 } } },
@p1-bmu I was dancing arround it for a whole day, got the .asn from wireshark (which have it remade plainly - no classes), compiling it with asn1tools (which did partially worked, giving very weird results) . And you just resolved it with a snap of fingers :) Thank you so much :)
Thank you for your kind feedback @vazir
Hello
Trying to parse CAP reply to the IDP , and stuck the part of reply was not completely parsed
while in the wireshark i can see all the parsed part, the pycrate leaves the parameter encoded
and in the wireshark it is![image](https://user-images.githubusercontent.com/919929/233339626-a056a1b8-8501-4941-91b7-833c58611a57.png)
searching in the pycrate code I did not find a timeDurationCharging parse code, but it is exists in the CAP-datatypes.asn Is there a way to include it so the message is parsed completely?