Have Astreriks skip defect phone line

I would like to know how I can have asterisk to skip a defect FXO line. I notice that although you can see in dahddi-tools that the line is out of service ( RxA through RxD is 1) Asterisk is still trying to use that channel. This will become a big issue when the first line in the group is defect (No power on the Line).
I’m lloking for a way to have asterisk first look at the line status and skip it if it does not have the correct Rx valeu Valeus can be seen using the Dahdi_tool command.