to specify the codec for the incoming call use the following dial-peer
dial-peer voice 1 voip
description coming from B Party
incoming called-number xxx(A party)
codec g729r
dial-peer voice 2 voip
description coming from A Party
incoming called-number xxx(B party)
codec g11u