Pular para conteúdo

How I Solved the "RTP read too short" Error in FreePBX

Symptom

  • Outbound calls made via softphone (such as MicroSIP, Zoiper, etc.).
  • The call would stay in "dialing" state, with no audio.
  • After 30 seconds, the call was automatically dropped.
  • The following message appeared in the Asterisk console logs:
RTP read too short

This behavior indicates that the server is not receiving RTP packets correctly — usually due to network issues, NAT, or IPv6 conflicts.

Diagnosis with tcpdump

On the terminal of the Debian VM (running FreePBX on Proxmox), I used the following command to capture RTP packets:

tcpdump -n -i any udp portrange 40000-55000

During a test call, I noticed that RTP traffic was arriving via IPv6, as shown in the example below:

IP6 2001:db8::abcd.5060 > 2001:db8::1234.40002: UDP, length 20

By default, Asterisk was not handling RTP traffic over IPv6 properly, which led to the RTP read too short error and the call being dropped after 30 seconds (RTP timeout due to lack of audio).

Solution

The solution was to disable IPv6 directly on the Mikrotik router, which was distributing IPv6 addresses to the internal network.

Result

After disabling IPv6 on the Mikrotik:

  • The softphone started completing calls normally.
  • Audio worked in both directions.
  • The call no longer dropped after 30 seconds.
  • The RTP read too short error disappeared from the Asterisk logs.

Tip

Even if FreePBX is configured to work only over IPv4, softphones may still use IPv6 automatically if it's available on the network. This can cause issues when Asterisk does not handle mixed (IPv4/IPv6) traffic properly.

If you don’t need IPv6 in your network, the simplest fix is to disable it at the router level (Mikrotik) to avoid similar problems.