<p>Kevin Harwell <strong>submitted</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/18675">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Joshua Colp: Looks good to me, but someone else must approve
Kevin Harwell: Looks good to me, approved; Approved for Submit
Benjamin Keith Ford: Looks good to me, but someone else must approve
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">app_dial: Fix dial status regression.<br><br>ASTERISK_28638 caused a regression by incorrectly aborting<br>early and overwriting the status on certain calls.<br>This was exhibited by certain technologies such as DAHDI,<br>where DAHDI returns NULL for the request if a line is busy.<br>This caused the BUSY condition to be incorrectly treated<br>as CHANUNAVAIL because the DIALSTATUS was getting incorrectly<br>overwritten and call handling was aborted early.<br><br>This is fixed by instead checking if any valid peers have been<br>specified, as opposed to checking the list size of successful<br>requests. This is because the latter could be empty but this<br>does not indicate any kind of problem. This restores the<br>previous working behavior.<br><br>ASTERISK-29989 #close<br><br>Change-Id: I4d4b209b967816b1bc791534593ababa2b99bb88<br>---<br>M apps/app_dial.c<br>1 file changed, 5 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/apps/app_dial.c b/apps/app_dial.c</span><br><span>index edcce0a..4c4ebeb 100644</span><br><span>--- a/apps/app_dial.c</span><br><span>+++ b/apps/app_dial.c</span><br><span>@@ -2703,7 +2703,8 @@</span><br><span> </span><br><span> if (!tc) {</span><br><span> /* If we can't, just go on to the next call */</span><br><span style="color: hsl(0, 100%, 40%);">- ast_log(LOG_WARNING, "Unable to create channel of type '%s' (cause %d - %s)\n",</span><br><span style="color: hsl(120, 100%, 40%);">+ /* Failure doesn't necessarily mean user error. DAHDI channels could be busy. */</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(LOG_NOTICE, "Unable to create channel of type '%s' (cause %d - %s)\n",</span><br><span> tmp->tech, cause, ast_cause2str(cause));</span><br><span> handle_cause(cause, &num);</span><br><span> if (!rest) {</span><br><span>@@ -2841,7 +2842,9 @@</span><br><span> AST_LIST_INSERT_TAIL(&out_chans, tmp, node);</span><br><span> }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- if (AST_LIST_EMPTY(&out_chans)) {</span><br><span style="color: hsl(120, 100%, 40%);">+ /* As long as we attempted to dial valid peers, don't throw a warning. */</span><br><span style="color: hsl(120, 100%, 40%);">+ /* If a DAHDI peer is busy, out_chans will be empty so checking list size is misleading. */</span><br><span style="color: hsl(120, 100%, 40%);">+ if (!num_dialed) {</span><br><span> ast_verb(3, "No devices or endpoints to dial (technology/resource)\n");</span><br><span> if (continue_exec) {</span><br><span> /* There is no point in having RetryDial try again */</span><br><span></span><br></pre><div style="white-space:pre-wrap"></div><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/18675">change 18675</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/+/18675"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 19 </div>
<div style="display:none"> Gerrit-Change-Id: I4d4b209b967816b1bc791534593ababa2b99bb88 </div>
<div style="display:none"> Gerrit-Change-Number: 18675 </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: 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@sangoma.com> </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>