Package org.zoolu.sip.address

Examples of org.zoolu.sip.address.SipURL


            if (!msg.isAck()) sip_provider.sendMessage(err_resp);
            return;
         }

         // target
         SipURL target=msg.getRequestLine().getAddress()
        
         // check if this server is the target
         //boolean this_is_target=isResponsibleFor(target.getHost(),target.getPort());        

         // look if the msg sent by the previous UA is compliant with the RFC2543 Strict Route rule..
         if (isResponsibleFor(target.getHost(),target.getPort()) && msg.hasRouteHeader())
         { 
            //SipURL route_url=msg.getRouteHeader().getNameAddress().getAddress();
            SipURL route_url=(new RouteHeader(msg.getRoutes().getBottom())).getNameAddress().getAddress();
            if (!route_url.hasLr())
            {  printLog("probably the message was compliant to RFC2543 Strict Route rule: message is updated to RFC3261",LogLevel.MEDIUM);

               // the message has been sent to this server according with RFC2543 Strict Route
               // the proxy MUST replace the Request-URI in the request with the last
               // value from the Route header field, and remove that value from the
View Full Code Here


      return it_is;
   }
  
   /** Whether the server is responsible for the request-uri of the request <i>req</i>. */
   protected boolean isResponsibleFor(Message req)
   {  SipURL target=req.getRequestLine().getAddress();
      return isResponsibleFor(target.getHost(),target.getPort());
   }
View Full Code Here

     * @return returns the proper next-hop SipURL for the selected URL
     * if the routing rule matches the URL, otherwise it returns null. */
   public SipURL getNexthop(SipURL sip_url)
   {  String username=sip_url.getUserName();
      if ((username!=null && username.startsWith(prefix)) || prefix.equalsIgnoreCase(DEFAULT_PREFIX))
      {  return new SipURL(username,nexthop.getAddress().toString(),nexthop.getPort());
      }
      else return null;
   }
View Full Code Here

     * @return returns the proper next-hop SipURL for the selected URL
     * if the routing rule matches the URL, otherwise it returns null. */
   public SipURL getNexthop(SipURL sip_url)
   {  String host=sip_url.getHost();
      if ((host.equalsIgnoreCase(domain)))
      {  return new SipURL(sip_url.getUserName(),nexthop.getAddress().toString(),nexthop.getPort());
      }
      else return null;
   }
View Full Code Here

      return -1;
   }
  
   /** Makes a SipURL from ViaHeader */
   public SipURL getSipURL()
   {  return new SipURL(getHost(),getPort());
   }  
View Full Code Here

TOP

Related Classes of org.zoolu.sip.address.SipURL

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.