Asterisk misses RTP outgoing packets in Bridge

Hi all!
I got stranged behaviour when bridging calls.
I have two PBX-s. First - PBX-1, Second -GATEWAY-1(asterisk version 13.38.1).
User endpoints are registered on PBX-1.
There is sip trunk between PBX-1 and GATEWAY-1.
And VoIP providers trunked on GATEWAY-1.
When calling from user to external number SIP and RTP traffic goes from PBX-1 through GATEWAY-1 to VoIP provider. First, the Playback greeting sounds to a callee. Then caller answers.
When caller answers, first 10 seconds there are gaps in voice, regardless whether recording is enabled or not.
Wireshark shows that RTP arrives in call leg PBX-1 <-> GATEWAY-1 completely without any losses. And then some packets (near 300-350 packets, usually always) do not go out to another call leg (GATEWAY <-> VoIP provider) in Bridge. RTP Sequens numbers in outgoing RTP are consistent (from point of view of Wireshark), so there are any RTP losses (it is not network issue). But delta shows, that there are large delays between two sequential RTP outgoing packets.
Asterisk debug log says:

res_rtp_asterisk.c: Got  RTP packet from IP:port
res_rtp_asterisk.c: Received frame with no data for RTP instance '0x7fb248a2b578' so dropping frame

If recording is enabled, additional debug info is appearing:

audiohook.c: Flushing audiohook 0x7fb2489f5c00 so it remains in sync

Pakets are not sending out to VoiP Provider.
It is almost always happens first 10 seconds after playback greeting record and never when playback is absent.

Asterisk is VM on Proxmox.
I moved asterisk to NVMe storage disk, but it doesn’t affect issue.

Also posted as RTP Packet Loss in Bridge after playback greeting - General Help - FreePBX Community Forums

Also I want mention, that on another gateway with such a asterisk version (13.38.1) behaviour still remain the same. Voice chrashes first 10 seconds after playback greeting record towards the VoIP provider trunk.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.