How To Setup Codecs On A Digium Gateway
Login to the Gateway
Go to Configuration > Sip Endpoint > modify SIP Endpoint > Enable Advanced Options: set to YES > Media Settings tab
Enable or disable specific codecs. Enable ULAW and ALAW only, if troubleshooting call issues (otherwise choose codecs supported by Provider).
Prioritize the codecs by moving them up and down in the Codec Priority list.