Filtering Anonymous Calls by IP Address

We have our inbound providers route calls to our PBX using SIP URIs configured on the Inbound Routes page of our PBX. We have found this more reliable and easier to configure than using SIP registrations for inbound calls. Unfortunately, SIP dialers tend to run across our system and attempt to dial into our PBX using random numbers/URIs filling our logs with “junk.”

Is there a way to configure FreePBX so that the “Allow Anonymous Inbound SIP Calls” feature under “Asterisk SIP Settings” only allows anonymous calls from certain IP addresses (e.g. our inbound calling provider(s)). Alternatively, could we implement FreeSWITCH-like configuration where we only allow “Allow Anonymous Inbound SIP Calls” be processed on a certain port (e.g. 5080)?

Thank you!

If you know the IP addresses why not just use your firewall to block unwanted IP addresses. This is what a firewall is for is it not?

Yes, that is what a firewall is fore. But I don’t think you understand my question. I only want to filter “Allow Anonymous Inbound SIP Calls.” We have endpoints connecting using SIP on 5060 and need allow those endpoints to register and cannot use firewalls since those source addresses change frequently. The Anonymous Inbound SIP Call traffic does not come from changing addresses and can be filtered by IP address/subnet.