Revision: 16226
Author: vladimir.ralev
Date: Thu Jan  6 13:34:01 2011
Log: Update Issue 2244
Undo the fix. This will be fixed in JSIP for simplicity
http://code.google.com/p/mobicents/source/detail?r=16226

Modified:
/trunk/servers/sip-servlets/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/dispatchers/ResponseDispatcher.java /trunk/servers/sip-servlets/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/session/MobicentsSipSession.java /trunk/servers/sip-servlets/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/session/SipSessionImpl.java /trunk/servers/sip-servlets/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/message/MobicentsSipSessionFacade.java

=======================================
--- /trunk/servers/sip-servlets/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/dispatchers/ResponseDispatcher.java Mon Jan 3 05:51:04 2011 +++ /trunk/servers/sip-servlets/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/dispatchers/ResponseDispatcher.java Thu Jan 6 13:34:01 2011
@@ -143,8 +143,6 @@
                                }
                        }
                        final String branch = viaHeader.getBranch();
-
-                       final int status = sipServletResponse.getStatus();
String strippedBranchId = branch.substring(BRANCH_MAGIC_COOKIE.length());
                        int indexOfUnderscore = strippedBranchId.indexOf("_");
                        if(indexOfUnderscore == -1) {
@@ -217,16 +215,10 @@
                        } else {
// This piece of code move here due to Proxy-B2bua case for http://code.google.com/p/mobicents/issues/detail?id=1986 if(tmpSession.getProxy() == null && sipServletResponse.isRetransmission()) { - if(status == 183 && !response.toString().equals(tmpSession.getLast183Response())) {
-                                               if(logger.isDebugEnabled()) {
- logger.debug("early media changed http://code.google.com/p/mobicents/issues/detail?id=2251 , not a retransmission " + response);
-                                               }
-                                       } else {
-                                               if(logger.isDebugEnabled()) {
- logger.debug("retransmission received for a non proxy application, dropping the response " + response);
-                                               }
-                                               return ;
-                                       }
+                                       if(logger.isDebugEnabled()) {
+ logger.debug("retransmission received for a non proxy application, dropping the response " + response);
+                                       }
+                                       return ;
                                }
                                sipServletResponse.setSipSession(tmpSession);
                        }
@@ -253,6 +245,7 @@
                                                        if(originalRequest != 
null) {
                                                                
originalRequest.setResponse(sipServletResponse);
                                                        }
+                                                       final int status = 
sipServletResponse.getStatus();
// RFC 3265 : If a 200-class response matches such a SUBSCRIBE or REFER request,
                                                        // it creates a new 
subscription and a new dialog.
// Issue 1481 http://code.google.com/p/mobicents/issues/detail?id=1481
@@ -332,16 +325,10 @@
// This issue showed that retransmissions of 180 Ringing were passed // to the application so we make sure to drop them in case of UAC/UAS
                                                                
if(sipServletResponse.isRetransmission()) {
- if(status == 183 && !response.toString().equals(session.getLast183Response())) {
-                                                                               
if(logger.isDebugEnabled()) {
- logger.debug("the following response is not dropped to recover early media changes, see http://code.google.com/p/mobicents/issues/detail?id=2251 :" + response);
-                                                                               
}
-                                                                       } else {
-                                                                               
if(logger.isDebugEnabled()) {
- logger.debug("the following response is dropped since this is a retransmission " + response);
-                                                                               
}
-                                                                               
return;
-                                                                       }
+                                                                       
if(logger.isDebugEnabled()) {
+ logger.debug("the following response is dropped since this is a retransmission " + response);
+                                                                       }
+                                                                       return;
                                                                }
                                                                //if this is a 
trying response, the response is dropped
                                                                
if(Response.TRYING == status) {
@@ -367,12 +354,6 @@

                                                                
callServlet(sipServletResponse);
                                                                
forwardResponseStatefully(sipServletResponse);
-
-                                                               if(status == 
183) {
-                                                                       
session.setLast183Response(response.toString());
-                                                               } else if(status 
>= 200) {
- session.setLast183Response(null); // cleanup after the final response, 183 is no longer needed to find retransmissions
-                                                               }
                                                        }
                                                } catch (ServletException e) {
throw new DispatcherException("Unexpected servlet exception while processing the response : " + response, e);
=======================================
--- /trunk/servers/sip-servlets/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/session/MobicentsSipSession.java Mon Jan 3 05:51:04 2011 +++ /trunk/servers/sip-servlets/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/session/MobicentsSipSession.java Thu Jan 6 13:34:01 2011
@@ -167,8 +167,4 @@

        void setSipSessionSecurity(SipSessionSecurity sipSessionSecurity);
        SipSessionSecurity getSipSessionSecurity();
-
-       public String getLast183Response();
-
-       public void setLast183Response(String last183Response);
-}
+}
=======================================
--- /trunk/servers/sip-servlets/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/session/SipSessionImpl.java Mon Jan 3 05:51:04 2011 +++ /trunk/servers/sip-servlets/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/session/SipSessionImpl.java Thu Jan 6 13:34:01 2011
@@ -269,9 +269,6 @@
// Handle Header [Authentication-Info: nextnonce="xyz"] in sip authorization responses
        protected transient SipSessionSecurity sipSessionSecurity;

-       // http://code.google.com/p/mobicents/issues/detail?id=2251
-       protected String last183Response = null;
-
protected SipSessionImpl (SipSessionKey key, SipFactoryImpl sipFactoryImpl, MobicentsSipApplicationSession mobicentsSipApplicationSession) {
                this.key = key;
                setSipApplicationSession(mobicentsSipApplicationSession);
@@ -2158,11 +2155,5 @@
                        sipSessionSecurity = new SipSessionSecurity();
                }
                return sipSessionSecurity;
-       }
-       public String getLast183Response() {
-               return last183Response;
-       }
-       public void setLast183Response(String last183Response) {
-               this.last183Response = last183Response;
        }
 }
=======================================
--- /trunk/servers/sip-servlets/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/message/MobicentsSipSessionFacade.java Mon Jan 3 05:51:04 2011 +++ /trunk/servers/sip-servlets/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/message/MobicentsSipSessionFacade.java Thu Jan 6 13:34:01 2011
@@ -478,13 +478,5 @@
        public void setSipSessionSecurity(SipSessionSecurity 
sipSessionSecurity) {
                sipSession.setSipSessionSecurity(sipSessionSecurity);
        }
-
-       public void setLast183Response(String last183Response) {
-               sipSession.setLast183Response(last183Response);
-       }
-
-       public String getLast183Response() {
-               return sipSession.getLast183Response();
-       }

 }

Reply via email to