Package javax.sip.address

Examples of javax.sip.address.Address


        if (header == null)
        {
            return null;
        }
       
        Address addr =  header.getAddress();
        if (addr == null)
        {
            return null;
        }       
       
       return addr.getURI().toString();
     }
View Full Code Here


        if (header == null)
        {
            return null;
        }
       
        Address addr =  header.getAddress();
        if (addr == null)
        {
            return null;
        }       
       
        URI uri = addr.getURI();
        if(uri == null)
        {
            return null;
        }
       
View Full Code Here

        if (header == null)
        {
            return null;
        }
       
        Address addr =  header.getAddress();
        if (addr == null)
        {
            return null;
        }       
       
        return addr.getDisplayName();
     }
View Full Code Here

        if (header == null)
        {
            return null;
        }
       
        Address addr =  header.getAddress();
        if (addr == null)
        {
            return null;
        }       
       
        URI uri = addr.getURI();
        if(uri == null)
        {
            return null;
        }
       
View Full Code Here

                // if there was trouble with the user - make sure we fix it
                if (uri.isSipURI()) {
                    ((SipURI) uri).setUser(ccEntry.userCredentials
                            .getUserName());
                    Address add = from.getAddress();
                    add.setURI(uri);
                    from.setAddress(add);
                    reoriginatedRequest.setHeader(from);
                    if (challengedRequest.getMethod().equals(Request.REGISTER)) {
                        ToHeader to = (ToHeader) reoriginatedRequest
                                .getHeader(ToHeader.NAME);
                        add.setURI(uri);
                        to.setAddress(add);
                        reoriginatedRequest.setHeader(to);

                    }
View Full Code Here

    void processTimeout(Transaction transatcion, Request request) {
        isRegistered = true;
        FromHeader fromHeader = ((FromHeader) request
                .getHeader(FromHeader.NAME));
        Address address = fromHeader.getAddress();
        sipManCallback.fireUnregistered("Request timeouted for: "
                + address.toString());
    }
View Full Code Here

    void processNotImplemented(ClientTransaction transatcion, Response response) {
        isRegistered = true;
        FromHeader fromHeader = ((FromHeader) response
                .getHeader(FromHeader.NAME));
        Address address = fromHeader.getAddress();
        sipManCallback.fireUnregistered("Server returned NOT_IMPLEMENTED. "
                + address.toString());
    }
View Full Code Here

            throws CommunicationsException {
        try {
            isUnregistering = false;
            // From
            FromHeader fromHeader = sipManCallback.getFromHeader(true);
            Address fromAddress = fromHeader.getAddress();
            sipManCallback.fireRegistering(fromAddress.toString());
            // Request URI
            SipURI requestURI = null;
            try {
                requestURI = sipManCallback.addressFactory.createSipURI(null,
                        registrarAddress);
            }
            catch (ParseException ex) {

                throw new CommunicationsException("Bad registrar address:"
                        + registrarAddress, ex);
            }
            catch (NullPointerException ex) {
                // Do not throw an exc, we should rather silently notify the
                // user
                // throw new CommunicationsException("A registrar address was
                // not specified!", ex);
                sipManCallback.fireUnregistered(fromAddress.getURI().toString()
                        + " (registrar not specified)");
                return;
            }

            requestURI.setPort(registrarPort);
View Full Code Here

                    .createURI(currentlyUsedURI);

            fromURI.setTransportParam(listeningPoint.getTransport());

            fromURI.setPort(listeningPoint.getPort());
            Address fromAddress = addressFactory.createAddress(fromURI);
            if (displayName != null && displayName.trim().length() > 0) {
                fromAddress.setDisplayName(displayName);
            } else {
                fromAddress
                        .setDisplayName(UserCredentials.getUserDisplay());// UserCredentials.getUser());
                // JOptionPane.showMessageDialog(null,currentlyUsedURI);
            }
            fromHeader = headerFactory.createFromHeader(fromAddress,
                    Integer.toString(hashCode()));
View Full Code Here

                contactURI = (SipURI) addressFactory
                        .createURI(currentlyUsedURI);
            }

            contactURI.setPort(publicIpAddress.getPort());
            Address contactAddress = addressFactory
                    .createAddress(contactURI);
            if (displayName != null && displayName.trim().length() > 0) {
                contactAddress.setDisplayName(displayName);
            }
            contactHeader = headerFactory
                    .createContactHeader(contactAddress);

        }
View Full Code Here

TOP

Related Classes of javax.sip.address.Address

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.