Had someone ask me this on my site the other day (
http://www.geocities.com/oz_referee now there is a shameless plug

)
Answer is the same for FIBA - if it happens on the first free throw, it counts as a miss - if on the second, go to the arrow.
BUT....personally I reckon you deserve some sort of an award if this happens on free throws. The only time I have ever seen a ball lodged on the ring has been from a 45 degree angle to the backboard - how on earth could it happen from dead in front?????