I would only really set them in the Variables:
Set:
global_codec_prefs = PCMU,PCMA
outbound_codec_prefs = G726,PCMU,PCMA
media_mix_inbound_outbound_codec = true
Internal profile should only then allow PCMU and PCMA, and the external will transcode G726 if it needs to.