code: public void terminateSession(final SipSession session,
      							 final int calleeResponseCode, final String calleeResponseText,
      							 final int callerResponseCode, final String callerResponseText)
      							 throws IllegalStateException, IOException {
      	if(null == finalBranchForSubsequentRequests) {
  			throw new IllegalStateException("Proxy has not yet been established. Before final response use cancel.");
      	}
      	if (!storeTerminationInfo || terminationInfo == null) {
      		logger.error("storeTerminationInfo = " + storeTerminationInfo);
      		if (terminationInfo == null) {
      			logger.error("terminationInfo = null");
      		}
      		throw new IllegalStateException("No termination information stored.Call storeTerminationInformation before final response arrives.");
      	}
      	terminationInfo.terminate(session, calleeResponseCode, calleeResponseText, callerResponseCode, callerResponseText);
      }
docs: /*
  (non-Javadoc)
  @see org.mobicents.javax.servlet.sip.ProxyExt#terminateSession(javax.servlet.sip.SipSession, int, java.lang.String, int, java.lang.String)