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

N A asteriskteam at digium.com
Fri Aug 6 17:03:22 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/3900d366_81284665 
PS2, Line 1802: 						if (ast_check_hangup_locked(o->chan)) {
> Returning NULL and a null frame are two separate things. […]
Right, that seems to line up with what I'm seeing.

I'm having it print out if it gets null (not a null frame), or otherwise the frame type. On a "good" call, I can see it report null, then app_dial cleans up, then pos becomes 1 (so maybe it wasn't o->chan being null after all).

When it's stuck in the infinite loop, ast_read isn't ever returning NULL, it's returning an endless supply of AST_FRAME_DTMF_END, which app_dial will then loop forever on, and o->chan still exists, so it never exits. So, ast_write fails, of course, because the channel doesn't exist, but ast_read still works.

Does this suggest the problem likely isn't in app_dial at all, but in some other part of the code that is failing to a) make o->chan null, since the channel is gone and b) stop feeding it these frames? If it's not app_dial's responsibility to do: if (ast_check_hangup_locked(o->chan)), then it sounds like something else is the issue?



-- 
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:03:22 +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/5dc14a14/attachment.html>


More information about the asterisk-code-review mailing list