Package javax.sip.address

Examples of javax.sip.address.URI


      localAci.detach(this.getSbbLocalObject());
     
      FromHeader fromHeader = (FromHeader) request.getHeader(FromHeader.NAME);
      ToHeader toHeader = (ToHeader) request.getHeader(ToHeader.NAME);
      // From URI
      URI fromURI = fromHeader.getAddress().getURI();
      // To URI
      URI toURI = toHeader.getAddress().getURI();
      // In the Profile Table the port is not used
      ((SipURI)fromURI).removePort();
      ((SipURI)toURI).removePort();
     
      ArrayList targets = getBlockedArrayList(toURI.toString());
           
      if (targets != null) {
        // Cheking whether the caller is blocked by the called user
        for (int i = 0; i < targets.size(); i++) {
          if ((targets.get(i).toString()).equalsIgnoreCase(fromURI.toString())) {
View Full Code Here


                AuthorizationHeader authorization = null;
                String sipDomain;
                if ( this.accountManager instanceof SecureAccountManager ) {
                    UserCredentialHash credHash =
                        ((SecureAccountManager)this.accountManager).getCredentialHash(challengedTransaction,realm);
                    URI uri = reoriginatedRequest.getRequestURI();
                    sipDomain = credHash.getSipDomain();
                    authorization = this.getAuthorization(reoriginatedRequest
                            .getMethod(), uri.toString(),
                            (reoriginatedRequest.getContent() == null) ? "" : new String(
                            reoriginatedRequest.getRawContent()), authHeader, credHash);
                } else {
                    UserCredentials userCreds = ((AccountManager) this.accountManager).getCredentials(challengedTransaction, realm);
                    sipDomain = userCreds.getSipDomain();
View Full Code Here

    // @Override
    public boolean equals(Object that) {
        if (this==that) return true;
        else if (that instanceof URI) {
            final URI o = (URI) that;

            // This is not sufficient for equality; revert to String equality...
            // return this.getScheme().equalsIgnoreCase( o.getScheme() )
            return this.toString().equalsIgnoreCase( o.toString() );
        }
        return false;
    }
View Full Code Here

                routeHeader = headerFactory.createRouteHeader(routeAddress);

                // LETS CREATE OUR REQUEST AND
                ArrayList list = new ArrayList();
                list.add(viaHeader);
                URI requestURI = null;
                Request request = null;
                Request cancel = null;
                Request inviteRequest = null;

                requestURI = addressFactory.createURI("sip:" + localAddress);
View Full Code Here

    if (outgoingDialog == null || outgoingDialog.getState() == null) {
      // first request, no route available
      final RouteList routeList = request.getRouteHeaders();
      if (routeList != null) {
        final RouteHeader topRoute = routeList.get(0);
        final URI topRouteURI = topRoute.getAddress().getURI();
        if (topRouteURI.isSipURI()) {
          final SipURI topRouteSipURI = (SipURI) topRouteURI;
          if (topRouteSipURI.getHost().equals(listeningPointImpl.getIPAddress())
              && topRouteSipURI.getPort() == listeningPointImpl.getPort()) {
            if (routeList.size() > 1) {
              routeList.remove(0);
View Full Code Here

                routeHeader = headerFactory.createRouteHeader(routeAddress);

                // LETS CREATE OUR REQUEST AND
                ArrayList list = new ArrayList();
                list.add(viaHeader);
                URI requestURI = null;
                Request request = null;
                Request cancel = null;
                Request inviteRequest = null;

                requestURI = addressFactory.createURI("sip:" + localAddress);
View Full Code Here

                    if ( credHash == null ) {
                        sipStack.getStackLogger().logDebug("Could not find creds");
                        throw new SipException(
                        "Cannot find user creds for the given user name and realm");
                    }
                    URI uri = reoriginatedRequest.getRequestURI();
                    sipDomain = credHash.getSipDomain();
                    authorization = this.getAuthorization(reoriginatedRequest
                            .getMethod(), uri.toString(),
                            (reoriginatedRequest.getContent() == null) ? "" : new String(
                            reoriginatedRequest.getRawContent()), authHeader, credHash);
                } else {
                    UserCredentials userCreds = ((AccountManager) this.accountManager).getCredentials(challengedTransaction, realm);
                   
View Full Code Here

                routeHeader = headerFactory.createRouteHeader(routeAddress);

                // LETS CREATE OUR REQUEST AND
                ArrayList list = new ArrayList();
                list.add(viaHeader);
                URI requestURI = null;
                Request request = null;
                Request cancel = null;
                Request inviteRequest = null;

                requestURI = addressFactory.createURI("sip:" + localAddress);
View Full Code Here

    if (outgoingDialog == null || outgoingDialog.getState() == null) {
      // first request, no route available
      final RouteList routeList = request.getRouteHeaders();
      if (routeList != null) {
        final RouteHeader topRoute = routeList.get(0);
        final URI topRouteURI = topRoute.getAddress().getURI();
        if (topRouteURI.isSipURI()) {
          final SipURI topRouteSipURI = (SipURI) topRouteURI;
          if (topRouteSipURI.getHost().equals(listeningPointImpl.getIPAddress())
              && topRouteSipURI.getPort() == listeningPointImpl.getPort()) {
            if (routeList.size() > 1) {
              routeList.remove(0);
View Full Code Here

                AuthorizationHeader authorization = null;
                String sipDomain;
                if ( this.accountManager instanceof SecureAccountManager ) {
                    UserCredentialHash credHash =
                        ((SecureAccountManager)this.accountManager).getCredentialHash(challengedTransaction,realm);
                    URI uri = reoriginatedRequest.getRequestURI();
                    sipDomain = credHash.getSipDomain();
                    authorization = this.getAuthorization(reoriginatedRequest
                            .getMethod(), uri.toString(),
                            (reoriginatedRequest.getContent() == null) ? "" : new String(
                            reoriginatedRequest.getRawContent()), authHeader, credHash);
                } else {
                    UserCredentials userCreds = ((AccountManager) this.accountManager).getCredentials(challengedTransaction, realm);
                    sipDomain = userCreds.getSipDomain();
View Full Code Here

TOP

Related Classes of javax.sip.address.URI

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.