<p>Abhay Gupta has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/11320">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">stasis:  control->pbx is null<br><br>When we get a incoming call on stasis which is not answered<br>put that in a bridge then control->pbx is null . In such a<br>case when bridge is deleted and it tried to impart the channel<br>it gives  has a PBX thread and cannot be imparted into bridge<br>and hanging up the channel crashes asterisk.<br><br>ASTERISK-27756<br><br>Change-Id: Ideee69ff06c9a0b31f7ed61165f5c055f51d21b6<br>---<br>M res/stasis/control.c<br>1 file changed, 2 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/20/11320/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/res/stasis/control.c b/res/stasis/control.c</span><br><span>index 866b58e..802fa03 100644</span><br><span>--- a/res/stasis/control.c</span><br><span>+++ b/res/stasis/control.c</span><br><span>@@ -1084,8 +1084,8 @@</span><br><span> static int depart_channel(struct stasis_app_control *control, struct ast_channel *chan)</span><br><span> {</span><br><span>    ast_bridge_depart(chan);</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-        if (!ast_check_hangup(chan) && ast_channel_state(chan) != AST_STATE_UP) {</span><br><span style="color: hsl(120, 100%, 40%);">+     /* when a incoming channel is not answered and is put in bridge then control->pbx is null */</span><br><span style="color: hsl(120, 100%, 40%);">+       if (!ast_check_hangup(chan) && ast_channel_state(chan) != AST_STATE_UP && control->pbx != NULL) {</span><br><span>                 /* Channel is still being dialed, so put it back in the dialing bridge */</span><br><span>            add_to_dial_bridge(control, chan);</span><br><span>   }</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/11320">change 11320</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/+/11320"/><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: Ideee69ff06c9a0b31f7ed61165f5c055f51d21b6 </div>
<div style="display:none"> Gerrit-Change-Number: 11320 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Abhay Gupta <abhay@avissol.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>