Codec Negotiation Issue

Hi,

I have a codec negotiation problem. I’m using version 1.6.2.18-rc1

Here is the scenario

A leg INVITE codecs: g729,g711
Asterisk chooses g729
B leg invite codecs: g729

but B endpoint only accepts g711 so it rejects the call.

none of the “peers” is on sip conf, i.e. global values are used which are:

disallow=all ; First disallow all codecs allow=g729 allow=alaw

I have found this patch for 1.4 that it seems that adresses the issue.
Is there anything I can do to make it work on 1.6?

You are using an expired release candidate, for an old release of an end of life version. You should, at least, go to 1.6.2.24.

Asterisk doesn’t choose a codec at that point. It should offer all the codecs that are in common between its list and the callers.

Note that a-law will not match the mu-law variant of G.711.

Thanks for your fast reply. all g711 codecs are alaw.

I will try the version you suggested. Anyway it seems that asterisk does some sort of codec choosing at the beginning on the call (function is sip_new in channel_sip.c) Then that codec information seems to be used when creating the second channel. I’ll post the logs soon

For the record. It is an issue on how Asterisk negotiate codecs. For versions 1.4 this seems to fix it