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

Joshua Colp asteriskteam at digium.com
Fri Aug 6 18:35:55 CDT 2021


Attention is currently required from: N A.
Joshua Colp 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/26be3f72_a663c76e 
PS2, Line 1802: 						if (ast_check_hangup_locked(o->chan)) {
> The existing logic fails because it's possible for a channel (that exists) to have a soft hangup que […]
It should not be necessary for app_dial to call ast_check_hangup_locked, ast_read should be called and it should return NULL. The act of setting a softhangup flag queues a frame on the channel to cause what is handling the channel to wake up and call ast_read, which then returns NULL. The ast_read code in fact has code that if ast_check_hangup returns true then it skips its logic, and causes NULL to be returned every time you call ast_read on the channel. The ast_read function has to be called on the channel though for that to happen - so evidently in this case, it's not. The question is: why? Is something else handling the channel at the time and the hangup is dropped as a result of that? Is another channel getting priority for reading so the other channel is never read due to some situation?

As for why ast_check_hangup and the other associated things exist, it's dependent on how the channel is being handled. There are valid cases where it is useful. Does it fix the issue you see? Sure. Should it be necessary? I'm not convinced.



-- 
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: N A <mail at interlinked.x10host.com>
Gerrit-Comment-Date: Fri, 06 Aug 2021 23:35:55 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: N A <mail at interlinked.x10host.com>
Comment-In-Reply-To: Joshua Colp <jcolp at sangoma.com>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20210806/a0992623/attachment.html>


More information about the asterisk-code-review mailing list