[Home]

Summary:ASTERISK-26996: chan_pjsip: Flipping between codecs
Reporter:Michael Maier (micha)Labels:
Date Opened:2017-05-13 00:18:29Date Closed:2017-06-15 13:54:07
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Channels/chan_pjsip
Versions:13.14.1 13.15.0 Frequency of
Occurrence
Constant
Related
Issues:
Environment:CentOS 6, linux 64bit Attachments:( 0) conference-broken-codec_choice
Description:Asterisk initiates a call and provides more than one codec in SDP (e.g. g722, alaw, ...). The callee accepts the list of codecs in ok SDP (g722, alaw).

At this point, asterisk isn't always able to decide which codec to use later on. It frequently switches between g722 and alaw which leads to choppy sound.

But that's not always happening - it's showing up here, if the callee sends the first rtp pacakge - the problem seams not to happen, if the caller sends the first rtp package (g722) - I did multiple tests.

The attached debug output is an example of the broken situation, if asterisk can't decide what codec to use.

Goal is, to ensure, that asterisk always uses the primary codec of ok SDP list, or, maybe the better solution, just to provide one codec in SDP ok and not a list. Maybe there are other devices out there, which do have similar problems.
Comments:By: Asterisk Team (asteriskteam) 2017-05-13 00:18:29.481-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

By: Michael Maier (micha) 2017-05-13 00:20:31.635-0500

Debug output of an example which shows, that asterisk pjsip isn't able to decide which codec to use.

By: Richard Mudgett (rmudgett) 2017-05-15 10:42:08.275-0500

Does adjusting the endpoint asymmetric_rtp_codec option help here?

By: Michael Maier (micha) 2017-05-15 11:07:16.985-0500

No - it's getting even worse.

By: Joshua Elson (joshelson) 2017-05-17 16:53:56.266-0500

We've certainly seen issues on this as well. While the root cause here is usually a poorly implemented peer, issues like this happen across many different endpoints, it would probably make sense to have a chan_sip equivalent option like preferred_codec_only that would just respond with only the most preferred codec in the OK.

Just a thought...