[asterisk-dev] [Code Review] 3857: Ensure that channels that move from a stasis bridge to a non-stasis bridge have a StasisEnd sent at an appropriate time.

Mark Michelson reviewboard at asterisk.org
Mon Jul 28 12:21:10 CDT 2014


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

(Updated July 28, 2014, 5:21 p.m.)


Review request for Asterisk Developers.


Changes
-------

This addresses opticron's findings.

* There is now a move feature hook instead of a callback on the bridge channel.
* The datastore used for indicating that a stasis end has been published for a channel is now removed upon entering stasis and is removed upon exiting as well. This way, there should not be a way for the datastore to get added twice.


Repository: Asterisk


Description
-------

Channels have the ability to cross the boundary from Stasis to being not in Stasis by sneaky means, such as the AMI Bridge action. This changeset seeks to detect the condition where a channel is moved directly from a Stasis bridge to a non-Stasis bridge. When such a thing occurs, after the ChannelLeftBridge event, we issue a StasisEnd and unsubscribe the Stasis app from that channel's further doings.


Diffs (updated)
-----

  /team/group/ari-greedy-atxfer/res/stasis/stasis_bridge.c 419681 
  /team/group/ari-greedy-atxfer/res/res_stasis.c 419681 
  /team/group/ari-greedy-atxfer/main/bridge.c 419681 
  /team/group/ari-greedy-atxfer/include/asterisk/stasis_app.h 419681 
  /team/group/ari-greedy-atxfer/include/asterisk/bridge_features.h 419681 

Diff: https://reviewboard.asterisk.org/r/3857/diff/


Testing
-------

Tested this in the following way:

Create a bridge in ARI.
Have two phones call into Stasis.
Add both phones to the ARI bridge.
Use AMI Bridge action to move both channels into a non-Stasis bridge.

I have ensured that each channel sees a ChannelLeftBridge, followed by a StasisEnd event. No further events are emitted for the channels over the websocket.


Thanks,

Mark Michelson

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140728/9c26a6c6/attachment.html>


More information about the asterisk-dev mailing list