Detect busy or no answer

Hi,

IS there any means of dialling an external number and detect whether it is busy or no answer and hangup if so. Only if the call is answered the call is routed to an extension. Has anyone implemented this? Is it possible? If so help me.

Thanks,
rani

Check for chanavail function in asterisk applications it may helps you