There are also likely phone system commands to quickly verify the incoming phone number a second time utilizing out of band signals. If how to derive how to do this, one might be able to detect spoofed caller ID and retrieve the actual source line information.
I wonder if either of these technologies could be used to detect robocalls.
Personally if I had the time and ability to write such a system, what I would do to incoming robocalls is go and route them (and pressing one if it is necessary) to an AI voice system just smart enough to pull the person's leg for a few hours making the person run in circles trying to explain the deal to what they think is a person who can't understand it. You know, robo the robo-call.