Core Issue
This is due to a configuration issue with the bearer channel dial-peers. The issue occurs if the codec clear-channel command is issued on the bearer channel dial-peer as well as the signalling dial-peer. Issuing the codec clear-channel command for the bearer timeslots is not supported. The codec clear-channel command does not allow implementation of Voice Activity Detection (VAD), echo canceling, and gain or attenuation. It just passes data from the B-channel as it is. This is the reason for echo.
Resolution
To resolve the issue, remove the codec clear-channel command from the bearer channel dial-peer.
For more information, refer to these documents: