Allow a codec, which the peer supports.
Without both your relevant configuration, and either the actual SDP, or the log line listing the offered and acceptable codecs, I don’t think one can be much more precise.
Please note that chan_sip should not be used on new configurations, as it is not supported by Sangoma.
I meant the configuration of Asterisk, i.e. what is in /etc/asterisk