<blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">Patch Set 1:</p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">Patch Set 1:</p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">Patch Set 1:</p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">Patch Set 1:</p><p style="white-space: pre-wrap; word-wrap: break-word;">I need to give this thought as to whether this is something that is reasonable or not. It feels very very very dangerous to go down this kind of road and allow arbitrary access to other channels like this, including to their dialplan functions (I'm wondering if it's possible to cause a deadlock using this).</p><p style="white-space: pre-wrap; word-wrap: break-word;">What are the thoughts from others?</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">Just to explain my thought process, my rationale was to explicitly allow for access to their dialplan functions. I have a scenario in my dialplan currently, where I would like to set a custom CDR variable on another channel (which can be perfectly legitimate). MASTER_CHANNEL doesn't help because I use Dial with the n option to prevent optimization, so the new channel is the master channel. I wrote this so I could do just that, and write into another channel's CDR variable. I'm aware that issues from irresponsible usage could arise if the dialplan writer doesn't have good discretion but currently there does not seem to be any other way to perform these operations.</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">I can understand that, but things can get extremely dangerous and people will use this in other ways. When that happens and it goes wrong, deadlocks, crashes, that reflects on the project and is something we then have to deal with. Users have an expectation that things should not allow themselves to shoot themselves in the foot easily. There are certainly cases where it can be done, but dialplan applications and functions are safe for the most part. This feels like it drifts too far into the wild west territory.</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">Thanks, that makes complete sense. Is there anything that could be changed about the way that it's currently written to prevent some of this dangerous stuff, like preventing "dangerous manipulations"? Or is it just kind of inherent to this type of function in a way that would be hard to limit, other than a warning "Don't use if you don't know what you're doing"?</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">It's hard to limit it. Access like this usually has defined contracts of what you can do, but you're doing it from inside of a channel thread without such a defined contract. That's uncharted territory.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/15908">View Change</a></p><ul style="list-style: none; padding: 0;"></ul><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/15908">change 15908</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/+/15908"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 16 </div>
<div style="display:none"> Gerrit-Change-Id: I7492645ae4307553d0f586d78e13a4f586231fdf </div>
<div style="display:none"> Gerrit-Change-Number: 15908 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: N A <mail@interlinked.x10host.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-CC: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Mon, 17 May 2021 14:53:30 +0000 </div>
<div style="display:none"> Gerrit-HasComments: No </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Gerrit-MessageType: comment </div>