I am happy to report that I have (partial) success! I used HylaFSP (commercial HylaFAX Windows client) to send a FAX to HylaFAX running on the FS machine, connecting to /dev/FS0.
The FAX wasn't received 100%, because it didn't go through the T.38 gateway, and the Caller-ID didn't get set, so that's what I'd like to fix next.
I already have this rule in the outgoing dialplan:
I set the $fax_call variable (and the $outbound_caller_id_number variable) in the directory entry that's used by the ATA that the analog FAX machine uses.
What I want to do now is set the same variables on channels opened by the /dev/FS0 modem. Where should I put these variables?