[asterisk-dev] Detecting B-leg channels

Nikša Baldun it at voxdiversa.hr
Tue Aug 24 14:26:59 CDT 2021


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.

On 24. 08. 2021. 20:51, Kevin Harwell wrote:
> 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.
>
> On Mon, Aug 23, 2021 at 5:29 AM Nikša Baldun <it at voxdiversa.hr 
> <mailto:it at voxdiversa.hr>> wrote:
>
>     Hello,
>
>     I am trying to modify bridge.c (function
>     ast_bridge_transfer_attended)
>     in order to send channels involved in SIP attended transfer to the
>     dialplan. If both transferee and transfer target are bridged, that is
>     relatively easy. However, if transfer target is ringing, I don't know
>     how to find B-leg channels (there could be multiple, I suppose).
>     So the
>     question is, having a reference to A-leg channel, how to obtain a
>     list
>     of B-leg channels?
>
>     Best regards,
>
>
>     -- 
>     _____________________________________________________________________
>     -- Bandwidth and Colocation Provided by http://www.api-digital.com
>     <http://www.api-digital.com> --
>
>     asterisk-dev mailing list
>     To UNSUBSCRIBE or update options visit:
>     http://lists.digium.com/mailman/listinfo/asterisk-dev
>     <http://lists.digium.com/mailman/listinfo/asterisk-dev>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20210824/2b5363a1/attachment.html>


More information about the asterisk-dev mailing list