<p>George Joseph <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/10451">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Richard Mudgett: Looks good to me, but someone else must approve
  Joshua Colp: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved; Approved for Submit

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">chan_sip:  Attempt ast_do_pickup in handle_invite_replaces<br><br>When a call pickup is performed using and invite with replaces header<br>the ast_do_pickup method is attempted and a PICKUP stasis message is sent.<br><br>ASTERISK-28081 #close<br>Reported-by: Luit van Drongelen<br><br>Change-Id: Ieb1442027a3ce6ae55faca47bc095e53972f947a<br>---<br>M channels/chan_sip.c<br>1 file changed, 7 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/channels/chan_sip.c b/channels/chan_sip.c</span><br><span>index c54789a..2693e5f 100644</span><br><span>--- a/channels/chan_sip.c</span><br><span>+++ b/channels/chan_sip.c</span><br><span>@@ -25903,7 +25903,13 @@</span><br><span>           }</span><br><span>            ao2_ref(bridge, -1);</span><br><span>         } else {</span><br><span style="color: hsl(0, 100%, 40%);">-                ast_channel_move(replaces_chan, c);</span><br><span style="color: hsl(120, 100%, 40%);">+           int pickedup;</span><br><span style="color: hsl(120, 100%, 40%);">+         ast_channel_lock(replaces_chan);</span><br><span style="color: hsl(120, 100%, 40%);">+              pickedup = ast_can_pickup(replaces_chan) && !ast_do_pickup(c, replaces_chan);</span><br><span style="color: hsl(120, 100%, 40%);">+         ast_channel_unlock(replaces_chan);</span><br><span style="color: hsl(120, 100%, 40%);">+            if (!pickedup) {</span><br><span style="color: hsl(120, 100%, 40%);">+                      ast_channel_move(replaces_chan, c);</span><br><span style="color: hsl(120, 100%, 40%);">+           }</span><br><span>            ast_hangup(c);</span><br><span>       }</span><br><span>    ast_channel_unref(c);</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/10451">change 10451</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/10451"/><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-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: Ieb1442027a3ce6ae55faca47bc095e53972f947a </div>
<div style="display:none"> Gerrit-Change-Number: 10451 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Jasper Hafkenscheid <jasper.hafkenscheid@wearespindle.com> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 (1000185) </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Richard Mudgett <rmudgett@digium.com> </div>