This article will help you to define the codec you would like to use with your system.
Please view the explanation in How to Set SIP Configuration for DIDWW DID Number on Asterisk? for defining the trunks in an Asterisk PBX system. Please be aware that "allow all" refers to all kind of CODEC (e.g. ILBC or G729 CODEC).

How do I Define the CODEC which I Want to Use in DIDWW SIP Trunks?