If you are using ICM v7.1(1) or later, you can examine the Call.BAResponse variable in your routing script. It will be set to "CPA_Voice" for live contact and "CPA_AnswerMachine" for an answering machine.
If you are not at ICM v7.1(1) or later, then unfortunately there is no good way to do it. The only way would be to actually query the dialing list table in the ba database and examine the CallResult field. A CallResult of 10 indicates live voice and 12 an answering machine.