logger.debug("session is null, trying to load the session from the sessionKey " + sessionKey); final String applicationName = sessionKey.getApplicationName(); final SipContext sipContext = sipFactoryImpl.getSipApplicationDispatcher().findSipApplication(applicationName); SipApplicationSessionKey sipApplicationSessionKey = new SipApplicationSessionKey(sessionKey.getApplicationSessionId(), sessionKey.getApplicationName(), null); MobicentsSipApplicationSession sipApplicationSession = sipContext.getSipManager().getSipApplicationSession(sipApplicationSessionKey, false); sipSession = sipContext.getSipManager().getSipSession(sessionKey, false, sipFactoryImpl, sipApplicationSession);
" to following App/ruby controller => " + response.getSipSession().getKey().getApplicationName()+ "/" + sipContext.getSipRubyController().getName()); if(logger.isDebugEnabled()) { logger.debug("Dispatching response " + response.toString() + " to following App/servlet => " + session.getKey().getApplicationName()+ "/" + session.getHandler() + " on following sip session " + session.getId());
SipServletRequestImpl originalSipServletRequestImpl = (SipServletRequestImpl) linkedSession.getSessionCreatingTransactionRequest(); String newToTag = ApplicationRoutingHeaderComposer.getHash(sipFactoryImpl.getSipApplicationDispatcher(),sipSessionKey.getApplicationName(), sipSessionKey.getApplicationSessionId()); if(logger.isDebugEnabled()) { logger.debug("derived session " + mobicentsSipSession + " has no linked forked session yet, lazily creating one with new ToTag " + newToTag); sipSessionKey = new SipSessionKey(sipSessionKey.getFromTag(), newToTag, sipSessionKey.getCallId(), sipSessionKey.getApplicationSessionId(), sipSessionKey.getApplicationName()); linkedSession = sipManager.getSipSession(sipSessionKey, false, null, mobicentsSipSession.getSipApplicationSession());
SipContext sipContext = findSipApplication(sipSessionKey.getApplicationName());
if(logger.isDebugEnabled()) { logger.debug("Dispatching request " + request.toString() + " to following App/servlet => " + session.getKey().getApplicationName()+ "/" + session.getHandler() + " on following sip session " + session.getId()); " to following App/ruby controller => " + request.getSipSession().getKey().getApplicationName()+ "/" + sipContext.getSipRubyController().getName());
routeAppName = sipFactoryImpl.getSipApplicationDispatcher().getApplicationNameFromHash(routeAppNameHashed); if(routeAppName == null || !sipFactoryImpl.getSipApplicationDispatcher().getApplicationServerId().equalsIgnoreCase(serverId) || !routeAppName.equals(getSipSession().getKey().getApplicationName())) { ackRequest.addHeader(routeHeader);
final String branch = JainSipUtils.createBranch(sipApplicationSession.getKey().getId(), sipFactoryImpl.getSipApplicationDispatcher().getHashFromApplicationName(session.getKey().getApplicationName())); viaHeader.setBranch(branch);
applicationName = sessionKey.getApplicationName(); } else { if(this instanceof SipServletRequestImpl && isOrphan()) {
SipContext sipContext = findSipApplication(sipSessionKey.getApplicationName()); final SipManager sipManager = sipContext.getSipManager(); final SipApplicationSessionKey sipApplicationSessionKey = SessionManagerUtil.getSipApplicationSessionKey( sipSessionKey.getApplicationName(), sipSessionKey.getApplicationSessionId(), null);
removeTx = false; SipContext sipContext = findSipApplication(sipSessionKey.getApplicationName());
toTag = ApplicationRoutingHeaderComposer.getHash(sipFactoryImpl.getSipApplicationDispatcher(),sipSessionKey.getApplicationName(), sipAppSessionKey.getId());
SipContext sipContext = findSipApplication(sipSessionKey.getApplicationName());
addInfoForRoutingBackToContainer(routerInfo, session.getSipApplicationSession().getKey().getId(), session.getKey().getApplicationName()); addDNSRoute = false;
sipTargetedRequestType = SipTargetedRequestType.REPLACES; joinReplacesTargetedRequestInfo = new SipTargetedRequestInfo(sipTargetedRequestType, joinReplacesCorrespondingSession.getKey().getApplicationName()); } else {
routeAppName = sipFactoryImpl.getSipApplicationDispatcher().getApplicationNameFromHash(routeAppNameHashed); if(routeAppName == null || !sipFactoryImpl.getSipApplicationDispatcher().getApplicationServerId().equalsIgnoreCase(serverId) || !routeAppName.equals(getSipSession().getKey().getApplicationName())) { prackRequest.addHeader(routeHeader);
response); sipURI.setParameter(MessageDispatcher.RR_PARAM_SERVER_NAME, sipFactoryImpl.getSipApplicationDispatcher().getApplicationServerId()); sipURI.setParameter(MessageDispatcher.RR_PARAM_APPLICATION_NAME, sipFactoryImpl.getSipApplicationDispatcher().getHashFromApplicationName(session.getKey().getApplicationName())); sipURI.setParameter(MessageDispatcher.APP_ID, sipAppSessionKey.getId()); sipURI.setLrParam();
.getSipApplicationSession(); newFromHeader.setTag(ApplicationRoutingHeaderComposer.getHash(sipFactoryImpl.getSipApplicationDispatcher(), originalSession.getKey().getApplicationName(), appSession.getKey().getId())); final MobicentsSipSessionKey key = SessionManagerUtil.getSipSessionKey(appSession.getKey().getId(), originalSession.getKey().getApplicationName(), newRequest, false); final MobicentsSipSession session = appSession.getSipContext().getSipManager().getSipSession(key, true, sipFactoryImpl, appSession); session.setHandler(originalSession.getHandler());
final String branch = JainSipUtils.createBranch( sipSession.getKey().getApplicationSessionId(), sipApplicationDispatcher.getHashFromApplicationName(sipSession.getKey().getApplicationName())); viaHeader.setBranch(branch); } catch (ParseException pe) {
final String branch = JainSipUtils.createBranch(session.getSipApplicationSession().getKey().getId(), sipApplicationDispatcher.getHashFromApplicationName(session.getKey().getApplicationName())); viaHeader.setBranch(branch); } else { final String branch = JainSipUtils.createBranch(session.getSipApplicationSession().getKey().getId(), sipApplicationDispatcher.getHashFromApplicationName(session.getKey().getApplicationName())); viaHeader.setBranch(branch); appNotDeployed = session.getKey().getApplicationName();
logger.debug("the encoded URI Sip Application Session is " + sipApplicationSession); if(joinReplacesSipSession != null && nextApplicationName.equals(joinReplacesSipSession.getKey().getApplicationName())) { sipServletRequest.setSipSession(sipSessionImpl); if(joinReplacesSipSession != null && nextApplicationName.equals(joinReplacesSipSession.getKey().getApplicationName())) { final JoinHeader joinHeader = (JoinHeader)request.getHeader(JoinHeader.NAME); final ReplacesHeader replacesHeader = (ReplacesHeader)request.getHeader(ReplacesHeader.NAME);