External Lines Issue

Hello again,
i have another problem and plz help me if there r any ideas.
i have three analog lines connecting to asterisk through TDM400 and i’m using group trunk for those lines so that when i user dial _9X. asterisk execute dial(ZAP/g1/${EXTEN:1})
so that the user will dial through the first avaliable lines from the three lines (avaliable= not used).
the problem is when there is no dial tone in the first line then asterisk will not recognize that and the user will get nothing and no other call can be maded till the dial tone come back 2 the first line.
so is there any mean for asterisk 2 recognize if there is a dial tone in the analog line and the not go to other 1?
thank you so much again