Xiaomi doesn’t provide a way for you to allow calls only from your contacts. To solve the problem, you’ll have to use a third-party application such as Truecaller.