In this case we/you really have to look at the RTP streams (In/Out). If the streams are different, then on some devices you will see this issue. The "Lock codec" (at the Admin->Settings->Ports page) supposed to take care of this very issue, i.e., if the phone is doing codec A and if the trunk provider is doing codec B, PBX will transcode codec B to codec A and send it to the phone.