System.out.println("response = " + response); response.setContent(content, contentTypeHeader); Dialog dialog = st.getDialog(); if (dialog != null)
System.out.println("response = " + response); response.setContent(content, contentTypeHeader); } dialog = st.getDialog(); if (dialog != null) { System.out.println("Dialog " + dialog);
	public void processInvite(		RequestEvent requestEvent,		ServerTransaction serverTransaction) {		SipProvider sipProvider = (SipProvider) requestEvent.getSource();		Request request = requestEvent.getRequest();		try {			System.out.println("shootme: got an Invite sending OK");			System.out.println("shootme:  " + request);			Response response = messageFactory.createResponse(200, request);			ToHeader toHeader = (ToHeader) response.getHeader(ToHeader.NAME);			toHeader.setTag("4321"); // Application is supposed to set.			//ifdef SIMULATION			/*					Address address = addressFactory.createAddress(						"Shootme <sip:129.6.55.62:5070>");			//else			*/			Address address =				addressFactory.createAddress("Shootme <sip:127.0.0.1:5070>");			//endif			//			ContactHeader contactHeader =				headerFactory.createContactHeader(address);			response.addHeader(contactHeader);			ServerTransaction st = sipProvider.getNewServerTransaction(request);			// Thread.sleep(5000);			System.out.println("got a server tranasaction " + st);			byte[] content = request.getRawContent();			//System.out.println("Content = " + new String(content));			ContentTypeHeader contentTypeHeader =				headerFactory.createContentTypeHeader("application", "sdp");			System.out.println("response = " + response);			response.setContent(content, contentTypeHeader);			Dialog dialog = st.getDialog();			if (dialog != null)				System.out.println("Dialog state " + dialog.getState());			st.sendResponse(response);			this.inviteTid = st;		} catch (Exception ex) {			ex.printStackTrace();			System.exit(0);		}	}