This paper considers the detection of coded phaseshift keying signals subjected to additive white Gaussian noise and oscillator phase noise. We propose a detector that partitions the received frame into smaller blocks and models the unknown phasor variations over each block as a truncated discrete cosine transform (DCT) expansion. Detection and decoding are iteratively performed between a soft-input soft-output (SISO) demodulator, a SISO demapper, and a SISO decoder based on the sum-product algorithm and the factor graph framework, whereas the expectation-maximization algorithm is used in the demodulator for the DCT coefficients estimation. The resulting demodulator is shown to have an excellent performance/complexity tradeoff and to be well-suited for parallel processing on multiple cores.