<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Aug 24, 2021 at 1:27 PM Nikša Baldun <<a href="mailto:it@voxdiversa.hr">it@voxdiversa.hr</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<p>The thing is, when attended transfer happens, Asterisk connects
previously unrelated channels without going to the dialplan. I
keep a number of variables which help me track call state on both
channels, and their values become obsolete on attended transfer,
as channels are now in a completely new call. My idea was to gosub
both sides to a dialplan context so I can refresh call state
variables. But that has proven difficult if one of the calls is
not answered. I am certain this can't be solved by straight
dialplan, not without modifying Asterisk code. I haven't delved
into ARI yet. I'd rather avoid it, unless it is the only option.<br></p></div></blockquote><div>I'm not sure this would work for you but ... Have app_dial create a channel variable on the incoming channel that has the list of channels being dialed.</div><div><br></div><div>You could also use the DB functions to store key value pairs and have pre-dial-handlers on the outgoing channels store their IDs there keyed by the incoming channel. </div><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><p>
</p>
<div>On 24. 08. 2021. 20:51, Kevin Harwell
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>What's the overall scenario you are trying to solve?
Perhaps there is another way to do what you want to do without
even modifying Asterisk code? For example, maybe this is
something an ARI application could handle, or even straight
dialplan using a combination of app_dial, pre-dial handlers,
and such.</div>
<div dir="ltr"><br>
</div>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Mon, Aug 23, 2021 at 5:29
AM Nikša Baldun <<a href="mailto:it@voxdiversa.hr" target="_blank">it@voxdiversa.hr</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello,<br>
<br>
I am trying to modify bridge.c (function
ast_bridge_transfer_attended) <br>
in order to send channels involved in SIP attended transfer
to the <br>
dialplan. If both transferee and transfer target are
bridged, that is <br>
relatively easy. However, if transfer target is ringing, I
don't know <br>
how to find B-leg channels (there could be multiple, I
suppose). So the <br>
question is, having a reference to A-leg channel, how to
obtain a list <br>
of B-leg channels?<br>
<br>
Best regards,<br>
<br>
<br>
-- <br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer" target="_blank">http://www.api-digital.com</a>
--<br>
<br>
asterisk-dev mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-dev" rel="noreferrer" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-dev</a></blockquote>
</div>
</div>
<br>
<fieldset></fieldset>
</blockquote>
</div>
-- <br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer" target="_blank">http://www.api-digital.com</a> --<br>
<br>
asterisk-dev mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-dev" rel="noreferrer" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-dev</a></blockquote></div></div>