I'm guessing this is a codec or NAT issue. You should analyse the output of the Asterisk console with 'set verbose 15' whilst placing a good and bad call. If that yields no clues try again after enabling 'sip debug'.
voip-info wiki will undoubtedly provide assistance with your understanding of this and other issues.
When debugging VoIP problems it's often quicker to fire up Wireshark and analyse the call legs from the captured packets directly, rather than piecing together SIP dialogues from multiple Asterisk consoles. You will need to apply an understanding of
IP,
CIDR,
SIP,
SDP and
RTP to gain any benefit from this method.