Line In MOH

I’m looking for suggestions on the best way to provide music on hold via an analog line in.

I have fought with using a sound card for line in audio for several days, and have no luck. Is there such a thing as a hardware device that would provide an analog line in that will encode the audio as ulaw so that it doesn’t have to be transcoded by Asterisk?

Having an analog line input is a requirement for this project. It seems strange that this is so difficult to set up, since every basic phone system going back to 1980 has been able to do this?