Allowing anonymous sip connections

When I turn the Allow anonymous inbound SIP calls to “no”, I can no longer receive calls from my provider. If I set it to “yes” I have a hacker connecting to my machine and making calls. Does anyone know how to get the system to work by turning it off?

Thanks