[Asterisk-code-review] app_dial: Prevent call from hanging (asterisk[master])

N A asteriskteam at digium.com
Fri Aug 6 17:34:34 CDT 2021


Attention is currently required from: Joshua Colp.
N A has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/15985 )

Change subject: app_dial: Prevent call from hanging
......................................................................


Patch Set 2:

(1 comment)

File apps/app_dial.c:

https://gerrit.asterisk.org/c/asterisk/+/15985/comment/ef205198_5a68b86b 
PS2, Line 1802: 						if (ast_check_hangup_locked(o->chan)) {
> o->chan is an app_dial thing, it only exists in it. […]
I guess I mean the chan that o->chan is, not o->chan itself.

Interestingly, if I include this in the first big AST_LIST_TRAVERSE, it doesn't execute, however if I include it in the 2nd, it properly catches a dead channel:

if (ast_check_hangup_locked(o->chan)) {
	ast_log(LOG_WARNING, "!!! Should be dead, but we're not?\n");
	continue;
}

Isn't this what's supposed to tell the channel to hang up? There's a soft hangup queued, which reliably lets us know, even though the standard o->chan == NULL and f == NULL checks fail (that is, mislead us into thinking the channel is still up).

What's the issue with this approach, that it's not app_dial's responsibility to check if a soft hangup is queued? I see other apps doing this so I'm confused.



-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/15985
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: I6f2ee3f77b892015bc05513d868f071f279a3c80
Gerrit-Change-Number: 15985
Gerrit-PatchSet: 2
Gerrit-Owner: N A <mail at interlinked.x10host.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Attention: Joshua Colp <jcolp at sangoma.com>
Gerrit-Comment-Date: Fri, 06 Aug 2021 22:34:34 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Joshua Colp <jcolp at sangoma.com>
Comment-In-Reply-To: N A <mail at interlinked.x10host.com>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20210806/08dbc5bb/attachment.html>


More information about the asterisk-code-review mailing list