You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hope you doing well. I'm trying to decode CDR from telecom. When i decode the CDR file (Which contains a lot of CDR), only the first CDR is decoded CDR.zip
Do you have a tips for me please?
I would really appreciate your help guys.
Thanks
The text was updated successfully, but these errors were encountered:
Hi @Benjalill ,
The .decode() method of the compiled schema will only decode the first record from the start of the byte data provided.
In order to decode multiple records you need to determine the length of each record decoded and then provide the data for the next record.
Something like:
schema = asn1tools.compile_files("CDR/cfx.asn")
with open("CDR/cdr", 'rb') as f:
file_data = f.read()
records = []
index = 0
file_len = len(file_data)
while index < file_len:
decoded_record, record_length = schema.decode_with_length('IMSRecord', file_data[index:])
index += record_length
records.append(decoded_record)
Hello Eriq and Arsalan,
Hope you doing well. I'm trying to decode CDR from telecom. When i decode the CDR file (Which contains a lot of CDR), only the first CDR is decoded
CDR.zip
Do you have a tips for me please?
I would really appreciate your help guys.
Thanks
The text was updated successfully, but these errors were encountered: