It could be a network problem.
The carrier should be able to loop & test; first to the smartjack/NIU and then to the CSU/DSU.
If the carrier still gets errors after the SJ/NIU, then the most common problems tend to be:
** Extended Demarc: If the active smartjack is some distance from the router / DSU, then it's common to put in an "extended demarc", which is just a cabling extension from the SJ/NIU to another termination near the router. Bad extended demarcs are pretty common and explain why providers can "Test OK to the SJ/NIU" and still show errors to the CSU/DSU (when the CSU/DSU is proven good).
** Cabling / Inside Wireing (IW). A variation of the extended demarc. If you have a long run from the SJ/NIU to the router/DSU, and it's not terminated well (as in properly, and "by the book" and in good condition) then it can generate all sorts of errors.
Another similar issue is that Cat{anything} cabling (UTP) is not spec for T1/DS1. There is a specific cable type ('Premises cable", now also called "T1 Cable") that is individually shielded pair inside a shielded jacket that is the true spec cable for T1.
By spec, you can go 655 feet from the SJ to the DSU .... but only on Prem cable/T1 Cable...you'll never make it (without errors) on UTP/Cat{anything}.
I know it seems odd that cabling that can carry GIgEthernet (or now, 10GigEthernet) cannot carry a simple T1 ... but the signaling is different; T1 is pure baseband pulses (noisy and subject to massive crosstalk) and Ethernet is differential signaling (less likely to interfere and be interfered with).
** Noise sources on the path. If your IW or extended demarc passes near noise sources (like motors/compressors, noisy flourescent baluns, furnaces with spark-gap ignition ...) they can interfere.
So, short story: Make sure your cabling is good, make sure it's terminated properly, if it's long, make sure it's prem cable, and make sure it's not passing noisy stuff.
Good Luck
Scott