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?
first- the context= for [general] should NEVER go into a privelaged context- by that I mean a context that can dial out or do anything that you wouldn’t want a random incoming caller to be able to do.
Now if your provider incoming fails when allow guest is off, that means the provider is not matching up with the peer you have defined for it.
Try the following-
make sure you have a section defined for your provider, ie
[provider]
host=theirSIPserver
insecure=very ; this can help troubleshoot incoming
context=where it should go
etc etc
Now for your register statement in general, change it to be
register => user:pass@provider. NOT user:pass@sip.provider.com. This makes it use the host= statement from the [provider] thing below, which makes it match to that entry and use the correct context.