My pixel does something similar. It will answer calls and prompt them to basically identify themselves. You can see what they are saying in real time.
I don't remember the last time I had a spam call make it past it. They almost always just disconnect.