<p> Attention is currently required from: Joshua Colp. </p>
<p><a href="https://gerrit.asterisk.org/c/asterisk/+/15985">View Change</a></p><p>1 comment:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="null">File apps/app_dial.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/15985/comment/78c9fe8b_6ad70485">Patch Set #2, Line 1802:</a> <code style="font-family:monospace,monospace">                                           if (ast_check_hangup_locked(o->chan)) {</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">A hangup is generally detected by the channel being read using ast_read, and it returning NULL. […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Using frame trace, I can confirm in this situation that a barrage of VOICE frames will always be present in the infinite loop, thus allowing this infinite loop to continue if the only check is for a null frame. Is this something that isn't supposed to happen? Otherwise, app_dial will try to pull frames forever when the channel's already gone.</p><p style="white-space: pre-wrap; word-wrap: break-word;">0.07/0.08s seems to be the consistent cutoff for this issue to appear, so something needs ~80ms+ for things to work properly, *IF* the channel hasn't been answered yet.</p><p style="white-space: pre-wrap; word-wrap: break-word;">Here is something I *can* say for sure: https://github.com/asterisk/asterisk/blob/master/apps/app_dial.c#L1276</p><p style="white-space: pre-wrap; word-wrap: break-word;">pos is 1 at >= 0.08s wait, and 2 at < 0.08s, which leads to an infinite loop. It stays 2 forever, and the code to give up (which should be what it executes) requires that pos be 1. So, this means that this is returning an item when it shouldn't be:</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">AST_LIST_TRAVERSE(out_chans, o, node) {<br>   /* Keep track of important channels */<br>        if (ast_test_flag64(o, DIAL_STILLGOING) && o->chan)<br>        watchers[pos++] = o->chan;<br>        numlines++;<br>}</pre></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/15985">change 15985</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/+/15985"/><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: I6f2ee3f77b892015bc05513d868f071f279a3c80 </div>
<div style="display:none"> Gerrit-Change-Number: 15985 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: N A <mail@interlinked.x10host.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-Attention: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Fri, 06 Aug 2021 21:25:05 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Comment-In-Reply-To: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Comment-In-Reply-To: N A <mail@interlinked.x10host.com> </div>
<div style="display:none"> Gerrit-MessageType: comment </div>