<p> Attention is currently required from: N A. </p>
<p><a href="https://gerrit.asterisk.org/c/asterisk/+/19264">View Change</a></p><p>7 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="null">File channels/chan_dahdi.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/+/19264/comment/e84fee64_9bacbbf6">Patch Set #7, Line 55:</a> <code style="font-family:monospace,monospace">#include "asterisk.h"</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Empty line after asterisk.h […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Done</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/19264/comment/7c826606_54e07636">Patch Set #7, Line 16612:</a> <code style="font-family:monospace,monospace">       AST_CLI_DEFINE(dahdi_set_busy, "Sets/resets Busyout mode on a channel"),</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">whitespace</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Done</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/19264/comment/b15ac3dd_55b6d162">Patch Set #7, Line 17934:</a> <code style="font-family:monospace,monospace">       ast_unregister_application(dahdi_busyout_app);</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">whitespace</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Done</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/19264/comment/9f14d38e_0c3e530f">Patch Set #7, Line 17965:</a> <code style="font-family:monospace,monospace">       ast_manager_unregister("DAHDIBusyOut");</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">whitespace</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Done</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/19264/comment/57d8b2d8_6b4bc1c4">Patch Set #7, Line 20159:</a> <code style="font-family:monospace,monospace">       ast_manager_register_xml("DAHDIBusyOut", 0, action_dahdibusyout);</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">whitespace</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Done</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/19264/comment/d83c3fd8_014af7e2">Patch Set #7, Line 20304:</a> <code style="font-family:monospace,monospace"></code></p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">Again, I would ask the same question as before. Say you enable this on 20 channels at once? Is it really efficient to have 20 threads up for channels that don't really exist?</p><p style="white-space: pre-wrap; word-wrap: break-word;">I'm not positive, but I think this could be done a different way. At least, if not, I'd like it explained why not.</p><p style="white-space: pre-wrap; word-wrap: break-word;">Suppose for simplicity we are setting busy out on idle channels. We set a busyout flag to 1.</p><p style="white-space: pre-wrap; word-wrap: break-word;">There is a function in chan_dahdi.c that determines if a channel is available (sig_analog too I think). It returns NO for example if the DND flag is set. I think using DND as a model is useful here. I know that only applies to FXS lines, and this should also apply to FXO lines / trunks, etc.</p><p style="white-space: pre-wrap; word-wrap: break-word;">This covers the subscriber scenario, since requesting a DAHDI channel with busy out will fail.</p><p style="white-space: pre-wrap; word-wrap: break-word;">I'm positive this is not needed for FXS lines (FXO signalled).<br>For an FXO line that we want to appear busy to somebody trying to call us, the physical loop will need to be closed, so I can understand that much. However, I'm not sure if we really need threads tied up for each busy out. You could manually set the hook state in DAHDI and keep track of that. Since busy outs are all cancelled manually I believe, we don't even need to check for that elsewhere.</p><p style="white-space: pre-wrap; word-wrap: break-word;">I realize this only covers analog, is this supposed to apply to non analog as well?</p><p style="white-space: pre-wrap; word-wrap: break-word;">Overall, I think spawning threads like this should be avoided if possible.</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">I'm onboard with making this a not-new-thread operation.  I'll check into making this more inline.  I'm not sure if this works for doing a busyout on say, individual PRI channels, so my starting point was analog-only.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/19264/comment/4be9449f_75775eea">Patch Set #7, Line 20423:</a> <code style="font-family:monospace,monospace">            return 0;</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Should this return -1? Same above?</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Done</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/19264">change 19264</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/+/19264"/><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: Ib75c87c554bb18b8f65be73b4474474e7e1877b7 </div>
<div style="display:none"> Gerrit-Change-Number: 19264 </div>
<div style="display:none"> Gerrit-PatchSet: 9 </div>
<div style="display:none"> Gerrit-Owner: Mark Murawski <markm@intellasoft.net> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: N A <asterisk@phreaknet.org> </div>
<div style="display:none"> Gerrit-Attention: N A <asterisk@phreaknet.org> </div>
<div style="display:none"> Gerrit-Comment-Date: Sun, 15 Jan 2023 01:58:19 +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: N A <asterisk@phreaknet.org> </div>
<div style="display:none"> Gerrit-MessageType: comment </div>