Unfortunately, not Sox, but ffmpeg has a silencedetect filter that does exactly what you are looking for:
ffmpeg -i in.wav -af silencedetect=noise=-50dB:d=1 -f null -
(detection threshold -50db, at least 1 second, crossed from ffmpeg documentation )
... this will print this result:
Press [q] to stop, [?] for help [silencedetect @ 0x7ff2ba5168a0] silence_start: 264.718 [silencedetect @ 0x7ff2ba5168a0] silence_end: 265.744 | silence_duration: 1.02612 size=N/A time=00:04:29.53 bitrate=N/A
Jeff sisson
source share