Package net.sourceforge.peers.sip.syntaxencoding

Examples of net.sourceforge.peers.sip.syntaxencoding.SipHeaderFieldValue.addParam()


       
        //From
       
        NameAddress fromNA = new NameAddress(profileUri);
        SipHeaderFieldValue from = new SipHeaderFieldValue(fromNA.toString());
        from.addParam(new SipHeaderParamName(RFC3261.PARAM_TAG),
                Utils.generateTag());
        headers.add(new SipHeaderFieldName(RFC3261.HDR_FROM), from);
       
        //Call-ID
       
View Full Code Here


                if (colonPos < 0) {
                    colonPos = sentBy.length();
                }
                sentBy = sentBy.substring(0, colonPos);
                if (!InetAddress.getByName(sentBy).equals(sourceIp)) {
                    topVia.addParam(new SipHeaderParamName(
                            RFC3261.PARAM_RECEIVED),
                            sourceIp.getHostAddress());
                }
            }
            //RFC3581
View Full Code Here

            SipHeaderParamName rportName = new SipHeaderParamName(
                    RFC3261.PARAM_RPORT);
            String rport = topVia.getParam(rportName);
            if (rport != null && "".equals(rport)) {
                topVia.removeParam(rportName);
                topVia.addParam(rportName, String.valueOf(sourcePort));
            }
           
            ServerTransaction serverTransaction =
                transactionManager.getServerTransaction(sipRequest);
            if (serverTransaction == null) {
View Full Code Here

                logger);
       
        this.transport = transport;
       
        SipHeaderFieldValue via = new SipHeaderFieldValue("");
        via.addParam(new SipHeaderParamName(RFC3261.PARAM_BRANCH), branchId);
        sipRequest.getSipHeaders().add(new SipHeaderFieldName(RFC3261.HDR_VIA), via, 0);
       
        nbRetrans = 0;
       
        INIT = new InviteClientTransactionStateInit(getId(), this, logger);
View Full Code Here

            transport = TRANSPORT_TCP;
        }
        buf.append(transport);
        if (inetAddress.isMulticastAddress()) {
            SipHeaderParamName maddrName = new SipHeaderParamName(PARAM_MADDR);
            via.addParam(maddrName, inetAddress.getHostAddress());
            if (inetAddress instanceof Inet4Address) {
                SipHeaderParamName ttlName = new SipHeaderParamName(PARAM_TTL);
                via.addParam(ttlName, IPV4_TTL);
            }
        }
View Full Code Here

        if (inetAddress.isMulticastAddress()) {
            SipHeaderParamName maddrName = new SipHeaderParamName(PARAM_MADDR);
            via.addParam(maddrName, inetAddress.getHostAddress());
            if (inetAddress instanceof Inet4Address) {
                SipHeaderParamName ttlName = new SipHeaderParamName(PARAM_TTL);
                via.addParam(ttlName, IPV4_TTL);
            }
        }
        //RFC3581
        //TODO check config
        via.addParam(new SipHeaderParamName(RFC3261.PARAM_RPORT), "");
View Full Code Here

                via.addParam(ttlName, IPV4_TTL);
            }
        }
        //RFC3581
        //TODO check config
        via.addParam(new SipHeaderParamName(RFC3261.PARAM_RPORT), "");

        buf.append(TRANSPORT_VIA_SEP2);//space
       
        //TODO user server connection
       
View Full Code Here

        SipHeaderParamName toTagParamName = new SipHeaderParamName(RFC3261.PARAM_TAG);
        String toTag = toValue.getParam(toTagParamName);
        if (toTag == null) {
            if (dialog != null) {
                toTag = dialog.getLocalTag();
                toValue.addParam(toTagParamName, toTag);
            }
        }
        responseHeaders.add(toName, toValue);
        return sipResponse;
    }
View Full Code Here

        //To
       
        SipHeaderFieldValue to = new SipHeaderFieldValue(
                new NameAddress(remoteUri).toString());
        if (remoteTag != null) {
            to.addParam(new SipHeaderParamName(RFC3261.PARAM_TAG), remoteTag);
        }
        headers.add(new SipHeaderFieldName(RFC3261.HDR_TO), to);
       
        //From
       
View Full Code Here

        //From
       
        SipHeaderFieldValue from = new SipHeaderFieldValue(
                new NameAddress(localUri).toString());
        if (localTag != null) {
            from.addParam(new SipHeaderParamName(RFC3261.PARAM_TAG), localTag);
        }
        headers.add(new SipHeaderFieldName(RFC3261.HDR_FROM), from);
       
        //Call-ID
       
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.