public MobicentsSipApplicationSession getFacade() { return sipApplicationSession.getFacade(); }
public SipApplicationSession getApplicationSession() { MobicentsSipApplicationSession sipApplicationSession = getSipApplicationSession(); if(sipApplicationSession == null) { return null; } else { return sipApplicationSession.getFacade(); } }
public SipApplicationSession getApplicationSession(boolean create) { MobicentsSipApplicationSession sipApplicationSession = getSipApplicationSession(create); if(sipApplicationSession == null) { return null; } else { return sipApplicationSession.getFacade(); } }
public SipApplicationSession getApplicationSession() { MobicentsSipApplicationSession sipApplicationSession = getSipApplicationSession(true); if(sipApplicationSession == null) { return null; } else { return sipApplicationSession.getFacade(); } }
public SipApplicationSession getApplicationSessionByKey(String applicationSessionKey, boolean create, boolean isContainerManaged) { if(applicationSessionKey == null) { throw new NullPointerException("the given key is null !"); } SipApplicationSessionKey sipApplicationSessionKey = new SipApplicationSessionKey(null, sipContext.getApplicationName(), applicationSessionKey); MobicentsSipApplicationSession sipApplicationSession = sipContext.getSipManager().getSipApplicationSession(sipApplicationSessionKey, create); if(sipApplicationSession == null) { return null; } else { // make sure to acquire this app session and add it to the set of app sessions we monitor in the context of the application // to release them all when we exit application code sipContext.enterSipApp(sipApplicationSession, null, true, isContainerManaged); return sipApplicationSession.getFacade(); } }
public SipApplicationSession getApplicationSessionById(String applicationSessionId, boolean isContainerManaged) { if(applicationSessionId == null) { throw new NullPointerException("the given id is null !"); } SipApplicationSessionKey applicationSessionKey; try { applicationSessionKey = SessionManagerUtil.parseSipApplicationSessionKey(applicationSessionId); } catch (ParseException e) { logger.error("the given application session id : " + applicationSessionId + " couldn't be parsed correctly ",e); return null; } if(applicationSessionKey.getApplicationName().equals(sipContext.getApplicationName())) { MobicentsSipApplicationSession sipApplicationSession = sipContext.getSipManager().getSipApplicationSession(applicationSessionKey, false); if(sipApplicationSession == null) { return null; } else { // make sure to acquire this app session and add it to the set of app sessions we monitor in the context of the application // to release them all when we exit application code sipContext.enterSipApp(sipApplicationSession, null, true, isContainerManaged); return sipApplicationSession.getFacade(); } } else { logger.warn("the given application session id : " + applicationSessionId + " tried to be retrieved from incorret application " + sipContext.getApplicationName()); return null; } }
/** * Creates an application session associated with the context * @param sipContext * @return */ public MobicentsSipApplicationSession createApplicationSession(SipContext sipContext) { if (logger.isDebugEnabled()) { logger.debug("Creating new application session for sip context "+ sipContext.getApplicationName()); } //call id not needed anymore since the sipappsessionkey is not a callid anymore but a random uuid SipApplicationSessionKey sipApplicationSessionKey = SessionManagerUtil.getSipApplicationSessionKey( sipContext.getApplicationName(), null, null); MobicentsSipApplicationSession sipApplicationSession = sipContext.getSipManager().getSipApplicationSession( sipApplicationSessionKey, true); if(StaticServiceHolder.sipStandardService.isHttpFollowsSip()) { String jvmRoute = StaticServiceHolder.sipStandardService.getJvmRoute(); if(jvmRoute != null) { sipApplicationSession.setJvmRoute(jvmRoute); } } return sipApplicationSession.getFacade(); }
return sipApplicationSession.getFacade(); } else { return null;
return sipApplicationSession.getFacade(); } else { return null;
return sipApplicationSession.getFacade(); } else { return null;
return sipApplicationSession.getFacade(); } else { return null;