> On Jan. 28, 2015, 10:42 a.m., rmudgett wrote:
> > /branches/13/include/asterisk/bridge.h, lines 244-245
> > <https://reviewboard.asterisk.org/r/4382/diff/2/?file=71145#file71145line244>
> >
> >     Create a new typedef for the new callback.  Also the new callback 
> > doesn't need the swap parameter since that pointer is passed in with the 
> > bridge_channel parameter struct.

I'm assuming that there could be a case where having the swap's bridge_channel 
structure could be needed for other/future implementations.  I didn't write the 
support in for obtaining and passing that because I didn't need it to solve 
this problem.  Additionally, the return code should actually be checked to 
allow peek to cause a transfer to fail.  I'll go ahead and implement both.


- Scott


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4382/#review14341
-----------------------------------------------------------


On Jan. 27, 2015, 8:55 p.m., Scott Griepentrog wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/4382/
> -----------------------------------------------------------
> 
> (Updated Jan. 27, 2015, 8:55 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Bugs: ASTERISK-24649
>     https://issues.asterisk.org/jira/browse/ASTERISK-24649
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> During an attended transfer of a channel in stasis, where a local channel is 
> used to replace (swap in for) a PJSIP channel, there is a race condition.  
> The PJSIP REFER transfer has been initiated (ast_bridge_impart) but will be 
> completed later on another thread (bridge_channel_ind_thread), however, prior 
> to the stasis bridging callback (bridge_stasis_push) being called the PJSIP 
> channel is hungup, which allows the stasis app loop to exit, deleting the 
> stasis control.  That prevents the stasis bridge callback from getting the 
> app name from the channel being replaced (swap).
> 
> This patch adds a new stasis bridge callback push_peek, which is called from 
> the ast_bridge_impart() thread.  This allows the new 
> bridge_stasis_push_peek() function to copy the stasis app name from the 
> originating channel before the PJSIP channel can be hungup.
> 
> 
> Diffs
> -----
> 
>   /branches/13/res/stasis/stasis_bridge.c 431242 
>   /branches/13/main/bridge_channel.c 431242 
>   /branches/13/main/bridge.c 431242 
>   /branches/13/include/asterisk/bridge.h 431242 
> 
> Diff: https://reviewboard.asterisk.org/r/4382/diff/
> 
> 
> Testing
> -------
> 
> Running 
> tests/rest_api/external_interaction/attended_transfer/stasis_bridge_to_stasis_app
>  now does not result in an occasional failure.
> 
> 
> Thanks,
> 
> Scott Griepentrog
> 
>

-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

Reply via email to