Package com.ericsson.ssa.sip.dns

Examples of com.ericsson.ssa.sip.dns.TargetTuple


        if (passertedHeader.hasNext() || ppreferredHeader.hasNext()) {
            PAssertedAuthenticator auth = (PAssertedAuthenticator) PAssertedAuthenticatorFactory.getInstance()
                                                                                                .getAuthenticator();

            if (auth != null) {
                TargetTuple remoteHost = ((SipServletRequestImpl) this).getRemote();
                String host = "";

                if (remoteHost != null) {
                    host = remoteHost.getIP();
                }

                auth.verifyMessage(this, host);
            }
        }
View Full Code Here


   
   
    private TargetTuple selectTTToUse(SipServletRequestImpl msg) {
        // check for the JSR 289 outbound interface in the message
        // if not found use the external address in sip-container
        TargetTuple outtt = null;
       
        OutboundInterface oi = msg.getOutboundInterface();
       
        SipBindingCtx sipBindingCtx = SipBindingResolver.instance().
                getActiveExternalContext();
        for (TargetTuple tt : sipBindingCtx.getTargetTuples()) {
            if (msg.getTransport().equalsIgnoreCase(tt.getProtocol().name())) {
                outtt = tt;
                break;
            }
        }
        if (oi == null) {
            return outtt;
        } else {
            int port = oi.getPort() == 0 ? outtt.getPort() : oi.getPort();
            return new TargetTuple(outtt.getProtocol(), oi.getHost(), port);
        }
    }
View Full Code Here

            if (via == null) {
                via = new MultiLineHeader(Header.VIA, true);
            }

            TargetTuple ttToUse = selectTTToUse(req);           

            if (log.isLoggable(Level.FINEST)) {
                log.log(Level.FINEST, "Via header transport: " +
                        ttToUse.getIP()+":"+ttToUse.getPort()+" Transport="+
                        ttToUse.getProtocol().name());
            }

            ViaImpl v = new ViaImpl(req.getProtocol(),
                    req.getTransport().toUpperCase(), ttToUse.getIP(),
                    ttToUse.getPort());
            String id = Transaction.generateBranch();
            v.setParameter(ViaImpl.PARAM_BRANCH, id);

            if (log.isLoggable(Level.FINE)) {
                log.log(Level.FINE, "Adding via = " + v);
View Full Code Here

TOP

Related Classes of com.ericsson.ssa.sip.dns.TargetTuple

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.