Default codec for a voip dial peer is g.729. What is the CUCM configuration? Does it alllow g.729? If not, this would explain dial peer 1 not working. As for adding the voice-class codec command, both dial peers work? I understand dial peer 2 working at this point because inbound/outbound match on g.711.