What you are hearing
A fax call has five phases, and you can hear every one of them (ITU-T T.30). Phase A: the calling fax beeps 0.5 s of 1100 Hz every 3.5 s (CNG, the calling tone, §4.2) so whoever answers knows a machine is calling. The answering fax replies with a long 2100 Hz tone (CED, called terminal identification, §4.1.1). Phase B: the two machines negotiate in bursts of 300 bit/s data, a rough warble between 1650 and 1850 Hz (V.21 channel 2). The receiver sends its number and what it can do (DIS, the digital identification signal), the sender picks a speed and resolution (DCS, the digital command signal), and then sends 1.5 s of test data at that speed (TCF, the training check, §5.3.6.1.3). If the line is noisy, the receiver says "failure to train" and the sender steps down a speed. Phase C: the page itself, the long hiss. Phases D and E: "that was the last page", "received OK", "goodbye".
How the picture becomes sound
A Group 3 fax scans the page as 1728 dots per line, about 8 per millimeter, with 3.85 lines per millimeter in standard mode and 7.7 in fine mode. Each line is turned into run lengths: so many white dots, so many black, and so on. Each run length becomes a short code word from a fixed table, the "modified Huffman" code of ITU-T T.4 §4.1, where common runs get short codes. A line ends with the code 000000000001 (EOL, end of line), and six of those in a row end the page (RTC, §4.1.4).
Those bits then go to the page modem. At 4800 bit/s that is V.27 ter: the phase of an 1800 Hz carrier jumps by one of eight angles 1600 times a second, each jump carrying three bits. At 9600 bit/s it is V.29, which changes amplitude as well as phase 2400 times a second. At 2400 bit/s, V.27 ter uses four angles 1200 times a second; at 7200 bit/s, V.29 carries 3 bits per change. Before the data, the modem plays a fixed training pattern so the receiver can lock on (V.27 ter §2.5.1, V.29 §8), which is the buzzy sound just before the hiss.
That is why blank paper sends fast and a photo sends slowly: a white line is one short code, while a dithered gray area turns into hundreds of tiny runs. Real fax machines also had a minimum time per line, so the printer could keep up, and padded short lines with zeros to meet it.
Sources and accuracy
The frames follow ITU-T T.30 §5.3, the image coding T.4, and the page modems V.27 ter and V.29. A separate test suite, written from the ITU texts alone, decodes every frame (checksum, order, and the speed and resolution bits) and demodulates the page back to the exact same pixels at all four speeds. A few details are our reading where the standards leave room, such as the response delays between messages and the shape of the V.29 signal. They are listed in our open questions. Error correction mode, V.17 (14 400 bit/s), and multi-page faxes are not modeled yet.
Related: the dial-up modem handshake (try the "Fax answers" scenario: a modem that calls a fax machine by mistake) · the handshake, explained · a short history of the modem.