An apparatus compensates for an attenuation of a signal on a telephone line in a communication system connected to the telephone line via a transformer. A photo coupler detects a loop current at a primary winding of the transformer. A controller generates switching control signals corresponding to an output of the photo coupler based on a predetermined switching table, and controls an overall operation of the communication system by receiving coding data. A level amplifier having different gains amplifies a signal at a secondary winding of the transformer by the gain corresponding to the switching control signal. A coder codes an output from the level amplifier to generate the coding data.
A variable gain coder-decoder is provided. The variable gain coder-decoder includes a variable gain amplifier in which the amplification gain may be adjusted in one-decibel steps. An analog to digital converter is connected to the variable gain amplifier. The analog to digital converter receives the amplified output of the amplifier, and performs an analog to digital conversion of the amplified output.