For knowing if you are detected or not, watch the last 3 lines in the 'Signature' tab, if all numbers are negative you are undetected, if one or more are positive you are about - or are - detected. There is a +10 threshold between first contact detection and re-gaining contact (meaning that there is a marge of 10 in your favor for the enemy making a first contact on you).
Being near the bottom has no effect in dodging active sonars I think, at least I couldn't see that I remain undetected, and this is ok, because any ping on you is reflected wether you move or not. Then, it's the sonarman's job to discern a big rock and a sub on the ground, and I wouldn't really bet that he is stupid, so you better move your 2 cents tonnage away
MAD devices on planes will however detect you for sure, wether you are quiet or not, wether you are at 0 knots at the bottom or not: these devices work with magnetic variance detection, thus pointing to any object underwater. Be glad that they only have a detection range of 400 yards (meaning a plane overflying you will detect you).
Sonobuoys are a little different because working with sonars: they have an effective range of about 4-5 kyds, so you need to leave this range to become undetected again.
Cheers,