As someone working with both VoIP and Fax, all I can say is that both are horrible, and expect the worst from each when putting those 2 things together.
Since my work is a large org (they still use fax officially) I mostly work with enterprise software from Cisco, Oracle, etc. so I cannot help here in detail, start learning about SIP (abd RTP if you want to handle calls too) with FreePBX. There is a Fax plugin for FreePBX: https://github.com/FreePBX/fax but I could not find any documentation so far.
The world would be great if we started developing new digital solutions to analog problems instead of forcing the digital replacement to mimic its analog original
- me