some years ago I start a proyect like that... (i dont finished, because I change to a better job 😃 ). Ok basically here's what you need to do.
1) Install a server at your home (if posible with an IP fixed.) As mentioned before, it will be practically imposible your ISP let you put a machine in his DC.
2) You must run some kind of faxing program that can be mannipuladed by you, using command lines (so you can use it, with PHP. This is the hard part, because if you dont get it you MUST MAKE IT, that implies, making a send/receiver fax program, that supports all v protocolos for faxing). This program has to be able to Receive faxes and save them as any kind of file so you can send it via email to your "receiving" server, (it will be usefull if that file is converted to JPG or GIF, so you can choice to use FAX-FAX or FAX-EMAIL or EMAIL-FAX )
3) Then your PHP sending software must be programmed to trace the CHEAPEST route from point A to point B, read the file provided by the fax program, and send it to the nearest server to the receiver phone.
4) the receiving server is the same deal just in the inverse way, it has to be able to conver the emails you send to him in to fax data, and send it to the specified number.
That's all so simple and complicated at the same time 😃