public String getId() { return getSipSession().getId(); }
out.writeUTF(""); } else { out.writeUTF(sipSession.getId());
public SipServletResponse createResponseToOriginalRequest( SipSession session, int status, String reasonPhrase) { if (session == null) { throw new NullPointerException("Null arg"); } final MobicentsSipSession sipSession = (MobicentsSipSession) session; if(!sipSession.isValidInternal()) { throw new IllegalArgumentException("sip session " + sipSession.getId() + " is invalid !"); } final MobicentsSipServletMessage sipServletMessageImpl = sipSession.getSessionCreatingTransactionRequest(); if(!(sipServletMessageImpl instanceof SipServletRequestImpl)) { throw new IllegalStateException("session creating transaction message is not a request !"); } final SipServletRequestImpl sipServletRequestImpl = (SipServletRequestImpl) sipServletMessageImpl; if(RoutingState.FINAL_RESPONSE_SENT.equals(sipServletRequestImpl.getRoutingState())) { // checked by TCK test com.bea.sipservlet.tck.agents.api.javax_servlet_sip.B2buaHelperTest.testCreateResponseToOriginalRequest101 throw new IllegalStateException("subsequent response is inconsistent with an already sent response. a Final response has already been sent for this request " + sipServletRequestImpl); } if(logger.isDebugEnabled()) { logger.debug("creating response to original request " + sipServletRequestImpl + " on session " + session); } return sipServletRequestImpl.createResponse(status, reasonPhrase); }
for(MobicentsSipSession sipSession : sipSessions) { Enumeration<String> attributeNames = sipSession.getAttributeNames(); result += " [SIP SESSION] ID = " + sipSession.getId() + "\n"; while(attributeNames.hasMoreElements()) { String attribName = attributeNames.nextElement();
String linkedDerivedSessionId = derivedSessionMap.get(mobicentsSipSession.getId()); if(linkedDerivedSessionId == null) { SipServletRequestImpl originalSipServletRequestImpl = (SipServletRequestImpl) linkedSession.getSessionCreatingTransactionRequest(); linkedSession.setSessionCreatingTransactionRequest(clonedOriginalRequest); derivedSessionMap.put(mobicentsSipSession.getId(), linkedSession.getId()); derivedSessionMap.put(linkedSession.getId(), mobicentsSipSession.getId()); } else { if(logger.isDebugEnabled()) {
logger.debug("Dispatching response " + response.toString() + " to following App/servlet => " + session.getKey().getApplicationName()+ "/" + session.getHandler() + " on following sip session " + session.getId());
final MobicentsSipSession sipSessionImpl = (MobicentsSipSession) session; if(!sipSessionImpl.isValidInternal()) { throw new IllegalArgumentException("the session " + sipSessionImpl.getId() + " is invalid");
logger.debug("Dispatching request " + request.toString() + " to following App/servlet => " + session.getKey().getApplicationName()+ "/" + session.getHandler() + " on following sip session " + session.getId());
logger.debug("route response on following session " + tmpSession.getId());
logger.debug("Inverted try worked. sip session found : " + tmpSipSession.getId());