<p>George Joseph <strong>submitted</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/15003">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Joshua Colp: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved
  Friendly Automation: Approved for Submit

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip_sdp_rtp: Fix accidentally native bridging calls<br><br>Stop advertising RFC2833 support on the rtp_engine when DTMF mode is<br>auto but no tel_event was found inside SDP file.<br><br>On an incoming call create_rtp will be called and when session->dtmf is<br>set to AST_SIP_DTMF_AUTO, the AST_RTP_PROPERTY_DTMF will be set without<br>looking at the SDP file.<br><br>Once get_codecs gets called we move the DTMF mode from RFC2833 to INBAND<br>but continued to advertise RFC2833 support.<br><br>This meant the native_rtp bridge would falsely consider the two channels<br>as compatible. In addition to changing the DTMF mode we now set or<br>remove the AST_RTP_PROPERTY_DTMF.<br><br>The property is checked in ast_rtp_dtmf_compatible and called by<br>native_rtp_bridge_compatible.<br><br>ASTERISK-29051 #close<br><br>Change-Id: I1e0c1e324598a437932c0b7836bcb626aba8e287<br>---<br>M res/res_pjsip_sdp_rtp.c<br>1 file changed, 3 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/res/res_pjsip_sdp_rtp.c b/res/res_pjsip_sdp_rtp.c</span><br><span>index eacae22..1bccc50 100644</span><br><span>--- a/res/res_pjsip_sdp_rtp.c</span><br><span>+++ b/res/res_pjsip_sdp_rtp.c</span><br><span>@@ -378,13 +378,16 @@</span><br><span>      }</span><br><span>    if (!tel_event && (session->dtmf == AST_SIP_DTMF_AUTO)) {</span><br><span>                 ast_rtp_instance_dtmf_mode_set(session_media->rtp, AST_RTP_DTMF_MODE_INBAND);</span><br><span style="color: hsl(120, 100%, 40%);">+              ast_rtp_instance_set_prop(session_media->rtp, AST_RTP_PROPERTY_DTMF, 0);</span><br><span>  }</span><br><span> </span><br><span>        if (session->dtmf == AST_SIP_DTMF_AUTO_INFO) {</span><br><span>            if  (tel_event) {</span><br><span>                    ast_rtp_instance_dtmf_mode_set(session_media->rtp, AST_RTP_DTMF_MODE_RFC2833);</span><br><span style="color: hsl(120, 100%, 40%);">+                     ast_rtp_instance_set_prop(session_media->rtp, AST_RTP_PROPERTY_DTMF, 1);</span><br><span>          } else {</span><br><span>                     ast_rtp_instance_dtmf_mode_set(session_media->rtp, AST_RTP_DTMF_MODE_NONE);</span><br><span style="color: hsl(120, 100%, 40%);">+                        ast_rtp_instance_set_prop(session_media->rtp, AST_RTP_PROPERTY_DTMF, 0);</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/+/15003">change 15003</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/+/15003"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I1e0c1e324598a437932c0b7836bcb626aba8e287 </div>
<div style="display:none"> Gerrit-Change-Number: 15003 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Holger Hans Peter Freyther <automatic@freyther.de> </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>