Jump to content

Codec negotiation


Recommended Posts

PBX V68.0.30

We seem to have continual issues with codec negotiation.  I generally have PCMA, PCMU and G729 in that order.  However, if the other end has a preference for anything other than PCMA we get no audio and a PCAP shows different codecs being used, us with PCMA and the other end PCMU or G729.  If I set PCMA as the only codec then we are ok.  Since we have the 3 options, why do we not negotiate and use the same as the other end?  Is there a setting I am missing?  Is there any issue with only using PCMA?

Link to comment
Share on other sites

The main problem is that many implementations don't properly support the offer/answer model and are not able to handle multiple codecs in a single stream. For example when a device "advertises" that is supports G711A, G711U and G729A that means that it is okay to send either of those codecs, and switch between them any time without re-negotiation. And its totally okay to have different send and receive codecs. Unfortunately the reality is far from that, especially on trunk side.

We have added several settings to deal with the situation, e.g. answer only with one codec ("present to be stupid") to an offer from a SIP trunk and have "symmetrical" codecs, so that sending and receiving are using the same codec. IMHO when it comes to problems on the trunk side, it is usually the best to just fix the trunk to G711U or G711A depending on the country and not leave any other choice to the trunk. Those "dumb" trunks transcode to G711 sooner or later anyway, so that the quality is actually the best if that codec is used in the first place and leave transcoding to the PBX. If you are using a trunk from the drop down, this might have been already setup and you don't have to tinker with the many settings.

On the VoIP phone side it's usually not as bad. For the VoIP phones in a nutshell the phones should propose whatever they have, but the PBX makes the decision what codec to use. You can still fix the codec on an extension if you are using a phone that does not support RFC-compliant SDP codec negotiation.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...