public static Bridge create ( final BandwidthClient client , final String callId1 , final String callId2 ) throws Exception { assert ( callId1 != null ) ; final HashMap < String , Object > params = new HashMap < String , Object > ( ) ; params . put ( "bridgeAudio" , "true" ) ; String [ ] callIds = null ; if ( callId1 != null && callId2 != null ) { callIds = new String [ ] { callId1 , callId2 } ; } else if ( callId1 != null && callId2 == null ) { callIds = new String [ ] { callId1 } ; } else if ( callId1 == null && callId2 != null ) { callIds = new String [ ] { callId2 } ; } params . put ( "callIds" , callIds == null ? Collections . emptyList ( ) : Arrays . asList ( callIds ) ) ; return create ( client , params ) ; }
Convenience method to create a Bridge object from two call ids