How to Filter Incoming Calls to Only Approved Numbers?

I know many have asked about getting an inbound phone number, and I've gathered from search the Discord that this can be done via the 'Get Call' API call.

But I need further help with my use case.

I have a list of members and their numbers in a Google Sheet. I want it so that when a call comes in, we filter to only allow member calls. This could be either:

  1. If the incoming call is from a number that is not a member's number, then it is not even answered in the first place.
  2. Or If that isn't possible, then at least after the call is answered, we perform a function call that checks that Google Sheet to check if the caller's phone number matches. If not, the call ends. If I wanted to do this, how would I get the Call ID in order to pass to the 'Get Call' request while the call is running (I think that's what's required?)?
Was this page helpful?