According to FCC regulations, a telephone line in the on-hook state must not be dc loaded by less than 5 MV of resistance up to 100 V. Also, it must be galvanically isolated from the local ground. In the case of a standard dc line-feed of 48 V, this means that the dc load must be less then 10 µA. Furthermore, the tip and ring must be isolated by a transformer in case the telephone circuit must be locally ground referenced.
The figure shows one way to detect the presence of the dc line-feed in both the off- and on-hook states while meeting the FCC regulations. A transformer-transfer impedance change is used for this purpose. If there's no dc on the line between tip and ring, then the n-channel FET Q1 shorts transformer T1's secondary. This loads the primary so the ac at the primary, generated by U1A, is minimal. Also, Q2 doesn't conduct and the #DETECT line is high, at +5 V.
If there's a dc voltage higher than about 10 V on the line, Q1 doesn't conduct, the transformer secondary is open, and there are a couple of volts of ac on the primary of the transformer. Then Q2 conducts, and the #DETECT line goes low.
The frequency of the Wien-bridge tone generator formed by U1A is about 20 kHz. The R4-C2 time constant is adjusted for this frequency, so the #DETECT line stays within CMOS/TTL logic high/low limits. D2, D3, and R10 reduce the gain at higher amplitudes. Therefore, the waveform at the output, pin 1, is nearly sinusoidal.