From my experince. Ive never pinged a warship so i cant tell if that reveal your position.
But they only ping you if they loose track of you and dont know where u are.
I guess they knew where u where, seen your scope or heard you. and therefor didnt need to ping you.
But the AI is not the smartest thing in game. I use to sneak into a convoy and lay at periscope depth and wait for them to approch untill iam in the middle of the convoy. Then i raise the periscope, pick my target and deliver the fish. Lower the periscope, reload tubes,, and repeat.
Ive had loads of warship swarming around in desperation and try to find me but they never do. Nor do they use the ping function either.
But i think also its a matter in what time period u are in the game, Early war, the warship tend to be quite stupid but later in the war ,when u encounter elite ships, they are much harder to face.
The game starts at 1943