Firewall Rules for FreePBX on

Define group SIP as UDP and TCP on Ports 5060 and 5061
Define group RTP as UDP on Ports 10000 through 20000
Define group VoipmsSIP as the specific IP address(es) of the Servers you plan to use. A complete list of SIP servers can be found here.
Define FreePBX as IP address <internal LAN interface of your FreePBX>

Create your Inbound Allow Rules:
Allow SIP from VoipmsSIP to FreePBX
Allow RTP from VoipmsRTP to FreePBX

More details can be found here: