Answering machine detection in softphone

Hi…I am very new to Asterisk…Is there any way to integrate answering machine detection in to a soft phone…

eg…i am making many calls manually on my asterisk based softphone (xlite, idefisk)…and if i hear an answering machine…i press a button which will automatically leave a prerecorded message after the tone…meanwhile…i could go to the next line/ext and make a different call…

Thank You

Isaac :smile: