[asterisk-dev] [Code Review] 2619: Add stasis events for transfers

Matt Jordan reviewboard at asterisk.org
Tue Jun 25 13:22:59 CDT 2013


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

Ship it!



/trunk/main/manager_bridging.c
<https://reviewboard.asterisk.org/r/2619/#comment17645>

    Definitely make a JIRA issue for this. We'll need to work out how to handle that.



/trunk/main/stasis_bridging.c
<https://reviewboard.asterisk.org/r/2619/#comment17646>

    IIRC, we used the nomenclature of LocalOne* and LocalTwo* in other local channel related events.
    
    It may be better to be consistent and lose the semantic meaning from the key names - up to you.


- Matt Jordan


On June 24, 2013, 6:15 p.m., Mark Michelson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2619/
> -----------------------------------------------------------
> 
> (Updated June 24, 2013, 6:15 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Bugs: ASTERISK-21337
>     https://issues.asterisk.org/jira/browse/ASTERISK-21337
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> This adds two new stasis message types: BlindTransfer and AttendedTransfer.
> 
> The blind transfer message is pretty straightforward. It has a channel snapshot for the transferer channel, a bridge snapshot of the involved bridge, the result of the transfer, an indicator of whether the transfer was externally-initiated, and the context and extension to which the transfer occurred.
> 
> The attended transfer message is more complicated. It has two transferer channel snapshots (the transferer bridged to the transferee and the transferer bridged to the transfer target), two bridge snapshots (the two bridges the transferer channels were in), the result of the transfer, an indicator of whether the transfer was externally initiated, and then some variable data to show the ending state of the transfer, depending on how the transfer was performed. Possibilities for the variable data are:
> * A bridge ID of the surviving bridge of the attended transfer
> * An application name if the transfer resulted in a bridge or channel running a dialplan application
> * A pair of local channel snapshots and bridge IDs that illustrate a link between two bridges.
> 
> Tests have indicated that the stasis messages are being published correctly and the data in the messages is accurate. There are a couple of issues of note:
> 
> * Both external and internal blind transfers have stasis messages published; however only external attended transfers have stasis messages published. This is because internal attended transfers are about to receive a rewrite and I figure I'll put the stasis message publication in when I take on that task.
> * There is a consistency issue regarding when we publish the stasis messages. In the majority of cases, we publish the stasis message after the attended transfer operation has completed. We do this so that the event can have the result of the transfer, and so that, for the case of attended transfers, we know how the transfer was performed. In the case where a single party is transferred out of a bridge to an application, this is accomplished by queuing a bridge channel action. It is when this action is performed (by a separate thread) that the transfer is completed. In this situation, we face several issues:
>     1) Bridge channel action data cannot have any data that must be freed. This is because there is no guarantee that the frame will actually be read and acted upon.
>     2) I attempted to get around 1) by passing the name of a transferer channel as part of the frame data and then using ast_channel_get_by_name() to find the channel once the queued task was run. However, by the time this happened, the channel had already been hung up and removed from the system.
> 
> 
> Diffs
> -----
> 
>   /trunk/bridges/bridge_builtin_features.c 392727 
>   /trunk/channels/chan_iax2.c 392727 
>   /trunk/channels/chan_sip.c 392727 
>   /trunk/channels/chan_skinny.c 392727 
>   /trunk/include/asterisk/bridging.h 392727 
>   /trunk/include/asterisk/stasis_bridging.h 392727 
>   /trunk/main/bridging.c 392727 
>   /trunk/main/manager.c 392727 
>   /trunk/main/manager_bridging.c 392727 
>   /trunk/main/stasis_bridging.c 392727 
> 
> Diff: https://reviewboard.asterisk.org/r/2619/diff/
> 
> 
> Testing
> -------
> 
> I tested by creating a subscription for the transfer events and then printing the values of the data in the messages. I found blind transfers and the various types of attended transfers to have accurate data.
> 
> 
> Thanks,
> 
> Mark Michelson
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20130625/413b3124/attachment-0001.htm>


More information about the asterisk-dev mailing list