Package javax.sip.header

Examples of javax.sip.header.Header


                request.addHeader(contactHeader);

                // You can add extension headers of your own making
                // to the outgoing SIP request.
                // Add the extension header.
                Header extensionHeader = headerFactory.createHeader("My-Header",
                        "my header value");
                request.addHeader(extensionHeader);

                String sdpData = "v=0\r\n"
                        + "o=4855 13760799956958020 13760799956958020"
                        + " IN IP4  129.6.55.78\r\n" + "s=mysession session\r\n"
                        + "p=+46 8 52018010\r\n" + "c=IN IP4  129.6.55.78\r\n"
                        + "t=0 0\r\n" + "m=audio 6022 RTP/AVP 0 4 18\r\n"
                        + "a=rtpmap:0 PCMU/8000\r\n" + "a=rtpmap:4 G723/8000\r\n"
                        + "a=rtpmap:18 G729A/8000\r\n" + "a=ptime:20\r\n";
                byte[] contents = sdpData.getBytes();

                request.setContent(contents, contentTypeHeader);
                // You can add as many extension headers as you
                // want.

                extensionHeader = headerFactory.createHeader("My-Other-Header",
                        "my new header value ");
                request.addHeader(extensionHeader);

                Header callInfoHeader = headerFactory.createHeader("Call-Info",
                        "<http://www.antd.nist.gov>");
                request.addHeader(callInfoHeader);

                // Create the client transaction.
                ClientTransaction inviteTid = sipProvider.getNewClientTransaction(request);
View Full Code Here


                request.addHeader(contactHeader);

                // You can add extension headers of your own making
                // to the outgoing SIP request.
                // Add the extension header.
                Header extensionHeader = headerFactory.createHeader("My-Header",
                        "my header value");
                request.addHeader(extensionHeader);

                String sdpData = "v=0\r\n"
                        + "o=4855 13760799956958020 13760799956958020"
                        + " IN IP4  129.6.55.78\r\n" + "s=mysession session\r\n"
                        + "p=+46 8 52018010\r\n" + "c=IN IP4  129.6.55.78\r\n"
                        + "t=0 0\r\n" + "m=audio 6022 RTP/AVP 0 4 18\r\n"
                        + "a=rtpmap:0 PCMU/8000\r\n" + "a=rtpmap:4 G723/8000\r\n"
                        + "a=rtpmap:18 G729A/8000\r\n" + "a=ptime:20\r\n";
                byte[] contents = sdpData.getBytes();

                request.setContent(contents, contentTypeHeader);
                // You can add as many extension headers as you
                // want.

                extensionHeader = headerFactory.createHeader("My-Other-Header",
                        "my new header value ");
                request.addHeader(extensionHeader);

                Header callInfoHeader = headerFactory.createHeader("Call-Info",
                        "<http://www.antd.nist.gov>");
                request.addHeader(callInfoHeader);

                // Create the client transaction.
                ClientTransaction inviteTid = sipProvider.getNewClientTransaction(request);
View Full Code Here

            // Dont use the Outbound Proxy. Use Lr instead.
            request.setHeader(routeHeader);

            // Add the extension header.
            Header extensionHeader = protocolObjects.headerFactory.createHeader("My-Header",
                    "my header value");
            request.addHeader(extensionHeader);

            String sdpData = "v=0\r\n" + "o=4855 13760799956958020 13760799956958020"
                    + " IN IP4  129.6.55.78\r\n" + "s=mysession session\r\n"
                    + "p=+46 8 52018010\r\n" + "c=IN IP4  129.6.55.78\r\n" + "t=0 0\r\n"
                    + "m=audio 6022 RTP/AVP 0 4 18\r\n" + "a=rtpmap:0 PCMU/8000\r\n"
                    + "a=rtpmap:4 G723/8000\r\n" + "a=rtpmap:18 G729A/8000\r\n"
                    + "a=ptime:20\r\n";
            byte[] contents = sdpData.getBytes();

            request.setContent(contents, contentTypeHeader);

            extensionHeader = protocolObjects.headerFactory.createHeader("My-Other-Header",
                    "my new header value ");
            request.addHeader(extensionHeader);

            Header callInfoHeader = protocolObjects.headerFactory.createHeader("Call-Info",
                    "<http://www.antd.nist.gov>");
            request.addHeader(callInfoHeader);

            // Create the client transaction.
            inviteTid = sipProvider.getNewClientTransaction(request);
View Full Code Here

  public List<String> getHeadersAsEncodedStrings() {
    List<String> retval = new LinkedList<String>();

    ListIterator<HDR> li = hlist.listIterator();
    while (li.hasNext()) {
      Header sipheader = li.next();
      retval.add(sipheader.toString());

    }

    return retval;
View Full Code Here

  }

  protected final SIPHeaderList<HDR> clonehlist(List<HDR> hlistToClone) {
    if (hlistToClone != null) {
      for (Iterator<HDR> it = (Iterator<HDR>) hlistToClone.iterator(); it.hasNext();) {
        Header h = it.next();
        this.hlist.add((HDR)h.clone());
      }
    }
    return this;
  }
View Full Code Here

      // Dont use the Outbound Proxy. Use Lr instead.
      request.setHeader(routeHeader);

      // Add the extension header.
      Header extensionHeader = protocolObjects.headerFactory
          .createHeader("My-Header", "my header value");
      request.addHeader(extensionHeader);

      String sdpData = "v=0\r\n"
          + "o=4855 13760799956958020 13760799956958020"
          + " IN IP4  129.6.55.78\r\n" + "s=mysession session\r\n"
          + "p=+46 8 52018010\r\n" + "c=IN IP4  129.6.55.78\r\n"
          + "t=0 0\r\n" + "m=audio 6022 RTP/AVP 0 4 18\r\n"
          + "a=rtpmap:0 PCMU/8000\r\n" + "a=rtpmap:4 G723/8000\r\n"
          + "a=rtpmap:18 G729A/8000\r\n" + "a=ptime:20\r\n";
      byte[] contents = sdpData.getBytes();

      request.setContent(contents, contentTypeHeader);

      extensionHeader = protocolObjects.headerFactory.createHeader(
          "My-Other-Header", "my new header value ");
      request.addHeader(extensionHeader);

      Header callInfoHeader = protocolObjects.headerFactory.createHeader(
          "Call-Info", "<http://www.antd.nist.gov>");
      request.addHeader(callInfoHeader);

      // Create the client transaction.
      inviteTid = sipProvider.getNewClientTransaction(request);
View Full Code Here

      contactHeader = protocolObjects.headerFactory
          .createContactHeader(contactAddress);
      request.addHeader(contactHeader);

      // Add the extension header.
      Header extensionHeader = protocolObjects.headerFactory
          .createHeader("My-Header", "my header value");
      request.addHeader(extensionHeader);

      String sdpData = "v=0\r\n"
          + "o=4855 13760799956958020 13760799956958020"
          + " IN IP4  192.168.1.2\r\n" + "s=mysession session\r\n"
          + "p=+46 8 52018010\r\n" + "c=IN IP4  192.168.1.2\r\n"
          + "t=0 0\r\n" + "m=audio 6022 RTP/AVP 0 4 18\r\n"
          + "a=rtpmap:0 PCMU/8000\r\n" + "a=rtpmap:4 G723/8000\r\n"
          + "a=rtpmap:18 G729A/8000\r\n" + "a=ptime:20\r\n";

      request.setContent(sdpData, contentTypeHeader);

      // The following is the preferred method to route requests
      // to the peer. Create a route header and set the "lr"
      // parameter for the router header.

      Address address = protocolObjects.addressFactory
          .createAddress("<sips:" + PEER_ADDRESS + ":" + PEER_PORT
              + ">");
      // SipUri sipUri = (SipUri) address.getURI();
      // sipUri.setPort(PEER_PORT);

      RouteHeader routeHeader = protocolObjects.headerFactory
          .createRouteHeader(address);
      ((SipURI)address.getURI()).setLrParam();
      request.addHeader(routeHeader);
      extensionHeader = protocolObjects.headerFactory.createHeader(
          "My-Other-Header", "my new header value ");
      request.addHeader(extensionHeader);

      Header callInfoHeader = protocolObjects.headerFactory.createHeader(
          "Call-Info", "<http://[::1]/test.html>");
      request.addHeader(callInfoHeader);

      // Create the client transaction.
      this.inviteTid = provider.getNewClientTransaction(request);
View Full Code Here

                request.addHeader(contactHeader);

                // You can add extension headers of your own making
                // to the outgoing SIP request.
                // Add the extension header.
                Header extensionHeader = headerFactory.createHeader(
                        "My-Header", "my header value");
                request.addHeader(extensionHeader);

                String sdpData = "v=0\r\n"
                        + "o=4855 13760799956958020 13760799956958020"
                        + " IN IP4  129.6.55.78\r\n"
                        + "s=mysession session\r\n" + "p=+46 8 52018010\r\n"
                        + "c=IN IP4  129.6.55.78\r\n" + "t=0 0\r\n"
                        + "m=audio 6022 RTP/AVP 0 4 18\r\n"
                        + "a=rtpmap:0 PCMU/8000\r\n"
                        + "a=rtpmap:4 G723/8000\r\n"
                        + "a=rtpmap:18 G729A/8000\r\n" + "a=ptime:20\r\n";
                byte[] contents = sdpData.getBytes();

                request.setContent(contents, contentTypeHeader);
                // You can add as many extension headers as you
                // want.

                extensionHeader = headerFactory.createHeader("My-Other-Header",
                        "my new header value ");
                request.addHeader(extensionHeader);

                Header callInfoHeader = headerFactory.createHeader("Call-Info",
                        "<http://www.antd.nist.gov>");
                request.addHeader(callInfoHeader);

                // Create the client transaction.
                inviteTid = sipProvider.getNewClientTransaction(request);
View Full Code Here

        contactHeader = protocolObjects.headerFactory
            .createContactHeader(contactAddress);
        request.addHeader(contactHeader);

        // Add the extension header.
        Header extensionHeader = protocolObjects.headerFactory
            .createHeader("My-Header", "my header value");
        request.addHeader(extensionHeader);

        String sdpData = "v=0\r\n"
            + "o=4855 13760799956958020 13760799956958020"
            + " IN IP4  129.6.55.78\r\n" + "s=mysession session\r\n"
            + "p=+46 8 52018010\r\n" + "c=IN IP4  129.6.55.78\r\n"
            + "t=0 0\r\n" + "m=audio 6022 RTP/AVP 0 4 18\r\n"
            + "a=rtpmap:0 PCMU/8000\r\n" + "a=rtpmap:4 G723/8000\r\n"
            + "a=rtpmap:18 G729A/8000\r\n" + "a=ptime:20\r\n";

        request.setContent(sdpData, contentTypeHeader);

        // The following is the preferred method to route requests
        // to the peer. Create a route header and set the "lr"
        // parameter for the router header.

        Address address = protocolObjects.addressFactory
            .createAddress("<sip:" + PEER_ADDRESS + ":" + PEER_PORT
                + ">");
        // SipUri sipUri = (SipUri) address.getURI();
        // sipUri.setPort(PEER_PORT);

        RouteHeader routeHeader = protocolObjects.headerFactory
            .createRouteHeader(address);
        ((SipURI)address.getURI()).setLrParam();
        request.addHeader(routeHeader);
        extensionHeader = protocolObjects.headerFactory.createHeader(
            "My-Other-Header", "my new header value ");
        request.addHeader(extensionHeader);

        Header callInfoHeader = protocolObjects.headerFactory.createHeader(
            "Call-Info", "<http://www.antd.nist.gov>");
        request.addHeader(callInfoHeader);

        // Create the client transaction.
        this.inviteTid = provider.getNewClientTransaction(request);
View Full Code Here

                contactHeader = protocolObjects.headerFactory.createContactHeader(contactAddress);
                request.addHeader(contactHeader);

                // Add the extension header.
                Header extensionHeader = protocolObjects.headerFactory.createHeader("My-Header",
                        "my header value");
                request.addHeader(extensionHeader);

                String sdpData = "v=0\r\n" + "o=4855 13760799956958020 13760799956958020"
                        + " IN IP4  129.6.55.78\r\n" + "s=mysession session\r\n"
                        + "p=+46 8 52018010\r\n" + "c=IN IP4  129.6.55.78\r\n" + "t=0 0\r\n"
                        + "m=audio 6022 RTP/AVP 0 4 18\r\n" + "a=rtpmap:0 PCMU/8000\r\n"
                        + "a=rtpmap:4 G723/8000\r\n" + "a=rtpmap:18 G729A/8000\r\n"
                        + "a=ptime:20\r\n";

                request.setContent(sdpData, contentTypeHeader);

                // The following is the preferred method to route requests
                // to the peer. Create a route header and set the "lr"
                // parameter for the router header.

                Address address = protocolObjects.addressFactory.createAddress("<sip:"
                        + PEER_ADDRESS + ":" + PEER_PORT + ">");
                // SipUri sipUri = (SipUri) address.getURI();
                // sipUri.setPort(PEER_PORT);

                RouteHeader routeHeader = protocolObjects.headerFactory
                        .createRouteHeader(address);
                ((SipURI) address.getURI()).setLrParam();
                request.addHeader(routeHeader);
                extensionHeader = protocolObjects.headerFactory.createHeader("My-Other-Header",
                        "my new header value ");
                request.addHeader(extensionHeader);

                Header callInfoHeader = protocolObjects.headerFactory.createHeader("Call-Info",
                        "<http://www.antd.nist.gov>");
                request.addHeader(callInfoHeader);

                // Create the client transaction.
                this.inviteTid = provider.getNewClientTransaction(request);
View Full Code Here

TOP

Related Classes of javax.sip.header.Header

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.