When I'm logged into Dota 2, I won't hear the ping from party invites if I'm in a match, custom game, or spectating a game, but can hear it if tabbed out of the game. Can also hear steam messages in and out of the client though.