You could try simplifying things, such as eliminating the use of opus. That would be a codec that realistically not many are using, let alone in combination with recordings.
I did what you said jcolp and the codec opus wasn’t the real problem and changed for ulaw got worse, I discovered that in the network communication had a jitter problem, I used the HOMER SERVER to capture the jitter error but wasn’t very clear, then I changed some agents for softphone and by wireshark was clear to understand the exact point of the problem on the call audio.
I would like to know a better way to capture messages and audio between pjsip and wireshark in this case, I tried to used sngrep with hep than i can see all messages but when i open in wireshark can’t listen the rtp audio.