AMI and auto-onswer on CTI

Hello,

I’m looking for an action to do on API Manager to answer an incoming call where my Aastra phone rining.
I’m on Asterisk 1.4, regading somes forum I think I have may be to write an extension with auto-answer, but how put my ringing phone on it to anwer the incoming call ?

Thanx for your help