protected void computeOutboundInterfaces ( ) { if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Outbound Interface List : " ) ; } List < SipURI > newlyComputedOutboundInterfaces = new CopyOnWriteArrayList < SipURI > ( ) ; Set < String > newlyComputedOutboundInterfacesIpAddresses = new CopyOnWriteArraySet < String > ( ) ; Iterator < MobicentsExtendedListeningPoint > it = getExtendedListeningPoints ( ) ; while ( it . hasNext ( ) ) { MobicentsExtendedListeningPoint extendedListeningPoint = it . next ( ) ; for ( String ipAddress : extendedListeningPoint . getIpAddresses ( ) ) { try { newlyComputedOutboundInterfacesIpAddresses . add ( ipAddress ) ; javax . sip . address . SipURI jainSipURI = SipFactoryImpl . addressFactory . createSipURI ( null , ipAddress ) ; jainSipURI . setPort ( extendedListeningPoint . getPort ( ) ) ; jainSipURI . setTransportParam ( extendedListeningPoint . getTransport ( ) ) ; SipURI sipURI = new SipURIImpl ( jainSipURI , ModifiableRule . NotModifiable ) ; newlyComputedOutboundInterfaces . add ( sipURI ) ; if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Outbound Interface : " + jainSipURI ) ; } } catch ( ParseException e ) { logger . error ( "cannot add the following listening point " + ipAddress + ":" + extendedListeningPoint . getPort ( ) + ";transport=" + extendedListeningPoint . getTransport ( ) + " to the outbound interfaces" , e ) ; } } } outboundInterfaces = newlyComputedOutboundInterfaces ; outboundInterfacesIpAddresses = newlyComputedOutboundInterfacesIpAddresses ; }
Compute all the outbound interfaces for this manager