code: protected void doInvite(SipServletRequest request) throws ServletException,
  			IOException {
  
  		logger.info("MediaPlaybackServlet: Got request:\n"
  				+ request.getMethod());
  		SipServletResponse sipServletResponse = request.createResponse(SipServletResponse.SC_RINGING);
  		sipServletResponse.send();
  		Object sdpObj = request.getContent();
  		byte[] sdpBytes = (byte[]) sdpObj;
  		String sdp = new String(sdpBytes); 
  		try {
  			
  			SipSession sipSession = request.getSession();
  			MsControlObjects.msControlFactory = (MsControlFactory) getServletContext().getAttribute(MS_CONTROL_FACTORY);
  //			MediaSession mediaSession = (MediaSession) MsControlObjects.msControlFactory
  //			.createMediaSession();
  
  			sipSession.setAttribute("MEDIA_SESSION", mediaSession);
  			mediaSession.setAttribute("SIP_SESSION", sipSession);
  
  			// Store INVITE so it can be responded to later
  			sipSession.setAttribute("UNANSWERED_INVITE", request);
  
  			// Create a new NetworkConnection and store in SipSession
  			NetworkConnection conn = mediaSession
  			.createNetworkConnection(NetworkConnection.BASIC);
  
  			SdpPortManager sdpManag = conn.getSdpPortManager();
  
  			ConferenceConnectionListener ncListener = new ConferenceConnectionListener(request);
  
  			sdpManag.addListener(ncListener);
  
  			byte[] sdpOffer = request.getRawContent();
  
  			sdpManag.processSdpOffer(sdpOffer);
  
  		} catch (Exception e) {
  			e.printStackTrace();
  		}
  
  	}
docs: {@inheritDoc}