A method of constructing Call Data Records, CDRs, relating to a packet-switched call on the basis of data received from network elements participating in the call, the method comprising receiving a plurality of data records relating to the call from the network elements, wherein each of the data records has an information content, analysing at least part of the information content of each of the data records, and responsive to the analysed information content, initializing a plurality of simultaneously existing partial records containing information relating to the call in an in-memory database and updating the plurality of partial records in the in-memory database, wherein said updating the plurality of simultaneously existing partial records comprises at least once updating at least two partial records responsive to the analysed information content of a single data record in said plurality of data records, and constructing the CDRs on the basis of the information in the partial records, characterized by receiving a data record indicating that a first terminal originates a new call directed to a group of terminating terminals containing a plurality of second terminals (T2, T3), analysing at least part of the information content of the data record in order to find out the channels engaged in the call, and responsive to the analysed information content: initializing (401, 402, 403) a partial record for each of said channels engaged in the call, and additionally initializing at least one partial record for each terminal relating to the call, or if the relevant partial record or records already exist, updating the relevant partial record or partial records instead of initializing a new partial record or new partial records. receiving a plurality of data records relating to the call from the network elements, wherein each of the data records has an information content, analysing at least part of the information content of each of the data records, and responsive to the analysed information content, initializing a plurality of simultaneously existing partial records containing information relating to the call in an in-memory database and updating the plurality of partial records in the in-memory database, wherein said updating the plurality of simultaneously existing partial records comprises at least once updating at least two partial records responsive to the analysed information content of a single data record in said plurality of data records, and constructing the CDRs on the basis of the information in the partial records, characterized by receiving a data record indicating that a first terminal originates a new call directed to a group of terminating terminals containing a plurality of second terminals (T2, T3), analysing at least part of the information content of the data record in order to find out the channels engaged in the call, and responsive to the analysed information content: initializing (401, 402, 403) a partial record for each of said channels engaged in the call, and additionally initializing at least one partial record for each terminal relating to the call, or if the relevant partial record or records already exist, updating the relevant partial record or partial records instead of initializing a new partial record or new partial records. initializing (401, 402, 403) a partial record for each of said channels engaged in the call, and additionally initializing at least one partial record for each terminal relating to the call, or if the relevant partial record or records already exist, updating the relevant partial record or partial records instead of initializing a new partial record or new partial records.