<blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Patch Set 1:<br>> > (2 comments)<br> ><br> > Eventually a similar patch will need to be done for<br> > res_pjsip_refer.c as it will not send the pickup event either.<br>> Jasper,<br>> Were you planning on responding to Richard's feedback?<br>> Thanks,<br>Matthew Fredrickson</pre></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">Matthew,</p><p style="white-space: pre-wrap; word-wrap: break-word;">I am having trouble understanding your second comment about the<br>ConfBridge that is not returned in ast_bridge_transfer_acquire_bridge()<br>but is a bridge by the definition of ast_channel_get_bridge().</p><p style="white-space: pre-wrap; word-wrap: break-word;">I see that ast_bridge_transfer_acquire_bridge has an additional<br>check on a masquerade flag that is related to ConfBridge, but am<br>unsure how that is relevant in the handle_invite_replaces context.</p><p style="white-space: pre-wrap; word-wrap: break-word;">Should I wrap the ast_send_call_pickup_stasis_message call with an<br>if statement on the output of ast_channel_get_bridge()?</p><p style="white-space: pre-wrap; word-wrap: break-word;">Regards,<br>Jasper Hafkenscheid</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">I think I've found a better way to do the pickup since just sending the CEL event does not do several other things things such as connected line updates to affected parties and reporting answered elsewhere to the ringing endpoint.</p><p><a href="https://gerrit.asterisk.org/10448">View Change</a></p><p>1 comment:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.asterisk.org/#/c/10448/1/channels/chan_sip.c">File channels/chan_sip.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/10448/1/channels/chan_sip.c@25686">Patch Set #1, Line 25686:</a> </p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><pre style="font-family: monospace,monospace; white-space: pre-wrap;">   } else {<br>              RAII_VAR(struct ast_channel_snapshot *, chan_snapshot, NULL, ao2_cleanup);<br>            RAII_VAR(struct ast_channel_snapshot *, target_snapshot, NULL, ao2_cleanup);<br><br>                chan_snapshot = ast_channel_snapshot_create(c);<br>               target_snapshot = ast_channel_snapshot_get_latest(ast_channel_uniqueid(replaces_chan));<br><br>             ast_channel_move(replaces_chan, c);<br><br>         ast_send_call_pickup_stasis_message(replaces_chan, chan_snapshot, target_snapshot);<br>           ast_hangup(c);<br>        }<br></pre></blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Replacing the marked code (the else clause) with the following should be the complete patch needed to do the pickup:</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">} else {<br>     int pickedup;</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"> ast_channel_lock(replaces_chan);<br>      pickedup = ast_can_pickup(replaces_chan) && !ast_do_pickup(c, replaces_chan);<br> ast_channel_unlock(replaces_chan);<br>    if (!pickedup) {<br>              ast_channel_move(replaces_chan, c);<br>   }<br>     ast_hangup(c);<br>}</pre><p style="white-space: pre-wrap; word-wrap: break-word;">So you don't need to make send_call_picup_stasis_message() public anymore.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/10448">change 10448</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/10448"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: Ieb1442027a3ce6ae55faca47bc095e53972f947a </div>
<div style="display:none"> Gerrit-Change-Number: 10448 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Jasper Hafkenscheid <jasper.hafkenscheid@wearespindle.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jasper Hafkenscheid <jasper.hafkenscheid@wearespindle.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: Matthew Fredrickson <creslin@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Richard Mudgett <rmudgett@digium.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Thu, 01 Nov 2018 18:04:47 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-HasLabels: No </div>