SIP calls rejected with 'flood' error - how to whitelist provider IPs

This question originally came up in our Slack community and the thread has been consolidated here for long-term reference.

I am trying to set up SIP via self-hosting. Whenever I make a call, it’s rejected by the SIP server due to flood protection:

INFO sip sip/inbound.go:1101 Closing inbound call
{"status": 486, "reason": "flood"}

How can I fix this?

If inbound calls are being rejected with the ‘flood’ reason, you need to whitelist the IP addresses of your SIP provider.

Contact your provider (in your case, it appears to be Exotel) to get the list of IP addresses they use to make inbound call requests to your server.

When creating your inbound trunk configuration using the LiveKit SDK, pass those IP addresses in the allowed_addresses field. This tells LiveKit SIP to accept calls from those specific IPs rather than treating them as potential flood attacks.