May one speak in a bathroom in a time of need?[1]
If one has not yet begun to defecate then in a time of need he may speak in a bathroom. If however he has already begun defecating he may not speak in the bathroom, even in a time of great need. [It is however permitted to talk of matters relevant to the bathroom such as asking for toilet paper[2], although seemingly even then it is best to hint to the matter rather than talk.]
[1] Shaareiy Teshuvah 3:2; M”B 3:4; based on Rambam Hilchos Deios 5 that prohibits speaking even in a time of great need. See Torah Leshma 24 who permits in a case of great need.
[2] See Piskeiy Teshuvos 3:3 in name of Salmas Chaim 10 [not found], however so seems logical.