In CM 3.3 you can select "Auto Answer with Headset" as an option on a directory number.
Alternatively on a 7940 you just press the headset button to the left of the mute microphone, which leaves you onhook, but when lineAnswer() is called from tapi the phone picks up on headset rather than on speaker.
Regards,
Phooey.