public void successResponseReceived(String localAddress,
            String remoteAddress, int remotePort, Codec codec) {
        switch (userAgent.getMediaMode()) {
        case captureAndPlayback:
            //TODO this could be optimized, create captureRtpSender at stack init
            //     and just retrieve it here
            SoundManager soundManager = userAgent.getSoundManager();
            soundManager.openAndStartLines();
            
            InetAddress inetAddress;
            try {
                inetAddress = InetAddress.getByName(localAddress);
            } catch (UnknownHostException e) {
                logger.error("unknown host: " + localAddress, e);
                return;
            }
            
            rtpSession = new RtpSession(inetAddress, userAgent.getRtpPort(),
                    userAgent.isMediaDebug(), logger, userAgent.getPeersHome());
            
            try {
                inetAddress = InetAddress.getByName(remoteAddress);
                rtpSession.setRemoteAddress(inetAddress);
            } catch (UnknownHostException e) {
                logger.error("unknown host: " + remoteAddress, e);
            }
            rtpSession.setRemotePort(remotePort);
            
            
            try {
                captureRtpSender = new CaptureRtpSender(rtpSession,
                        soundManager, userAgent.isMediaDebug(), codec, logger,
                        userAgent.getPeersHome());
            } catch (IOException e) {
                logger.error("input/output error", e);
                return;
            }

            try {
                captureRtpSender.start();
            } catch (IOException e) {
                logger.error("input/output error", e);
            }
            
            try {
                //TODO retrieve port from SDP offer
//                    incomingRtpReader = new IncomingRtpReader(localAddress,
//                            Utils.getInstance().getRtpPort(),
//                            remoteAddress, remotePort);
                incomingRtpReader = new IncomingRtpReader(
                        captureRtpSender.getRtpSession(), soundManager, codec,
                        logger);
            } catch (IOException e) {
                logger.error("input/output error", e);
                return;
            }

            incomingRtpReader.start();
            break;

        case echo:
            Echo echo;
            try {
                echo = new Echo(localAddress, userAgent.getRtpPort(),
                            remoteAddress, remotePort, logger);
            } catch (UnknownHostException e) {
                logger.error("unknown host amongst "
                        + localAddress + " or " + remoteAddress);
                return;
            }
            userAgent.setEcho(echo);
            Thread echoThread = new Thread(echo);
            echoThread.start();
            break;
        case none:
        default:
            break;
        }
    }