You asked in wrong community, so you didn't received answer yet.
According your question itself - use uncompressed codec (G.711), 10ms packet time. Limit fax speed up to 9600Bd (both Tx and Rx). But most important parameter is reliable connection between SPA8000 and the PBX.