<p>N A has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/15874">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">chan_sip: Expand hook flash recognition.<br><br>Some ATAs send hook flash events as application/hook-flash, rather than a DTMF<br>event. Now, we also recognize hook-flash as a flash event.<br><br>ASTERISK-29370<br><br>Change-Id: I1c3b82a040dff3affcd94bad8ce33edc90c04725<br>---<br>M channels/chan_sip.c<br>1 file changed, 12 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/74/15874/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/channels/chan_sip.c b/channels/chan_sip.c</span><br><span>index b13b892..1c9ba5f 100644</span><br><span>--- a/channels/chan_sip.c</span><br><span>+++ b/channels/chan_sip.c</span><br><span>@@ -22626,6 +22626,18 @@</span><br><span> const char *c = sip_get_header(req, "Content-Type");</span><br><span> </span><br><span> /* Need to check the media/type */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ if (!strcasecmp(c, "application/hook-flash")) {</span><br><span style="color: hsl(120, 100%, 40%);">+ /* send a FLASH event, for ATAs that send flash as hook-flash not dtmf */</span><br><span style="color: hsl(120, 100%, 40%);">+ struct ast_frame f = { AST_FRAME_CONTROL, { AST_CONTROL_FLASH, } };</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_queue_frame(p->owner, &f);</span><br><span style="color: hsl(120, 100%, 40%);">+ if (sipdebug) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_verbose("* DTMF-relay event received: FLASH\n");</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+ transmit_response(p, "200 OK", req);</span><br><span style="color: hsl(120, 100%, 40%);">+ return;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> if (!strcasecmp(c, "application/dtmf-relay") ||</span><br><span> !strcasecmp(c, "application/vnd.nortelnetworks.digits") ||</span><br><span> !strcasecmp(c, "application/dtmf")) {</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/15874">change 15874</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/+/15874"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 18 </div>
<div style="display:none"> Gerrit-Change-Id: I1c3b82a040dff3affcd94bad8ce33edc90c04725 </div>
<div style="display:none"> Gerrit-Change-Number: 15874 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: N A <mail@interlinked.x10host.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>