In this paper we explored many versions of CELP codecs and studied different codebooks they use to encode noisy part of residual. Taking advantage of noise patterns they generated, an algorithm was proposed to detect GSM-AMR,EFR,HR and SILK codecs. Then it's extended to identify subframe offset to do tampering detection of cellphone speech recordings.