[Home]

Summary:ASTERISK-26317: res_pjsip_session: Add ability to use preferred codec only
Reporter:Aaron An (aaron)Labels:
Date Opened:2016-08-26 05:02:49Date Closed:2016-09-14 00:37:50
Priority:MinorRegression?
Status:Closed/CompleteComponents:Resources/res_pjsip_session
Versions:13.8.0 Frequency of
Occurrence
Related
Issues:
is duplicated byASTERISK-26339 asterisk change the codec of inbound channel when bridge to another channel.
is related toASTERISK-26423 res_pjsip_sdp_rtp: Asymmetric RTP codec can cause audio loss and wonkiness
Environment:CentOS 6.5Attachments:
Description:look at res/res_pjsip_session.c function "new_invite()" or "ast_sip_session_create_invite()",
#ifdef PJMEDIA_SDP_NEG_ANSWER_MULTIPLE_CODECS
pjmedia_sdp_neg_set_answer_multiple_codecs(session->inv_session->neg, PJ_TRUE);
#endif

but in pjproject it alway define PJMEDIA_SDP_NEG_ANSWER_MULTIPLE_CODECS to 0 or other. so we always set the multiple codecs to true.
I think it will be better to have a set in pjsip.conf to control where use multiple codecs.
Comments:By: Asterisk Team (asteriskteam) 2016-08-26 05:02:50.661-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: Joshua C. Colp (jcolp) 2016-08-26 05:45:46.589-0500

This would be considered a feature request and if a patch is created you can reopen this issue and attach it.

As for the #ifdef in question that tests the presence of the pjmedia_sdp_neg_set_answer_multiple_codecs function. This was a contribution we made to PJSIP and did not exist before the Asterisk work was done. To ensure Asterisk still built without a version that supported it a check was added. It does not, and is not supposed to, control whether they are enabled or not. It's always supposed to be currently if the function is available like you've seen.

By: Aaron An (aaron) 2016-08-29 05:16:05.246-0500

I want to create a patch for that.
Is it convenient to add a config to pjsip.conf? something like "preferred_codec_only=yes", and in the "[global]" section or in the "[system]" section?

By: Asterisk Team (asteriskteam) 2016-08-29 05:16:06.322-0500

This issue has been reopened as a result of your commenting on it as the reporter. It will be triaged once again as applicable.

By: Joshua C. Colp (jcolp) 2016-08-29 05:21:05.812-0500

I'd expect people to want to configure this on a per-endpoint basis, so that's where I'd expect it to go. I've also set this to feedback so when you have a patch you can attach it and take it through the contribution process if you want.

By: Aaron An (aaron) 2016-08-29 05:38:44.254-0500

configure it as a per-endpoint basis is also a good choise. I will try to contribute with gerrit.

By: Aaron An (aaron) 2016-08-30 00:18:02.994-0500

https://gerrit.asterisk.org/#/c/3762/