The machine_detection parameter in the outbound call object can tell you when a call is answered by a machine.
To change the call flow when a machine is detected
Set the machine_detection argument of the Call method to “true.” If a machine is detected during the call and machine_detection is set to true, Plivo makes a request to any URL invoked by the call (such as answer_url or hangup_url), and in the request the machine parameter is set to true.
To hang up a call when a machine is detected
Set the machine_detection argument of the Call method to “hangup.” If a machine is detected during the call and machine_detection is set to hangup, Plivo hangs up the call immediately and makes a request to the URL specified in the hangup_url attribute, and in the request the machine parameter is set to true.