Mis-matching G729r8 codecs are usually caused by different Cisco IOS levels on Cisco IOS gateways.
Codec G729r8 is the default used on Cisco routers. Beginning with 12.0(5)T, the codec was standardized to IETF standards.
In a toll bypass configuration, if the two gateways are Cisco IOS-based with one running a Cisco IOS version earlier than 12.0(5)T and the other running 12.0(5)T or later, the default configuration causes a codec mismatch.
Issue the codec g729r8 pre-ietf command to the VoIP dial peers on the router with post 12.0(5)T code, or upgrade the Cisco IOS version on the other router to a version later than 12.0(5)T.