<p>Joshua Colp has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/15712">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_rtp_asterisk: Only raise flash control frame on end.<br><br>Flash in RTP is conveyed the same as DTMF, just with a<br>specific digit. In Asterisk however we do flash as a<br>single control frame.<br><br>This change makes it so that only on end do we provide<br>the flash control frame to the core. Previously we would<br>provide a flash control frame on both begin and end,<br>causing flash to work improperly.<br><br>ASTERISK-29373<br><br>Change-Id: I1accd9c6e859811336e670e698bd8bd124f33226<br>---<br>M res/res_rtp_asterisk.c<br>1 file changed, 13 insertions(+), 4 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/12/15712/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c</span><br><span>index b0a3f2a..db77529 100644</span><br><span>--- a/res/res_rtp_asterisk.c</span><br><span>+++ b/res/res_rtp_asterisk.c</span><br><span>@@ -5478,15 +5478,24 @@</span><br><span> rtp->resp = 0;</span><br><span> rtp->dtmfsamples = 0;</span><br><span> return &ast_null_frame;</span><br><span style="color: hsl(120, 100%, 40%);">+ } else if (type == AST_FRAME_DTMF_BEGIN && rtp->resp == 'X') {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_debug_rtp(1, "(%p) RTP ignore flash begin from '%s'\n",</span><br><span style="color: hsl(120, 100%, 40%);">+ instance, ast_sockaddr_stringify(&remote_address));</span><br><span style="color: hsl(120, 100%, 40%);">+ rtp->resp = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ rtp->dtmfsamples = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ return &ast_null_frame;</span><br><span> }</span><br><span style="color: hsl(0, 100%, 40%);">- ast_debug_rtp(1, "(%p) RTP creating %s DTMF Frame: %d (%c), at %s\n",</span><br><span style="color: hsl(0, 100%, 40%);">- instance, type == AST_FRAME_DTMF_END ? "END" : "BEGIN",</span><br><span style="color: hsl(0, 100%, 40%);">- rtp->resp, rtp->resp,</span><br><span style="color: hsl(0, 100%, 40%);">- ast_sockaddr_stringify(&remote_address));</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> if (rtp->resp == 'X') {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_debug_rtp(1, "(%p) RTP creating flash Frame at %s\n",</span><br><span style="color: hsl(120, 100%, 40%);">+ instance, ast_sockaddr_stringify(&remote_address));</span><br><span> rtp->f.frametype = AST_FRAME_CONTROL;</span><br><span> rtp->f.subclass.integer = AST_CONTROL_FLASH;</span><br><span> } else {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_debug_rtp(1, "(%p) RTP creating %s DTMF Frame: %d (%c), at %s\n",</span><br><span style="color: hsl(120, 100%, 40%);">+ instance, type == AST_FRAME_DTMF_END ? "END" : "BEGIN",</span><br><span style="color: hsl(120, 100%, 40%);">+ rtp->resp, rtp->resp,</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_sockaddr_stringify(&remote_address));</span><br><span> rtp->f.frametype = type;</span><br><span> rtp->f.subclass.integer = rtp->resp;</span><br><span> }</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/15712">change 15712</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/+/15712"/><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: I1accd9c6e859811336e670e698bd8bd124f33226 </div>
<div style="display:none"> Gerrit-Change-Number: 15712 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>