RTP port range ignored


I have installed freepbx on my Raspberry Pi and I have the following issue;

The RTP port range that can be used is 10000 - 20000, so for now that’s still default. The ports are provided under “settings” - “Asterisk SIP settings”

Often I don’t have any audio when I’m connected with sip clients from the internet. (Using Zoiper on my phone)
I understand that’s it’s a nat issue, but…

On my firewall UDP ports 10000 - 20000 are forwarded to my pbx.
In the firewall logging I see that a connection is made (or at least they try to) outside this range. Sometimes it’s somewhere in the 6000 and somtimes somewhere in the 30000.

And sometimes it does work, when the phone connects within the 10000 - 20000 range than everything works just fine. The sound is very good then.

But I cannot find/understand why they try to connect outside the RTP port range I provided. So I don’t know how to solve this…

Can anyone help me with this?
Thank you very much!

With kind regards,

I think you are confused. The 10000-20000 is for when someone sends Asterisk a call. The Phone can have its own Port range and not something the PBX can control.

Well it is the phone, dailing into Asterisk.
In the logging of the NAT router I can see that the phone wants to connect to Asterisk on the port numbers above 30000 or below 8000.

But I thought it was Asterisk that “tells” the client on what ports it can communicate, or am I wrong here?

Thanks for your reply!

The endpoint initiating the session will offer an rtp port which is negotiated from there. As long as the SIP device that initiated the session does not blacklist the rtp range defined for asterisk, you are good to go.