Oh dear... we couldn't allocate a port for RTP instance

Good Evening

I have a small FreePBX instance setup here with approx 20 extensions - I have a IP based SIP trunk (so have turned on Allow Anonymous SIP to allow - this I am open to suggestions if that’s wrong) We do know the IP ranges these calls come from if there’s a better way.

We also have ‘Responsive firewall’ on to allow SIP clients to be on dynamic IPs.

IF we do allow Responsive firewall - after a few days - calls start failing and we get the following errors:

2026-01-17 20:20:50] ERROR[2811429] res_rtp_asterisk.c: Oh dear… we couldn’t allocate a port for RTP instance ‘0x7f459f5c27c0’

7775[2026-01-17 20:20:50] ERROR[2811429] res_pjsip_sdp_rtp.c: Unable to create RTP instance using RTP engine ‘asterisk’

7776[2026-01-17 20:20:50] ERROR[2811429] res_pjsip_session.c: anonymous: Couldn’t negotiate stream 1:video-1:video:sendrecv (nothing)

I have increased the RTP Pool size which can make the issue take longer to happen - but it still gets to a point where it does trigger.

IT feels like this is an attack / DOS of some kind exhausting the RTP Pool but wonder if there is any advice on how to help work round this ?

Thanks

Set the match/permit setting and make it cover the address range.

For the rest of it, use the Asterisk CLI to list the open channels, and use the shell command “lsof” (or just use “ls /proc/$(pidof -s asterisk)/fd”.

Complete logs, rather than just the last symptom, are always helpful.

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