Question : How to specific the codec for incomming call on Cisco gateway?

The call scenario is shown as the following drawing. The A party places a call to the B party via the Cisco gateway. A party can be specificed to use G 711 codec. B party can only use G 729. And the dial-peer on the cisco specifics the Codec to B party is G 729 as well.

But I can't find a way to define what codec to be use from Cisco back to A party? Can some show me the configuration? I really appreciate it!

The dial-peer is shown as follow:
=============================
dial-peer voice 800 voip
 description *** To B Party***
 destination-pattern 1234
 session protocol sipv2
 session target ipv4:192.168.2.200
 codec g729r8
 no vad
==============================

Answer : How to specific the codec for incomming call on Cisco gateway?

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
Random Solutions  
 
programming4us programming4us