T-Mobile will pay the US Treasury $40 million to settle a dispute with the FCC over failed calls and faked ringtones for rural areas. The FCC announced the fines on Monday, following a years-long investigation into actions that took place starting in 2016.

The complaint broadly concerns how T-Mobile treats rural calls, specifically problems T-Mobile has with connecting calls to rural areas and the length of time taken to establish a call. The most significant problem appears to be that T-Mobile injected fake ringtones onto the line before the phone on the other end of the line started ringing, something that helps mask how long T-Mobile was taking to connect calls, but is also against FCC rules.

“The FCC’s Enforcement Bureau opened an investigation following rural carrier and consumer complaints that T-Mobile callers were unable to reach consumers served by three rural carriers in Wisconsin,” the FCC said in a release. “Although T-Mobile reported to the FCC that the problems had been “resolved,”the Commission continued to receive complaints that calls were failing. In addition, call completion complaints filed directly with T-Mobile showed patterns of problems with call delivery to consumers in at least seven other rural areas.”

The particularly bad part followed. “The investigation also revealed T-Mobile’s practice of injecting false ring tones into certain calls. T-Mobile reported that it had done so on hundreds of millions of calls and admitted that its actions violated the Commission’s prohibition of injecting false ring tones on any calls.”

Faking ring tones is a trick that’s been around for a few years, and according to the FCC’s “Rural Call Completion Order,” one that can be used to hide how long it takes to connect a call:

False audible ringing occurs when an originating or intermediate provider prematurely triggers audible ringtones to the caller before the call setup request has actually reached the terminating rural provider. That is, the calling party believes the phone is ringing at the called party’s premises when it is not. An originating or intermediate provider may do this to mask the silence that the caller would otherwise hear during excessive call setup time. As a result, the caller may often hang up, thinking nobody is available to receive the call. False audible ringing can also make it appear to the caller that the terminating rural provider is responsible for the call failure, instead of the originating or intermediate provider.

In a statement to BGR, the company said that “T-Mobile is committed to all of our customers across the country. Our actions have always been focused on better serving our customers and the ringtone oversight, which was corrected in January 2017, was unintentional. We have settled this matter — and will continue to focus on our mission to change for wireless for good — for consumers everywhere.”

Under the terms of its settlement with the FCC, T-Mobile will have to pay $40 million in penalties and fines, and come up with a compliance plan to stop faking ring tones within 90 days. T-Mobile isn’t the first network to get hit for the practice: The FCC said that this is its sixth enforcement action, including one that resulted in a $5 million fine for Verizon.