“Clicking” on analog live via ATA

Logically , if as you attest, it is clean on an analog phone plugged directly in, yet on the sip side there are ‘artifacts’ then

might get you a ‘debug’ of the audio on the SIP side, personally I would entertain the possibility that your ATA is badly grounded, is subject to external EMF disturbances or just plain broken.