Accept only whitelist calls

Hi all,
I configured for outbound and inbound calls by creating sip extension. But please help me out to configure how to accept only white list no. only, other than any white list no. will be terminated. I am having 5k no. to be white list. Please suggest me for this scenario.

Thanks in Advance