Example with the feature of codec preference as IAD was in internal network and registered to softswitch
voice class codec 1
codec preference 1 g729r8
!
mgcp 192.168.0.142 2427
mgcp call-agent ipv4:222.33.42.198 2727
mgcp hostname pz_eisdm8
!
interface fastethernet 0/0
ip address 192.168.0.142 255.255.255.0
!
ip route 0.0.0.0 0.0.0.0 192.168.0.1 fastethernet 0/0
!
dial-peer voice 1 pots
port 1/0
application mgcp
mgcp-endpoint-name aaln/0
!
dial-peer voice 2 pots
port 1/1
application mgcp
mgcp-endpoint-name aaln/1
!
dial-peer voice 3 pots
port 1/2
application mgcp
mgcp-endpoint-name aaln/2
!
dial-peer voice 4 pots
port 1/3
application mgcp
mgcp-endpoint-name aaln/3
!
dial-peer terminator #
!
end