code: public void sessionDidActivate(SipApplicationSessionEvent event) {
  		logger.info("Following sip application session just activated " + event.getApplicationSession().getId() + " cause " + ((SipApplicationSessionActivationEvent)event).getCause());
  		if(((SipApplicationSessionActivationEvent)event).getCause() == SessionActivationNotificationCause.FAILOVER) {
  			event.getApplicationSession().setAttribute(SIP_APPLICATION_SESSION_ACTIVATED, "true" );
  		}
  
  	}
docs: /* (non-Javadoc)
  @see javax.servlet.sip.SipApplicationSessionActivationListener#sessionDidActivate(javax.servlet.sip.SipApplicationSessionEvent)