Can Asterisk Record voice with the functionality of Jitter Buffer

As I understand Asterisk dump the raw voice data while recording and if packets arrive out of order then recorded file will also have the same problem (bad quality recording files).

In real-time we can solve it using Jitter Buffer functionality so my question is can we apply the same functionality for recording or is it automatically applied if Jitter Buffer is being used.

Or is there any possibility to dump the voice packets with some kind of timestamp information which can be used to reorder before playing the recording files.

I believe it would be automatically applied if the jitterbuffer is enabled.

OK, can you please suggest if you happen to know whether or not is there a way i can test this by somehow deliberately creating the out of order packets situation and then verify in Asterisk that it actually correctly dumped those packets.

There’s nothing inherently built in to cause out of order packets. You’d need to do it externally or modify the code to somehow make them out of order.

Ok, i’ll try to find some way to test these scenarios.
Thanks Joshua