-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Decoding aChBillingChargingCharacteristics in CAP #23
Comments
I've done some more digging on this,
Which I don't get if I don't change the ASN1 spec, I've also tried checking out the commit that was current at the time of the ticket in case there were other changes in the repo that led to this, but no dice sadly. |
The definition of
It's an OCTET STRING which is constrained with SIZE and CONSTRAINED BY:
If you change the definition to :
This is formally defined and supported, meaning the content of the OCTET STRING would correspond to the BER-encoded buffer of the contained object. But as you checked: this is failing. This means the buffer within Let's check why:
So, something looks invalid in the buffer. That's why the contained object can't decode the OCTET STRING buffer. |
Ended up fixing this with help from Anton who raised the original issue on the old repo. The missing part of the puzzle was to also update the definition of And the result:
Hopefully this will help anyone else who stumbles across this, happy to close now. Can I raise a PR with the schema changes, or would you prefer to leave them as-is @mitshell ? |
The current Camel ASN.1 definition is extracted (semi-automatically) from the corresponding 3GPP specification. Do not hesitate to share some more ideas on this. Thanks for your help |
G'day folks,
I've been pulling my hair out thanks to an issue parsing
aChBillingChargingCharacteristics
in CAP.My code is very simple, I take the raw hex, covert to bytes, decode into a PyCrate CAP object:
This yields:
Which is perfect except aChBillingChargingCharacteristics isn't decoded.
I can see this issue from the old repo that suggested the resolution was to change the ASN1 spec, then recompiling, but after following that (and double checking I was calling the updated libraries) I've got the same behavior.
I'm not sure if I'm just using it wrong - I can create a new
AChBillingChargingCharacteristics
object fromCAP_datatypes
with:x = TCAP_CAP.CAP_datatypes.AChBillingChargingCharacteristics
and then try to decode the contents withx.from_ber(unhexlify(a00980020122a1030101ff))
but that gives me:I know I'm probably missing something stupid simple, but I'd appreciate any pointers,
Cheers,
Nick
The text was updated successfully, but these errors were encountered: