The stalwart fax package for Linux has been efax for some time. This is a command-line utility that can send and/or receive facsimile transmissions, making it a very handy building block for any sort of custom (scripts, perl, awk, C, whatever) application one wants to layer on top of it.

Cheers