<p>Joshua Colp <strong>submitted</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/13180">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Kevin Harwell: Looks good to me, but someone else must approve
Benjamin Keith Ford: Looks good to me, but someone else must approve
Joshua Colp: Looks good to me, approved; Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip_t38: T.38 error correction mode selection at 200 ok received<br><br>if asterisk offer T38 SDP with none error correction scheme and<br>the endpoint respond with redundancy EC scheme, asterisk switch<br>to that mode. Since we configure the endpoint as none EC mode<br>we should not switch to any other mode except none.<br>following logic implemented in code.<br><br>1. If asterisk offer none, and anything except none in answer<br> will be ignored.<br>2. If asterisk offer fec, answer with fec, redundancy and none will<br> be accepted.<br>3. If asterisk offer redundancy, answer with redundancy and none<br> will be accepted.<br><br>ASTERISK-28621<br><br>Change-Id: I343c62253ea4c8b7ee17abbfb377a4d484a14b19<br>---<br>M res/res_pjsip_t38.c<br>1 file changed, 25 insertions(+), 5 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/res/res_pjsip_t38.c b/res/res_pjsip_t38.c</span><br><span>index 62bbb48..5948665 100644</span><br><span>--- a/res/res_pjsip_t38.c</span><br><span>+++ b/res/res_pjsip_t38.c</span><br><span>@@ -702,12 +702,32 @@</span><br><span> state->their_parms.rate_management = AST_T38_RATE_MANAGEMENT_TRANSFERRED_TCF;</span><br><span> }</span><br><span> } else if (!pj_stricmp2(&attr->name, "t38faxudpec")) {</span><br><span style="color: hsl(0, 100%, 40%);">- if (!pj_stricmp2(&attr->value, "t38UDPRedundancy")) {</span><br><span style="color: hsl(0, 100%, 40%);">- ast_udptl_set_error_correction_scheme(session_media->udptl, UDPTL_ERROR_CORRECTION_REDUNDANCY);</span><br><span style="color: hsl(0, 100%, 40%);">- } else if (!pj_stricmp2(&attr->value, "t38UDPFEC")) {</span><br><span style="color: hsl(0, 100%, 40%);">- ast_udptl_set_error_correction_scheme(session_media->udptl, UDPTL_ERROR_CORRECTION_FEC);</span><br><span style="color: hsl(120, 100%, 40%);">+ if (session->t38state == T38_LOCAL_REINVITE) {</span><br><span style="color: hsl(120, 100%, 40%);">+ if (session->endpoint->media.t38.error_correction == UDPTL_ERROR_CORRECTION_FEC) {</span><br><span style="color: hsl(120, 100%, 40%);">+ if (!pj_stricmp2(&attr->value, "t38UDPFEC")) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_udptl_set_error_correction_scheme(session_media->udptl, UDPTL_ERROR_CORRECTION_FEC);</span><br><span style="color: hsl(120, 100%, 40%);">+ } else if (!pj_stricmp2(&attr->value, "t38UDPRedundancy")) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_udptl_set_error_correction_scheme(session_media->udptl, UDPTL_ERROR_CORRECTION_REDUNDANCY);</span><br><span style="color: hsl(120, 100%, 40%);">+ } else {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_udptl_set_error_correction_scheme(session_media->udptl, UDPTL_ERROR_CORRECTION_NONE);</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+ } else if (session->endpoint->media.t38.error_correction == UDPTL_ERROR_CORRECTION_REDUNDANCY) {</span><br><span style="color: hsl(120, 100%, 40%);">+ if (!pj_stricmp2(&attr->value, "t38UDPRedundancy")) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_udptl_set_error_correction_scheme(session_media->udptl, UDPTL_ERROR_CORRECTION_REDUNDANCY);</span><br><span style="color: hsl(120, 100%, 40%);">+ } else {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_udptl_set_error_correction_scheme(session_media->udptl, UDPTL_ERROR_CORRECTION_NONE);</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+ } else {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_udptl_set_error_correction_scheme(session_media->udptl, UDPTL_ERROR_CORRECTION_NONE);</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span> } else {</span><br><span style="color: hsl(0, 100%, 40%);">- ast_udptl_set_error_correction_scheme(session_media->udptl, UDPTL_ERROR_CORRECTION_NONE);</span><br><span style="color: hsl(120, 100%, 40%);">+ if (!pj_stricmp2(&attr->value, "t38UDPRedundancy")) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_udptl_set_error_correction_scheme(session_media->udptl, UDPTL_ERROR_CORRECTION_REDUNDANCY);</span><br><span style="color: hsl(120, 100%, 40%);">+ } else if (!pj_stricmp2(&attr->value, "t38UDPFEC")) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_udptl_set_error_correction_scheme(session_media->udptl, UDPTL_ERROR_CORRECTION_FEC);</span><br><span style="color: hsl(120, 100%, 40%);">+ } else {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_udptl_set_error_correction_scheme(session_media->udptl, UDPTL_ERROR_CORRECTION_NONE);</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span> }</span><br><span> }</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/13180">change 13180</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/13180"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-Change-Id: I343c62253ea4c8b7ee17abbfb377a4d484a14b19 </div>
<div style="display:none"> Gerrit-Change-Number: 13180 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Salah Ahmed <txrubel@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: Benjamin Keith Ford <bford@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>