Hybrid phone echo cancellation circuit
The analogue circuit is known as a "two-wire hybrid" and does exactly what you are doing with your DSP. Strictly speaking this is just sidetone elimination rather than echo cancellation which Kellenjb's link addresses. Below is a simple example (which is a discrete replacement for an obsolete Mitel part). This arrangement only works if the load impedance is precisely controlled - in this case 754\$\Omega\$.