protected void doResponse(SipServletResponse response)
      throws ServletException, IOException {

    logger.info("SimpleProxyServlet: Got response:\n" + response);
    if(SipServletResponse.SC_OK == response.getStatus() && "BYE".equalsIgnoreCase(response.getMethod())) {
      SipSession sipSession = response.getSession(false);
      if(sipSession != null) {
        SipApplicationSession sipApplicationSession = sipSession.getApplicationSession();
        sipSession.invalidate();
        sipApplicationSession.invalidate();
      }     
    }
    else if ( response.getStatus() >= 400) {
      doErrorResponse(response);
    }
  }
protected void doResponse ( SipServletResponse response ) throws ServletException , IOException { logger . info ( "SimpleProxyServlet: Got response:\n" + response ) ; if ( SipServletResponse . SC_OK == response . getStatus ( ) && "BYE" . equalsIgnoreCase ( response . getMethod ( ) ) ) { SipSession sipSession = response . getSession ( false ) ; if ( sipSession != null ) { SipApplicationSession sipApplicationSession = sipSession . getApplicationSession ( ) ; sipSession . invalidate ( ) ; sipApplicationSession . invalidate ( ) ; } } else if ( response . getStatus ( ) >= 400 ) { doErrorResponse ( response ) ; } }
{@inheritDoc}