Re: [asterisk-dev] Detecting B-leg channels

2021-08-24 Thread Nikša Baldun
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 n

Re: [asterisk-dev] Detecting B-leg channels

2021-08-24 Thread Nikša Baldun
Yes, I suspected as much. I've seen that app_dial keeps a list of outbound channels, but doesn't store it anywhere. So that's a dead end, pretty much. On 24. 08. 2021. 20:45, George Joseph wrote: On Tue, Aug 24, 2021 at 12:20 PM Nikša Baldun > wrote: I have c

Re: [asterisk-dev] Detecting B-leg channels

2021-08-24 Thread Nikša Baldun
I have checked it, and that led me to bridge.c. Perhaps I wasn't clear enough. These are the channels involved in attended transfer: (transferee) <> (transferer1) (transferer2) <> (transfer target) Transferee and transfer target are not readily available in res_pjsip_refer.c, but I can get the

Re: [asterisk-dev] Detecting B-leg channels

2021-08-24 Thread Nikša Baldun
Hello, I am using chan_pjsip. On 24. 08. 2021. 18:55, George Joseph wrote: On Mon, Aug 23, 2021 at 4:29 AM Nikša Baldun > wrote: Hello, I am trying to modify bridge.c (function ast_bridge_transfer_attended) in order to send channels involved in SI

Re: [asterisk-dev] Detecting B-leg channels

2021-08-24 Thread George Joseph
On Tue, Aug 24, 2021 at 1:27 PM Nikša Baldun wrote: > 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 o

Re: [asterisk-dev] Detecting B-leg channels

2021-08-24 Thread Kevin Harwell
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 s

Re: [asterisk-dev] Detecting B-leg channels

2021-08-24 Thread George Joseph
On Tue, Aug 24, 2021 at 12:20 PM Nikša Baldun wrote: > I have checked it, and that led me to bridge.c. Perhaps I wasn't clear > enough. These are the channels involved in attended transfer: > > (transferee) <> (transferer1) (transferer2) <> (transfer target) > > Transferee and transfer target are

Re: [asterisk-dev] Detecting B-leg channels

2021-08-24 Thread George Joseph
On Tue, Aug 24, 2021 at 11:22 AM Nikša Baldun wrote: > Hello, > > I am using chan_pjsip. > Check res_pjsip_refer.c you may be able to intercept both channels there. > On 24. 08. 2021. 18:55, George Joseph wrote: > > > > On Mon, Aug 23, 2021 at 4:29 AM Nikša Baldun wrote: > >> Hello, >> >> I

Re: [asterisk-dev] Detecting B-leg channels

2021-08-24 Thread George Joseph
On Mon, Aug 23, 2021 at 4:29 AM Nikša Baldun 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. H