Examples of NameAddress


Examples of net.sourceforge.peers.sip.syntaxencoding.NameAddress

       
        Utils.addCommonHeaders(headers);
       
        //To
       
        NameAddress to = new NameAddress(requestUri);
        headers.add(new SipHeaderFieldName(RFC3261.HDR_TO),
                new SipHeaderFieldValue(to.toString()));
       
        //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

Examples of net.sourceforge.peers.sip.syntaxencoding.NameAddress

       
        // TODO add route header for outbound proxy give it to xxxHandler to create
        // clientTransaction
        SipURI outboundProxy = userAgent.getOutboundProxy();
        if (outboundProxy != null) {
            NameAddress outboundProxyNameAddress =
                new NameAddress(outboundProxy.toString());
            sipRequest.getSipHeaders().add(new SipHeaderFieldName(RFC3261.HDR_ROUTE),
                    new SipHeaderFieldValue(outboundProxyNameAddress.toString()), 0);
        }
        ClientTransaction clientTransaction = null;
        if (RFC3261.METHOD_INVITE.equals(method)) {
            clientTransaction = inviteHandler.preProcessInvite(sipRequest);
        } else if (RFC3261.METHOD_REGISTER.equals(method)) {
View Full Code Here

Examples of net.sourceforge.peers.sip.syntaxencoding.NameAddress

        String userPart = Utils.getUserPart(profileUri);
        contactBuf.append(userPart);
        contactBuf.append(RFC3261.AT);
        contactBuf.append(contactEnd);

        NameAddress contactNA = new NameAddress(contactBuf.toString());
        SipHeaderFieldValue contact =
            new SipHeaderFieldValue(contactNA.toString());
        sipHeaders.add(new SipHeaderFieldName(RFC3261.HDR_CONTACT),
                new SipHeaderFieldValue(contact.toString()));
    }
View Full Code Here

Examples of net.sourceforge.peers.sip.syntaxencoding.NameAddress

        SipHeaders headers = subsequentRequest.getSipHeaders();
       
        //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
       
        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);
       
View Full Code Here

Examples of org.apache.xmlbeans.samples.substitutiongroup.easypo.NameAddress

        PurchaseOrderDocument.PurchaseOrder purchaseOrderElement = poDoc.getPurchaseOrder();

        InvoiceHeaderDocument.InvoiceHeader invHeaders = purchaseOrderElement.addNewInvoiceHeader();

        // Assign values to the newly created invoice-header element.
        NameAddress shipto = invHeaders.addNewShipTo();
        shipto.setName("New Company");
        shipto.setAddress("NewTown, NewCity");

        NameAddress billto = invHeaders.addNewBillTo();
        billto.setName("New Company");
        billto.setAddress("NewTown, NewCity");
       
        // Create a new Book and add it to the invoice.
        BookType book = BookType.Factory.newInstance();
        book.setId(1000);
        book.setTitle("Where the Red Fern Grows");
        invHeaders.setProduct(book);
        XmlCursor cursor = invHeaders.getProduct().newCursor();
        cursor.setName(new QName("http://xmlbeans.apache.org/samples/substitutiongroup/easypo", "book"));
        cursor.dispose();

        // Creating a new comment - with substitution group member bill-comment element.
        invHeaders.setComment("This is a new bill-comment");
        cursor = invHeaders.xgetComment().newCursor();
        cursor.setName(new QName("http://xmlbeans.apache.org/samples/substitutiongroup/easypo", "bill-comment"));
        cursor.dispose();

        // Add another invoice-header.
        invHeaders = purchaseOrderElement.addNewInvoiceHeader();

        // Assign values to the newly created invoice-header element.
        shipto = invHeaders.addNewShipTo();
        shipto.setName("Other Company");
        shipto.setAddress("OtherTown, OtherCity");

        billto = invHeaders.addNewBillTo();
        billto.setName("Other Company");
        billto.setAddress("OtherTown, OtherCity");

        // Create a new Clothing and add it to the invoice.
        ClothingType clothing = ClothingType.Factory.newInstance();
        clothing.setId(2000);
        clothing.setColor(ClothingType.Color.BLUE);
View Full Code Here

Examples of org.zoolu.sip.address.NameAddress

   }
  
  
   /** Requests a call transfer */
   public void transfer(String transfer_to)
   {  ((ExtendedInviteDialog)dialog).refer(new NameAddress(transfer_to));
   }
View Full Code Here

Examples of org.zoolu.sip.address.NameAddress

         //t.listen();

         if (msg.isRefer())
         {  //Message resp=MessageFactory.createResponse(msg,202,"Accepted",null,null);
            //respond(resp);
            NameAddress refer_to=msg.getReferToHeader().getNameAddress();
            NameAddress referred_by=null;
            if (msg.hasReferredByHeader()) referred_by=msg.getReferredByHeader().getNameAddress();
            dialog_listener.onDlgRefer(this,refer_to,referred_by,msg);
         }
         else
         if (msg.isNotify())
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.