Welcome to the Forum!
Does this list of callers already exist somewhere that you need to query for each inbound call? If not, you could use the AllowList module.