If you want to use a fax machine with an ata, then the actual faxing does not concern the pbx. For the pbx its just another voice call.
If you want to have your gateway receive the faxes as a pdf file, then you must use a supported gateway - patton, audiocodes have been tested with fax. Then you can send and receive faxes via the gateway, WITHOUT requiring a fax machine.
There is some confusion around this - once again, if you want to use your old fax machine, connect it to an ATA. And use G711 as the codec. This will work reasonably well but the compression can cause problems for some fax machines or sending fax machines. We are considering making it possible to support a t38 ATA as well so you can use your old fax machine.... But right now this is not tested yet, we are working on it.