Collection < AsteriskChannel > getChannels ( ) { Collection < AsteriskChannel > copy ; synchronized ( channels ) { copy = new ArrayList <> ( channels . size ( ) + 2 ) ; for ( AsteriskChannel channel : channels . values ( ) ) { if ( channel . getState ( ) != ChannelState . HUNGUP ) { copy . add ( channel ) ; } } } return copy ; }
Returns a collection of all active AsteriskChannels .