src/net/java/sip/communicator/service/protocol/media/TransportManager.java
/**
     * Creates <tt>DatagramSocket</tt> bind to <tt>localHostForPeer</tt>,
     * used the port numbers provided by <tt>portTracker</tt> and update it with
     * the result socket port so we do not try to bind to occupied ports.
     *
     * @param portTracker the port tracker.
     * @param localHostForPeer the address to bind to.
     * @return the newly created datagram socket.
     * @throws OperationFailedException if we fail to create the socket.
     */
Creates DatagramSocket bind to localHostForPeer,
used the port numbers provided by portTracker and update it with
the result socket port so we do not try to bind to occupied ports.

@param portTracker the port tracker.
@param localHostForPeer the address to bind to.
@return the newly created datagram socket.
@throws OperationFailedException if we fail to create the socket.
Creates DatagramSocket bind to localHostForPeer used the port numbers provided by portTracker and update it with the result socket port so we do not try to bind to occupied ports . @param portTracker the port tracker . @param localHostForPeer the address to bind to . @return the newly created datagram socket . @throws OperationFailedException if we fail to create the socket .
private DatagramSocket createDatagramSocket(
        PortTracker portTracker, InetAddress localHostForPeer)
        throws OperationFailedException
    {
        NetworkAddressManagerService nam
            = ProtocolMediaActivator.getNetworkAddressManagerService();
        DatagramSocket socket;
        try
        {
            socket = nam.createDatagramSocket(
                localHostForPeer, portTracker.getPort(),
                portTracker.getMinPort(), portTracker.getMaxPort());
        }
        catch (Exception exc)
        {
            throw new OperationFailedException(
                "Failed to allocate the network ports necessary for the call.",
                OperationFailedException.INTERNAL_ERROR, exc);
        }
        portTracker.setNextPort(socket.getLocalPort() + 1);
        return socket;
    }
private DatagramSocket createDatagramSocket ( PortTracker portTracker , InetAddress localHostForPeer ) throws OperationFailedException { NetworkAddressManagerService nam = ProtocolMediaActivator . getNetworkAddressManagerService ( ) ; DatagramSocket socket ; try { socket = nam . createDatagramSocket ( localHostForPeer , portTracker . getPort ( ) , portTracker . getMinPort ( ) , portTracker . getMaxPort ( ) ) ; } catch ( Exception exc ) { throw new OperationFailedException ( "Failed to allocate the network ports necessary for the call." , OperationFailedException . INTERNAL_ERROR , exc ) ; } portTracker . setNextPort ( socket . getLocalPort ( ) + 1 ) ; return socket ; }
Creates <tt>DatagramSocket</tt> bind to <tt>localHostForPeer</tt>,
 used the port numbers provided by <tt>portTracker</tt> and update it with
 the result socket port so we do not try to bind to occupied ports.
Creates <tt > DatagramSocket< / tt > bind to <tt > localHostForPeer< / tt > used the port numbers provided by <tt > portTracker< / tt > and update it with the result socket port so we do not try to bind to occupied ports .
//create the socket. //make sure that next time we don't try to bind on occupied ports