ATA Faxing - Disconnects when using PRI

I am trying to add a fax machine using an ATA and a new extension in FreePBX. I’ve removed fax detection and pointed my DID at the extension that the ATA is using.
I’ve done this before and have a handful of fax machines using ATAs. They can fax to each other across the LAN perfectly, but when a fax call comes in our PRI (using a Sangoma PRI card in my FreePBX), the fax begins, the machines start negotiating, but then during the data transmission phase, the call hangs up. I get a fax error 401. I looked up this error, it’s basically some kind of line interference.

Any ideas?