Package javax.sip.header

Examples of javax.sip.header.ViaHeader


        // always use TLS when secure
        String transport = sipUri.isSecure() ? SIPConstants.TLS : sipUri
                .getTransportParam();
        if (transport == null) {
            //@see issue 131
            ViaHeader via = (ViaHeader) request.getHeader(ViaHeader.NAME);
            transport = via.getTransport();
        }

        // sipUri.removeParameter("transport");

        int port;
View Full Code Here


                // Create ViaHeaders

                ArrayList viaHeaders = new ArrayList();
                String ipAddress = udpListeningPoint.getIPAddress();
                ViaHeader viaHeader = headerFactory.createViaHeader(ipAddress,
                        sipProvider.getListeningPoint(transport).getPort(),
                        transport, null);

                // add via headers
                viaHeaders.add(viaHeader);
View Full Code Here

                // Create ViaHeaders

                ArrayList viaHeaders = new ArrayList();
                String ipAddress = udpListeningPoint.getIPAddress();
                ViaHeader viaHeader = headerFactory.createViaHeader(ipAddress,
                        sipProvider.getListeningPoint(transport).getPort(),
                        transport, null);

                // add via headers
                viaHeaders.add(viaHeader);
View Full Code Here

            ListeningPoint lp = mySipProvider.getListeningPoint(transport);

            // Create ViaHeaders

            ArrayList viaHeaders = new ArrayList();
            ViaHeader viaHeader = headerFactory.createViaHeader("127.0.0.1",
                    lp.getPort(), transport, null);

            // add via headers
            viaHeaders.add(viaHeader);
View Full Code Here

     * @param request the Request whose branchID we'd like to remove.
     *
     */
    private void removeBranchID(Request request) {

        ViaHeader viaHeader = (ViaHeader) request.getHeader(ViaHeader.NAME);

        viaHeader.removeParameter("branch");

    }
View Full Code Here

      // create Request URI
      SipURI requestURI = addressFactory.createSipURI(from, "127.0.0.1:5070");

      // Create ViaHeaders
      ArrayList viaHeaders = new ArrayList();
      ViaHeader viaHeader = headerFactory.createViaHeader("127.0.0.1",
          sipProvider.getListeningPoint(transport).getPort(), transport, null);
      viaHeaders.add(viaHeader);

      // Create a new CallId header
      CallIdHeader callIdHeader = callId;
View Full Code Here

      // create Request URI
      SipURI requestURI = addressFactory.createSipURI(from, "127.0.0.1:5080");

      // Create ViaHeaders
      ArrayList viaHeaders = new ArrayList();
      ViaHeader viaHeader = headerFactory.createViaHeader("127.0.0.1",
          sipProvider.getListeningPoint(transport).getPort(), transport, null);
      viaHeaders.add(viaHeader);

      // Create a new CallId header
      CallIdHeader callIdHeader = sipProvider.getNewCallId();
View Full Code Here

            SipURI requestURI = protocolObjects.addressFactory.createSipURI(toUser, peerHostPort);

            // Create ViaHeaders

            ArrayList viaHeaders = new ArrayList();
            ViaHeader viaHeader = protocolObjects.headerFactory.createViaHeader(host, sipProvider
                    .getListeningPoint(protocolObjects.transport).getPort(),
                    protocolObjects.transport, null);

            // add via headers
            viaHeaders.add(viaHeader);
View Full Code Here

                            sipUri);
                    RouteHeader rheader = protocolObjects.headerFactory
                            .createRouteHeader(address);

                    newRequest.addFirst(rheader);
                    ViaHeader viaHeader = protocolObjects.headerFactory.createViaHeader(host,
                            port, protocolObjects.transport, null);
                    newRequest.addFirst(viaHeader);
                    ClientTransaction ct1 = sipProvider.getNewClientTransaction(newRequest);
                    sipUri = protocolObjects.addressFactory.createSipURI("proxy", "127.0.0.1");
                    address = protocolObjects.addressFactory.createAddress("proxy", sipUri);
View Full Code Here

  public boolean equals(Object other) {
   
    if (other==this) return true;
   
    if (other instanceof ViaHeader) {
      final ViaHeader o = (ViaHeader) other;
      return getProtocol().equalsIgnoreCase( o.getProtocol() )
        && getTransport().equalsIgnoreCase( o.getTransport() )
        && getHost().equalsIgnoreCase( o.getHost() )
        && getPort() == o.getPort()
        && equalParameters( o );
    }
    return false;
  }
View Full Code Here

TOP

Related Classes of javax.sip.header.ViaHeader

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.