I tried to find a Linux solution to automatically record scanner traffic, something like Scanner Recorder for Windows. It looks like I am not alone. Anyway, I figured it out.
This is how I did it under Ubuntu:
Download xpvox here.
Compile it (I had to install libforms and then change all instances of #include "forms.h" to #include [...]
Recording scanner output dictaphone-style, with silence detection